This is an implementation of ping-pong game described in the ASM whitepaper with the following goals in mind.
- Paddi game to demonstrate ASM protocol
- Validate python could be used for game and RL training
- Simple enough project structure for Game Devs and ML Engineers to work together. Game devs should be able to train and configure while ML engineers could alter the game for their experiments.
- Ability to run off a notebook for faster iteration, without having to depend on complex infrastructure.
-
Please refer to Python Setup for instructions on python dev environment setup.
-
Suggest installing AWS Toolkit for VSCode for visualizing step functions.
The project is structured in three layers.
-
Simulation - Simulation defines the core logic for running the paddi game. This is not dependent on any rendering concerns (PyGame) or AI (no PyTorch).
Components:
- Core simulation
- Simulation Config
- Physics objects
- Events
- Controllers
-
Env This is the OpenAI Gym environment that is dependent on the Simulation. The Env is de-coupled on the Renderer.
Components:
- Core environment
- Env Config
- Rewards
- Opponents
-
Renderer This is a light weight renderer we use during development to debug and
Components
- PyGame renderer
- Pymunk debug renderer (used to debug physics objects)
+-----+ +------------+ +----------+ | Env | -------> | Simulation | <------- | Renderer | +-----+ +------------+ +----------+