| NeatRL Playground | AI Games Showcase powered by Reinforcement Learning |
Date:
๐ฎ AI Games Showcase
A beautiful, interactive website showcasing AI-powered games with reinforcement learning agents.
๐ Live Demo
- Website: Deploy on Vercel
- Game Server: Deploy on Render
- Game: Pong AI with Deep Q-Learning
๐๏ธ Project Structure
youtube-dueling-ai-pong/
โโโ Website/ # Main showcase website
โ โโโ index.html # Landing page
โ โโโ style.css # Styling
โ โโโ script.js # Interactions
โ
โโโ Games/ # Game collection
โ โโโ RL-PongGame/ # Pong AI game
โ โโโ frontend/ # Game UI
โ โโโ backend/ # WebSocket server (aiohttp)
โ โโโ training/ # RL training code
โ โโโ models/ # Trained models
โ
โโโ vercel.json # Vercel config (website)
โโโ render.yaml # Render config (game server)
โโโ README.md # This file
๐ Quick Start
Local Development
- Clone the repository
git clone https://github.com/YuvrajSingh-mist/NeatRL-Website.git cd NeatRL-Website - Start the game server
cd Games/RL-PongGame pip install -r requirements.txt python backend/server.py # Server runs on http://localhost:8765 # WebSocket at ws://localhost:8765/ws - Open the game
# Open frontend/index_websocket.html in your browser
๐ฆ Deployment
Deploy Website (Vercel)
The website deploys automatically on every push to master.
Deploy Game Server (Render)
The game server is configured via render.yaml for automatic deployment:
- Go to https://render.com โ Sign in with GitHub
- Click โNew +โ โ โBlueprintโ
- Select your repository
- Render will detect
render.yamland configure automatically - Click โApplyโ to deploy
What gets deployed:
- HTTP server on port 8765 (set by Renderโs PORT env variable)
- Health check endpoint at
/health - Status endpoint at
/status - WebSocket endpoint at
/ws - AI model loaded from
models/latest.pt
Environment (automatically configured):
- Python 3.13
- Headless mode (no display/audio required)
- All dependencies from
requirements.txt
The server will:
- โ Pass Renderโs health checks
- โ Handle WebSocket connections
- โ Run the AI game loop
- โ Serve multiple concurrent clients
๐ฎ Features
- โจ Beautiful UI - Modern, responsive design
- ๐ค AI-Powered - Deep Q-Learning trained agents
- โก Real-time - WebSocket communication
- ๐ฑ Responsive - Works on all devices
- ๐จ Smooth Animations - Parallax effects and transitions
- ๐ฅ Production Ready - Health checks, error handling, headless mode
๐ ๏ธ Tech Stack
Frontend
- HTML5 Canvas
- CSS3 (Grid, Flexbox, Animations)
- Vanilla JavaScript
- WebSocket API
Backend
- Python 3.13
- aiohttp (HTTP + WebSocket server)
- PyTorch (Deep Learning)
- Gymnasium (RL environment)
- Pygame (headless game engine)
Deployment
- Vercel (Static website)
- Render (Python game server)
๐ Troubleshooting
Server Issues
If deployment fails:
- Check logs in Render dashboard
- Verify model file exists at
Games/RL-PongGame/models/latest.pt - Test locally first:
cd Games/RL-PongGame PORT=8765 python backend/server.py # Should see: "Server running on http://0.0.0.0:8765"
WebSocket Connection Issues
If the game doesnโt connect:
- Check server status: Visit
https://your-app.onrender.com/status - Verify WebSocket URL in browser console
- Check CORS if hosting frontend elsewhere
๐ค Contributing
Contributions welcome! Feel free to:
- Add new AI games
- Improve UI/UX
- Optimize performance
- Fix bugs
๐ License
MIT License - feel free to use this project for learning and building!
๐ Show Your Support
Give a โญ๏ธ if you like this project!
Built with โค๏ธ using Reinforcement Learning