Skip to content

Rule-Based Adaptive AI Coding Tutor with dynamic difficulty adjustment built using Python and Streamlit.

Notifications You must be signed in to change notification settings

SUBHASRI06/Adaptive-ai-coding-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Adaptive AI Coding Agent (Rule-Based Intelligent Tutor) ๐Ÿ“Œ Project Overview

The Adaptive AI Coding Agent is a rule-based intelligent coding tutor built using Streamlit. It dynamically generates programming problems and adapts difficulty levels based on user performance.

Unlike API-dependent AI systems, this tutor is fully self-contained and operates using a custom-designed adaptive algorithm without external AI services.

The system tracks user skill progression, analyzes performance patterns, and adjusts problem complexity accordingly.

๐ŸŽฏ Key Features

๐Ÿ”„ Adaptive difficulty adjustment (Easy โ†’ Medium โ†’ Hard)

๐Ÿ“Š Skill tracking across topics (loops, conditionals, functions, lists)

๐Ÿง  Rule-based decision engine

๐Ÿ“ Automatic evaluation logic

๐Ÿ’ก Context-aware hint generation

๐Ÿ’พ Persistent user memory using JSON storage

๐Ÿ” Basic authentication system

๐ŸŒ Interactive web interface using Streamlit

๐Ÿ— System Architecture

The system follows a modular agent-based structure:

adaptive-ai-coding-agent/ โ”‚ โ”œโ”€โ”€ app.py # Main Streamlit application โ”œโ”€โ”€ auth.py # Authentication logic โ”‚ โ”œโ”€โ”€ agent/ โ”‚ โ”œโ”€โ”€ decision_agent.py # Adaptive difficulty logic โ”‚ โ”œโ”€โ”€ evaluator.py # Code evaluation engine โ”‚ โ”œโ”€โ”€ hint_engine.py # Context-based hints โ”‚ โ””โ”€โ”€ memory.py # User skill tracking โ”‚ โ”œโ”€โ”€ data/ โ”‚ โ””โ”€โ”€ user_memory.json # Persistent performance tracking โ”‚ โ”œโ”€โ”€ problems/ โ”‚ โ”œโ”€โ”€ easy.py โ”‚ โ”œโ”€โ”€ medium.py โ”‚ โ””โ”€โ”€ hard.py โ”‚ โ”œโ”€โ”€ requirements.txt โ””โ”€โ”€ README.md

๐Ÿง  How It Works

The system analyzes user performance metrics:

Consecutive correct answers

Consecutive errors

Topic-wise skill scores

Success rate

It identifies weak skill areas.

Difficulty is adjusted dynamically:

Consistent success โ†’ Increased difficulty

Repeated errors โ†’ Reduced difficulty

Balanced performance โ†’ Moderate difficulty

New problems are generated with dynamic parameters for variation.

๐Ÿ›  Technologies Used

Python

Streamlit

JSON (for memory persistence)

Object-Oriented Programming

Rule-based decision logic

No external AI APIs are used.

โš™๏ธ Installation 1๏ธโƒฃ Clone the Repository git clone https://github.com/SUBHASRI06/adaptive-ai-coding-agent.git cd adaptive-ai-coding-agent

2๏ธโƒฃ Create Virtual Environment python -m venv venv venv\Scripts\activate

3๏ธโƒฃ Install Dependencies pip install -r requirements.txt

โ–ถ๏ธ Run the Application streamlit run app.py

๐Ÿ“Š Learning Adaptation Logic

The adaptive engine adjusts user skill scores using:

Incremental reward on correct answers

Slight penalty on incorrect attempts

Weakest-skill prioritization

Difficulty progression thresholds

This enables a personalized coding practice experience.

๐Ÿ”ฎ Future Enhancements

Code execution sandboxing

Database-based user management

Advanced skill modeling

AI-based code feedback integration

Deployment on cloud platform

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Subhasri N M Engineering Student AI & Machine Learning Enthusiast

โญ Project Status

Functional prototype demonstrating adaptive educational agent architecture.

About

Rule-Based Adaptive AI Coding Tutor with dynamic difficulty adjustment built using Python and Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages