Skip to content

jenniferlinet/reinforcementlearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Live Demo

Click here to try the live version of this project

Live Demo

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

  1. Backend Setup (Python Flask Server) First, set up and run the server.

  2. Clone the repository (or create the backend folder) ...

  3. Navigate to the backend directory cd backend-python

  4. Create and activate a virtual environment python -m venv venv On Windows: .\venv\Scripts\activate On macOS/Linux: source venv/bin/activate

  5. Install the required packages pip install -r requirements.txt

  6. Run the server python app.py

The backend server should now be running on http://localhost:5000

Leave this terminal running.

  1. Frontend Setup (React App) Now, in a new terminal window, set up and run the React UI.

  2. Navigate to the frontend directory cd frontend

  3. Install the necessary packages npm install

  4. Start the development server npm run dev

The frontend should now be running on http://localhost:5173

About

Interactive adaptive learning platform using Reinforcement Learning (React + Flask stack)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors