Spaces:
No application file
No application file
|
Download README.md from dee2004/rl-study-scheduler: direct link, hf CLI and curl.
- Browser
- Download file 2.79 kB
-
https://huggingface.co/spaces/dee2004/rl-study-scheduler/resolve/main/README.md
- Command line
-
hf download hf://spaces/dee2004/rl-study-scheduler/README.md
-
curl -L -o README.md https://huggingface.co/spaces/dee2004/rl-study-scheduler/resolve/main/README.md
2.79 kB
| title: RL Study Scheduler | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: "4.0.0" | |
| app_file: inference.py | |
| pinned: false | |
| # RL-Based Adaptive Study Scheduler | |
| > Q-learning agent vs heuristic baseline for cognitive-aware study planning. | |
| ## Demo Output | |
|  | |
| --- | |
| ## Overview | |
| This project models study planning as a sequential decision-making problem under cognitive and temporal constraints. Instead of static prioritization rules, a **Reinforcement Learning (RL) agent** learns to optimize task scheduling dynamically. | |
| **Core insight**: Adaptive scheduling under stress is not a sorting problem β it's a **learning problem**. | |
| --- | |
| ## Results: RL vs Heuristic Baseline | |
| | Metric | RL Agent | Baseline | Winner | | |
| |--------|----------|----------|--------| | |
| | Avg Reward | Higher | Lower | RL β | | |
| | Tasks Completed | More | Less | RL β | | |
| | Missed Deadlines | Fewer | More | RL β | | |
| | Avg Stress | Lower | Higher | RL β | | |
| | Efficiency Score | Higher | Lower | RL β | | |
| **Key finding**: RL outperforms heuristic scheduling under high stress and tight deadlines. | |
| --- | |
| ## Live Demo | |
| π€ **[Try it on Hugging Face Spaces](https://huggingface.co/spaces/dee2004/rl-study-scheduler)** | |
| --- | |
| ## MDP Formulation | |
| ### State Space | |
| ``` | |
| energy (0-100), stress (0-100), focus (0-100), | |
| pending tasks, min deadline, max difficulty | |
| ``` | |
| ### Action Space | |
| ``` | |
| DO_TASK | BREAK | SKIP | SWITCH | |
| ``` | |
| ### Reward Function | |
| | Event | Reward | | |
| |-------|--------| | |
| | Task completion | +10 | | |
| | Difficult task (difficulty > 7) | +5 | | |
| | Urgent task completed (deadline < 2) | +4 | | |
| | Missed deadline | -8 | | |
| | Burnout (energy < 20) | -10 | | |
| | High stress (> 80) | -5 | | |
| | Context switching | -2 | | |
| | Self-care break | +2 | | |
| --- | |
| ## How to Run | |
| ```bash | |
| pip install -r requirements.txt | |
| python compare.py # Train + compare | |
| python plot.py # Generate chart | |
| python inference.py # Launch Gradio UI locally | |
| ``` | |
| --- | |
| ## Project Structure | |
| ``` | |
| rl-study-scheduler/ | |
| βββ env.py # RL environment (MDP) | |
| βββ agent_q.py # Q-learning agent | |
| βββ baseline.py # Heuristic policy | |
| βββ reward.py # Reward function | |
| βββ compare.py # Training + comparison | |
| βββ eval.py # Metrics | |
| βββ plot.py # Visualization | |
| βββ llm_grader.py # LLM qualitative evaluation | |
| βββ inference.py # Gradio app | |
| βββ requirements.txt | |
| ``` | |
| --- | |
| ## Why RL? | |
| | Requirement | Rule-based | RL | | |
| |---|---|---| | |
| | Sequential decisions | β | β | | |
| | Delayed rewards (rest now β no burnout later) | β | β | | |
| | Adapts to energy/stress state | β | β | | |
| | Learns from experience | β | β | | |
| --- | |
| ## Tech Stack | |
| - Python 3.8+ Β· NumPy Β· Matplotlib Β· Gradio Β· Anthropic API | |
| ## License | |
| MIT | |