Click here to try the live version of this project
Interavctive Revision using Reinforcement Learning
This project is a full-stack Proof-of-Concept for an adaptive learning platform that uses Reinforcement Learning (RL) to create a personalized quizzing experience for students. The application acts as an AI tutor that learns a student's mastery level and adjusts the difficulty of questions to maximize their long-term learning and retention.
The front-end is built with React, and the backend is powered by a Python (Flask) server that contains the core Reinforcement Learning agent.
โจ Core Concept The fundamental idea is to move beyond static, one-size-fits-all quizzes. This application simulates a personal tutor who adapts their teaching strategy based on the student's performance and feedback.
The system is built around a continuous feedback loop:
Assess: The AI agent checks the student's current masteryScore to determine their knowledge level (State).
Act: Based on its learned strategy (its Q-Table), the AI chooses the optimal difficulty of the next question (Action: easy, medium, or hard).
Feedback & Learn: The student answers the question. The AI receives a Reward based on the correctness of the answer and uses it to update its strategy.
Adapt: The student also provides feedback on how difficult the question felt, which the system uses to dynamically adjust the question's difficulty rating, making the AI's future choices even more intelligent.
๐ Features Adaptive MCQ System: Presents multiple-choice questions that are dynamically selected by an AI.
Reinforcement Learning Backend: The Python Flask server contains a Q-learning agent that decides the difficulty of the next question.
Dynamic Difficulty Adjustment: The system refines its understanding of question difficulty based on direct user feedback ("Felt Easier," "About Right," "Felt Harder").
Real-time Performance Tracking: A masteryScore provides immediate feedback on the student's progress.
Interactive UI: A clean and responsive front-end built with React.
AI Learning Log: A transparent log that shows the AI's decision-making process in real-time.
๐ ๏ธ Tech Stack Frontend: React, JavaScript (ES6+), CSS-in-JS
Backend: Python 3, Flask, Flask-CORS
Core AI: Q-Learning (a Reinforcement Learning algorithm)
๐ Getting Started To get this project running locally, you will need to run both the backend and front-end servers simultaneously.
Prerequisites Node.js and npm installed
Python 3 and pip installed
-
Backend Setup (Python Flask Server) First, set up and run the server.
-
Clone the repository (or create the backend folder) ...
-
Navigate to the backend directory cd backend-python
-
Create and activate a virtual environment python -m venv venv On Windows: .\venv\Scripts\activate On macOS/Linux: source venv/bin/activate
-
Install the required packages pip install -r requirements.txt
-
Run the server python app.py
The backend server should now be running on http://localhost:5000
Leave this terminal running.
-
Frontend Setup (React App) Now, in a new terminal window, set up and run the React UI.
-
Navigate to the frontend directory cd frontend
-
Install the necessary packages npm install
-
Start the development server npm run dev
The frontend should now be running on http://localhost:5173