Version 1.0 Created by Ryan Rustill
A sophisticated, open-source adaptive learning system that teaches fundamental concepts through systematic analysis. Built with an advanced educational algorithms that adapt to individual learning patterns.
This isn't just another quiz system - it's an intelligent adaptive learning engine that:
- ๐ง Learns from your performance and adjusts question difficulty in real-time
- ๐ฏ Focuses on weak areas while challenging your strengths
- โพ๏ธ Never repeats questions so you can return for continuous learning
- ๐ Teaches systematic thinking through the "Detective Method"
- ๐พ Remembers your progress across sessions with automatic save/load
- ๐ Provides detailed explanations for every single answer
This system teaches you to approach code like a detective:
- Read the code line by line
- Track what each variable contains
- Follow the execution order
- Think about what each operation does
- Predict the final result
- Double-check your logic
# Clone the repository
git clone https://github.com/RyanRustill/universal-learning-engine.git
cd universal-learning-engine
# Launch the universal learning system
python3 ule.py
That's it! The system will automatically discover available subjects and guide you through your adaptive learning journey.
ULE features a universal launcher that automatically discovers and presents all available learning subjects:
- ๐ Automatic Discovery - Scans the
subjects/
directory for new learning modules - ๐ Clean Menu Interface - Simple numbered menu for subject selection
- ๐ Seamless Navigation - Easy return to main menu from any subject
- ๐ Extensible Design - Add new subjects by simply dropping modules in
subjects/
The system intelligently finds any subject module with standard naming patterns (rrle_[subject].py
, launcher.py
, etc.) and makes them instantly available.
- Questions get harder when you master concepts (80%+ success rate)
- Questions get easier when you struggle (30% or lower success rate)
- Each concept has individual difficulty tracking (1-5 stars โญ)
- Prioritizes concepts where you need practice
- Ensures diverse question variety each round
- Balances challenge with learning opportunities
- Tracks everything you've seen to avoid repeats
- Automatically saves progress between sessions
- Real-time difficulty levels for each concept
- Success rates and mastery indicators
- Comprehensive learning analytics
The system covers fundamental Python concepts across 5 difficulty levels:
- Variable Assignment - Basic storage, calculations, complex logic
- String Indexing - Positive/negative indexing, dynamic access
- List Operations - Manipulation, methods, comprehensions
- Data Types - Numbers, strings, booleans, type conversion
- Control Flow - Loops, conditionals, logical operators
Each concept includes 25 carefully crafted questions (125+ total) designed to support 20+ rounds of learning without repetition.
Demonstrates the extensibility with core mathematical concepts:
- Arithmetic - Basic operations and mental math
- Algebra - Variable solving and substitution
- Word Problems - Real-world mathematical scenarios
- Fractions - Addition and multiplication with fractions
- Geometry - Shapes, areas, and angle calculations
Note: Mathematics is intentionally kept minimal (13 questions across 3 difficulty levels) as a proof-of-concept and template for community contributions. It demonstrates the complete integration process while inviting others to expand upon the foundation.
ULE
- The main adaptive learning engineDifficultyManager
- Handles adaptive difficulty progressionAdaptiveQuestionSelector
- Intelligently chooses questionsUniversalUI
- Beautiful terminal interface with colors
- Universal Design - Core algorithms work for any subject
- Dataclass-based question and performance tracking
- Deque-based recent performance analysis (last 3 attempts)
- JSON-based question database for easy expansion
- Color-coded terminal output for enhanced experience
- โญ (Level 1): Basic fundamentals
- โญโญ (Level 2): Building understanding
- โญโญโญ (Level 3): Intermediate concepts
- โญโญโญโญ (Level 4): Advanced applications
- โญโญโญโญโญ (Level 5): Expert level challenges
- ๐ MASTERED (85%+ success rate)
- ๐ PROFICIENT (70-84% success rate)
- ๐ DEVELOPING (50-69% success rate)
- ๐ง LEARNING (Below 50% - focused practice mode)
The system uses sophisticated algorithms to:
- Track recent performance (sliding window of last 3 attempts)
- Calculate success rates (both overall and recent trends)
- Identify struggling concepts for additional practice
- Balance question selection between reinforcement and exploration
- Adjust difficulty dynamically based on demonstrated mastery
universal-learning-engine/
โโโ ule.py # ๐ Universal launcher (main entry point)
โโโ engine/ # Core ULE adaptive learning engine
โ โโโ core/ # Universal algorithms
โ โ โโโ adaptive_engine.py # Main learning engine classes
โ โโโ ui/ # Terminal interface
โ โ โโโ terminal_ui.py # Beautiful color-coded UI
โ โโโ modules/ # Subject-specific implementations
โ โโโ python.py # Python subject module
โ โโโ mathematics.py # Mathematics subject module
โโโ subjects/ # Individual subject modules
โ โโโ python/ # Python learning module
โ โ โโโ ule_python.py # Python launcher
โ โ โโโ python_questions.json # Python question database (125 questions)
โ โโโ mathematics/ # Mathematics learning module
โ โโโ ule_mathematics.py # Mathematics launcher
โ โโโ mathematics_questions.json # Math question database (13 questions)
โโโ tests/ # ๐งช Comprehensive testing infrastructure
โ โโโ run_tests.py # Professional test runner with beautiful output
โ โโโ test_core_engine.py # Core engine unit tests (24 tests)
โ โโโ test_ui.py # User interface tests (16 tests)
โ โโโ analyze_questions.py # Interactive question database analyzer
โ โโโ README.md # Testing documentation and guidelines
|โโ ABOUT.md # Project origin story
โโโ EXTENDIBILITY.md # ๐ Complete step-by-step extension guide
โโโ README.md # This documentation
ULE includes a comprehensive testing infrastructure to ensure reliability and quality:
# Run all tests with beautiful output
python3 tests/run_tests.py
# Run specific test categories
python3 -m unittest tests.test_core_engine -v # Core engine tests
python3 -m unittest tests.test_ui -v # User interface tests
# Analyze question databases interactively
python3 tests/analyze_questions.py # Interactive subject selection
python3 tests/analyze_questions.py python # Analyze Python only
python3 tests/analyze_questions.py --summary # Quick overview
The interactive question analyzer helps developers and educators assess question quality:
python3 tests/analyze_questions.py
Features:
- ๐ฏ Interactive Menu - Choose specific subjects or analyze all
- ๐ Quality Assessment - Automatic evaluation of question databases
- ๐ Analytics - Difficulty distribution, concept coverage, learning potential
- ๐ฎ Adaptive Metrics - Estimates replay value and learning effectiveness
- ๐ก Recommendations - Suggestions for improving question sets
Sample Output:
๐ฏ AVAILABLE SUBJECTS (2 found):
==================================================
1. Mathematics
2. Python
A. All Subjects
S. Summary Table Only
Q. Quit
๐ Select subjects to analyze (e.g., 1,3 or A for all): 2
๐ PYTHON QUESTION DATABASE ANALYSIS
======================================================================
๐ OVERVIEW:
Subject: Python
Total Questions: 125
Concepts: 5
Difficulty Levels: 1-5
๐ DATABASE QUALITY ASSESSMENT:
โ
Sufficient question volume
โ
Good concept diversity
โ
Multi-level difficulty
โ
Well-balanced difficulty distribution
Core Engine Tests (24 tests):
- โ Question dataclass functionality
- โ Difficulty management and adaptation
- โ Adaptive question selection algorithms
- โ Progress saving and loading
- โ Session management
- โ Integration testing with multiple rounds
UI Tests (16 tests):
- โ Terminal interface functionality
- โ Color-coded output validation
- โ User input handling
- โ Menu navigation
- โ Subject configuration
Quality Metrics:
- ๐ 40 total tests with 95%+ success rate
- ๐ Comprehensive coverage of all core functionality
- ๐ Performance testing for question selection efficiency
- ๐งฉ Integration tests for complete learning scenarios
When contributing code or question sets:
# Always run tests before submitting
python3 tests/run_tests.py
# Analyze your question database
python3 tests/analyze_questions.py your_subject
# Check specific functionality
python3 -m unittest tests.test_core_engine.TestULE -v
The testing framework ensures:
- No question repetition within sessions
- Proper difficulty adaptation based on performance
- Reliable progress persistence across sessions
- Quality question selection for optimal learning
- Students learning programming fundamentals
- Self-taught learners practicing for exams or assignments
- Educational institutions looking for adaptive learning tools
- Anyone wanting to strengthen systematic reasoning skills
This tool embodies the belief that adaptive learning is more effective than one-size-fits-all approaches. By adjusting to individual pace and focusing on specific needs, it maximizes learning efficiency while maintaining motivation.
The "Detective Method" teaches systematic analysis - a skill that transfers to debugging, code review, and learning new concepts throughout your career.
- 3-attempt sliding window for recent performance tracking
- Concept-specific difficulty scaling (1-5 levels per concept)
- Intelligent question distribution ensuring variety and focus
- Session persistence with JSON-based progress storage
- Subject-agnostic core - easily extensible to other subjects and programming languages
- Modular architecture - clean separation between engine and content
- Flexible content format - JSON schema supports various question types
This project began as a simple Python quiz in my learning snippets. When a community member improved my initial code, I realized I could build something much more sophisticated.
This adaptive learning engine demonstrates advanced programming concepts while solving real educational challenges. The universal architecture shows how sophisticated educational technology can be built with clean, extensible code.
The modular architecture makes it easy to add:
- New programming languages (JavaScript, Java, C++, etc.)
- Additional subjects (Mathematics, Logic, Science, etc.)
- Different question types (debugging, code completion, etc.)
- Enhanced analytics and progress visualization
Want to add your own subject? See EXTENDIBILITY.md
for a complete step-by-step guide using Mathematics as a real example.
This is an open source educational project. Contributions are welcome, especially:
- New question sets following the JSON schema
- Additional subjects as new modules (see
EXTENDIBILITY.md
) - Enhanced UI features for better learning experience
- Educational improvements to explanations and methodology
The universal launcher makes adding new subjects incredibly easy - just follow the step-by-step guide and your subject appears automatically in the main menu!
All contributions remain under the MIT license, meaning they stay free and open for the community to use, modify, and extend.
๐ Note: ULE is a standalone open-source project. Any features or ideas that overlap with the upcoming mobile platform ReasonRoot will be implemented independently. Community contributions to ULE will not be reused commercially without permission or attribution.
MIT License - see LICENSE file for details.
- @DoctorChocolat - For pioneering the JSON-based question format that inspired this implementation. Their refactored version introduced the concept of separating questions into JSON files, which became foundational to the adaptive learning engine's design.
- Inspired by community feedback on initial implementation
- Built with educational psychology principles
- Designed for real learning outcomes, not just engagement
Ready to master learning through systematic reasoning? ๐
python3 ule.py
Created by @RyanRustill