
MyAcrobot - Physics-Driven AI Olympics
"MyAcrobot" is a 2 dimensional physics-based AI Olympics game where players step into the role of coach Ed Burns and team up with AI gymnast Trent Dimas to compete in the high bar event.
- Core Gameplay
- The game is set on a 2D grid with x and y coordinates, where Trent (the AI gymnast) is represented as a pendulum, with his hands attached to a fixed point—the bar—at the center of the grid.
- Trent's goal is to perform a full rotation over the bar
- Players goal is to tell Trent when to dismount to land in the target goal zone within time until landing countdown timer and give Trent the extra push to rotate over the bar and help align his torso and legs.
- Players also have the option to disable the AI and take full control of Trent. By selecting "Switch Off AI" from the menu, the coacwh assumes complete control over Trent’s movements with the AI toggle switch
- Landing at least one pendulum link in the target zone.
- Earning alignment points for precise positioning.
- Completing an over-the-bar motion (full rotation not required) for bonus points.
- Username: Choose a clever username to represent yourself or generate a random one using the open-source Chance.js library.
- Difficulty Levels: Easy (1 goal), Medium (2 goals), Hard (3 goals), Expert (4 goals).
- Environmental Customization: Players can tailor gameplay to their preferences and create unique challenges for themselves and the AI by adjusting:
- Number of pendulum links
- Air friction level
- Pendulum length
- Pendulum width
- Image not found
Congrats
- Reinforcement learning AI
- High Reward: Achieved by flipping above the bar (y > 0.0).
- Moderate Reward: Granted for nearing the bar (-1.5 < y ≤ 0.0).
- Penalty: Issued for remaining below the bar (y ≤ -1.5).
- Image not found
Reward
- Scalable virtual machine for backend operations.
- Hosted both front-end and back-end with WebSocket support for real-time updates.
- Facilitated reinforcement learning model training and Docker hosting.
- Easy setup with SSH, SSL certificates, and Python integration for security.
- Enabled cross-platform access for desktop and mobile players.
- Reliable, high-availability hosting for website and backend operations.
Stored trained reinforcement learning models for version control and selecting the best model during training.
Purpose: My Copilot on this journey
- AI Optimization: Fine-tuned AI models under various environmental conditions for realistic and engaging gameplay.
- Rapid Prototyping: Streamlined development and reduced time required to optimize AI decision-making and adaptability.
- Code Assistance: Provided creative coding solutions, including alternatives for complex tasks, and suggested unique features like confetti animations for wins.
- Efficient Debugging: Helped navigate large codebases (e.g., 1,000+ line JS files), simplifying debugging and customization for mobile-friendly, responsive designs with custom controls.
- Enhanced Workflow:
- Supported front-end/back-end integration and WebSocket setup for fast state exchanges.
- Enabled quick fixes for tasks like storage upgrades, port management, and cross-browser compatibility.
- User-Friendly Tools:
- Allowed intuitive interaction through features like code highlighting in VS Code and keyboard shortcuts for efficient communication.
- Worked alongside Jupyter Notebook for better model training integration.
- Implementing a custom reward system, replay buffer, and fine-tuning a Deep Q-Network (DQN).
- Understanding advanced concepts like geometry, non-linear equations, and reward systems.
- Resolving the lack of clarity in Gymnasium documentation through extensive problem-solving.
- Synchronizing the front-end with AI using WebSocket connections for real-time updates.
- Ensuring cross-platform compatibility with responsive design for desktop and mobile devices.
- Balancing AI independence with pauses for player coaching feedback.
- Making a game work across multiple browsers and devices.
- Knowing when to disable touch controls for mobile devices during screen overlays