This project is an interactive command-line learning game that generates dynamic, subject-specific MCQs using the OpenAI API. It includes a machine-learning adaptive engine, a performance tracker, and visual performance graphs to create a personalized learning experience.
-
Dynamically generates high-quality MCQs across subjects like Math, Science, History, Geography, and English.
-
Ensures:
- 4 consistent answer choices
- Fully structured JSON output
- Explanation for each question
- Difficulty score (1–10)
-
Trained on a synthetic dataset that includes:
- Accuracy %
- Time taken
- Streak
- Subject
- Current level
-
Uses Logistic Regression + StandardScaler to recommend next difficulty level:
- Easy → Medium
- Medium → Hard
- Hard → Medium/Easy (if user struggles)
Tracks:
- Accuracy over time
- Time taken per question
- Streaks
- Overall summary
Plots include:
- Accuracy trend line
- Response time graph
Uses matplotlib to render graphs.
Simple, clean terminal interface:
Welcome to Quiz Adventures — AI-Powered MCQ Game
1. Start New Session
2. View Performance Summary
3. View Performance Graph
4. Exit
Organized into clean files:
src/
├── main.py # Entry point
├── mcq_generator.py # OpenAI MCQ generator
├── performance_tracker.py
├── adaptive_engine.py # ML difficulty engine
└── data/
training_data.csv
git clone https://github.com/yourusername/adaptive-learning.git
cd adaptive-learningpython -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activatepip install -r requirements.txtCreate a .env file:
OPENAI_API_KEY=your_api_key_here
python src/main.py{
"question": "What is the chemical symbol for water?",
"choices": ["H2O", "O2", "CO2", "NaCl"],
"answer_index": 0,
"explanation": "Water consists of two hydrogen atoms bonded to one oxygen atom.",
"difficulty_score": 2
}- Add memory-based reinforcement learning
- Introduce user profiles & progress graphs
- Export progress reports
- Add web UI (FastAPI + React/Streamlit)
- Add leaderboard & gamification
Open for contributions! Suggestions, PRs, improvements — all welcome.
MIT License.