{"id":31114668,"url":"https://github.com/gracefullight/rl-agent","last_synced_at":"2025-09-17T10:52:20.430Z","repository":{"id":314528897,"uuid":"1055866497","full_name":"gracefullight/rl-agent","owner":"gracefullight","description":"Grid World Value Iteration Simulator for educational reinforcement learning","archived":false,"fork":false,"pushed_at":"2025-09-13T02:34:49.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T02:40:12.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gracefullight.dev/rl-agent","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gracefullight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-13T00:03:14.000Z","updated_at":"2025-09-13T02:34:53.000Z","dependencies_parsed_at":"2025-09-13T02:40:18.692Z","dependency_job_id":"73f82b22-af32-45ca-afca-1f416fc2f667","html_url":"https://github.com/gracefullight/rl-agent","commit_stats":null,"previous_names":["gracefullight/rl-agent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/gracefullight/rl-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gracefullight%2Frl-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gracefullight%2Frl-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gracefullight%2Frl-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gracefullight%2Frl-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gracefullight","download_url":"https://codeload.github.com/gracefullight/rl-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gracefullight%2Frl-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275583372,"owners_count":25490651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-17T10:52:16.910Z","updated_at":"2025-09-17T10:52:20.421Z","avatar_url":"https://github.com/gracefullight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RL Agent: Grid World Value Iteration Simulator\n\n[![Deploy to GitHub Pages](https://github.com/gracefullight/rl-agent/actions/workflows/deploy.yml/badge.svg)](https://github.com/gracefullight/rl-agent/actions/workflows/deploy.yml)\n[![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-Active-green)](https://gracefullight.github.io/rl-agent/)\n\nAn interactive web-based reinforcement learning simulator for visualizing value iteration algorithms in a 4x3 grid world environment. Built for educational purposes to help students understand Markov Decision Processes (MDPs) through visual interaction.\n\n## 🚀 Live Demo\n\nVisit the live application: [https://gracefullight.github.io/rl-agent/](https://gracefullight.github.io/rl-agent/)\n\n## ✨ Features\n\n- **Interactive Grid World**: 4x3 grid with visual representation of states, rewards, and policies\n- **Value Iteration Algorithm**: Real-time visualization of Bellman equation iterations\n- **Stochastic Movement**: Configurable transition probabilities (80% intended, 10% left/right)\n- **Policy Visualization**: Arrow indicators showing optimal policy directions\n- **Educational Interface**: Step-by-step algorithm execution with convergence tracking\n\n## 🛠 Technology Stack\n\n- **Framework**: Next.js 15 with App Router\n- **UI**: React 19, shadcn/ui, Tailwind CSS\n- **Canvas**: React Konva for high-performance rendering\n- **State Management**: Jotai for atomic state management\n- **Development**: TypeScript, Biome, Playwright E2E testing\n- **Deployment**: GitHub Actions CI/CD to GitHub Pages\n\n## 🏃‍♂️ Quick Start\n\n### Prerequisites\n\n- Node.js 22 LTS\n- pnpm 10.15.0\n\n### Local Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/gracefullight/rl-agent.git\ncd rl-agent\n\n# Install dependencies\npnpm install\n\n# Start development server\npnpm dev\n\n# Open browser to http://localhost:3000\n```\n\n### Testing\n\n```bash\n# Run unit tests\npnpm test\n\n# Run E2E tests\npnpm test:e2e\n```\n\n### Building\n\n```bash\n# Build for production (static export)\npnpm build\n\n# Serve locally for testing\ncd out \u0026\u0026 python -m http.server 8000\n```\n\n## 📚 Educational Use\n\nThis simulator is designed for:\n- Computer Science courses on Artificial Intelligence\n- Reinforcement Learning workshops and tutorials\n- Interactive demonstrations of MDP concepts\n- Visual understanding of value iteration convergence\n\n## 🔧 Configuration\n\nThe grid world environment includes:\n- **Grid Size**: 4x3 with 1-based indexing\n- **Start Position**: (1,1)\n- **Wall**: (2,2) - impassable state\n- **Terminal States**: \n  - (4,2) = -1 reward (negative terminal)\n  - (4,3) = +1 reward (positive terminal)\n- **Step Reward**: -0.04 (configurable)\n- **Discount Factor**: 1.0 (configurable)\n\n## 🚀 Deployment\n\nThe application is automatically deployed to GitHub Pages using GitHub Actions:\n\n1. **Trigger**: Push to `main` branch\n2. **Build**: Next.js static export with optimization\n3. **Test**: Unit tests and E2E tests must pass\n4. **Deploy**: Automatic deployment to GitHub Pages\n\n## 📖 Algorithm Details\n\n### Value Iteration\n\nImplements the Bellman equation:\n```\nV(s) = R(s) + γ * max_a Σ P(s'|s,a) * V(s')\n```\n\nWhere:\n- `V(s)` = Value of state s\n- `R(s)` = Reward for state s\n- `γ` = Discount factor\n- `P(s'|s,a)` = Transition probability from state s to s' given action a\n\n### Movement Model\n\n- **Intended Action**: 80% probability\n- **Perpendicular Actions**: 10% each (left/right turn)\n- **Boundary Handling**: Stay in place if action would lead out of bounds\n- **Wall Collision**: Remain in current state\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit issues, feature requests, or pull requests.\n\n## 📄 License\n\nThis project is licensed under the ISC License.\n\n## 🙏 Acknowledgments\n\nBuilt for educational purposes to enhance understanding of reinforcement learning concepts through interactive visualization.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgracefullight%2Frl-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgracefullight%2Frl-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgracefullight%2Frl-agent/lists"}