Apurv255/Ai-productivity-coach
0
๐ง AI Productivity Coach (RL-Based)
A Reinforcement Learning-based AI system that helps users optimize focus, reduce distractions, and manage fatigue dynamically.
๐ Features
- Reinforcement Learning Agent (Q-Learning)
- Real-world productivity simulation environment
- Dynamic reward system (focus, fatigue, distractions)
- FastAPI backend
- Interactive frontend (HTML/CSS/JS)
- Dockerized deployment
๐ง Environment
Observation Space
- focus_level (0โ1)
- fatigue (0โ1)
- distractions (list)
- time_spent
- deadline
Action Space
- continue
- take_break
- block_distraction
๐ฏ Reward Design
- Positive reward for focus improvement
- Penalty for fatigue and distractions
- Bonus for clean environment (no distractions)
- Time pressure penalty near deadline
๐ API Endpoints
- /reset โ Initialize environment
- /step_rl โ Run RL step (returns state, reward, done)
- /step โ UI-based AI advice
- /score โ Get agent performance score
- /health โ Health check
โถ๏ธ Run Locally
uvicorn app.main:app --reload๐ณ Run with Docker
docker build -t focusforge .
docker run -p 7860:7860 focusforge๐งช Run Inference
python inference.py๐ Evaluation
Score range: 0 โ 1
Based on average focus, total reward, and distractions managed.
๐ Project Structure
focusforge/
โ
โโโ app/
โ โโโ main.py
โ โโโ env.py
โ โโโ agent.py
โ โโโ models.py
โ โโโ index.html
โ โโโ script.js
โ โโโ style.css
โ
โโโ inference.py
โโโ openenv.yaml
โโโ requirements.txt
โโโ Dockerfile
โโโ README.md๐จโ๐ป Author
Apurv
