Skip to content

Latest commit

 

History

History

PPO Implementation with Cogment Enterprise

This folder contains an implementation of the Proximal Policy Optimization (PPO) algorithm using the Cogment framework for the classic Pong environment

Setup

Local

Prerequisites

  • 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)

Installation

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

Run

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

Docker

  • 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