🚀 Inspiration -We were inspired by the idea of teaching AI to master platforming games—just like human players learn through trial and error. By integrating reinforcement learning into a classic game, we wanted to explore how AI could optimize movement, avoid obstacles, and reach a goal efficiently.
🎮 What It Does -Our AI-controlled Mario learns the best path to the flag through Proximal Policy Optimization (PPO). The AI makes real-time decisions, navigates platforms, avoids Goombas, and adapts to challenges, all while improving its strategy through reinforcement learning.
🛠️ How We Built It -Frontend: React + TypeScript + Vite for a real-time game interface. -Backend: FastAPI + WebSockets for AI processing and streaming. -AI Model: Stable-Baselines3 (PPO) trained in a custom Gym environment using OpenCV for rendering.
⚡ Challenges We Ran Into -AI initially kept running left instead of toward the goal. -Collision detection issues with the Goomba required fine-tuning hitboxes. -Balancing rewards to ensure AI learns optimal movement without unintended behaviors.
🏆 Accomplishments We're Proud Of -Successfully built an AI that learns to complete levels dynamically. -Replaced Pygame with OpenCV for better AI processing. -Implemented real-time gameplay streaming with WebSockets.
📚 What We Learned -Fine-tuning rewards is crucial for reinforcement learning. -AI can develop unexpected strategies if not trained carefully. -WebSockets are highly effective for streaming AI gameplay.
🚀 What's Next for Untitled -More complex levels with moving obstacles and power-ups. -Train AI with human-like behavior (e.g., speedruns, adaptive difficulty). -Deploy a web-based AI playground for users to experiment with AI learning.
Built With
- baselines3
- fastapi
- gym
- opencv
- phaser.js
- react
- typescript
- uvicorn
- vite
- websockets
Log in or sign up for Devpost to join the conversation.