๐ค 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
๐ 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.