This folder contains an implementation of the Proximal Policy Optimization (PPO) algorithm using the Cogment framework for the classic Pong environment
- Python 3.9
- Cogment Enterprise Python SDK 0.4.0 (at the moment this needs to be retrieved from AIR as an archive file
cogment-enterprise-0.4.0.tar.gz
)
Run the following:
$ ./install.sh
This will create a virtual env in ./.venv
and install Cogment and the python dependencies in it, accept the Atari license and run Cogment code generation.
Alternatively these steps can be followed manually
- Install Cogment by following these instructions
- Install Python dependencies
pip install -r requirements.txt ./cogment-enterprise-0.4.0.tar.gz
- Activate Pong Atari environment
AutoROM --accept-license
- Generate cogment settings
python -m cogment.generate --spec=cogment.yaml --output=cog_settings.py
Do not forget to run that in the desired environment. In particular if you used the install script run
source .venv/bin/activate
cogment launch -qq ./launch.yaml
- Build docker. Note that it is required to have access to
cogment-enterprise.tar.gz
docker build -f Dockerfile -t ppo_bench:latest .
- Run docker
docker run --rm -it ppo_bench:lastest