Car Dodging Gym

Watch a PPO2 agent play a car game in your browser!!!

Score: 0
How does it work?

Reinforcement Controlled Agent

A PPO model controls the car. It receives the game state as input (current lane, enemy lane, enemy y normalized) and decides which action to take (change lane left, change lane right, or go straight ahead) as output

ONNX Runtime Web

The game uses ONNX Runtime Web JS to execute the pre-trained AI model in your browser ONNX (Open Neural Network Exchange) is a standard format that allows pytorch onnx models to be run on many different platforms (specifically js). This means the AI is executing 100% locally on your machine

PPO2 (Proximal Policy Optimization)

The AI model was trained using a Reinforcement Learning algorithm specifically Proximal Policy Optimization. Learns by trial and error. It is rewarded for dodgin a car (15.0), alive per step (0.1), PENALTY_LANE_CHANGE (0.0), and penalized for crashing (-100)