Skip to content

brollb/zero_ad_rl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RL Explorations in 0 AD

This repository contains experimental code exploring different applications of RL in 0 AD.

Quick Start

First, clone the repo and install the python package locally.

pip install -e .

Next, install 0 AD (version > 0.23) and the mod containing the custom maps. Next, run an instance of the latest version of 0 AD (post 0.23) locally:

pyrogenesis --rl-interface=0.0.0.0:6000 --autostart-nonvisual --mod=rl-scenarios --mod=public

Next, train an agent using

python -m zero_ad_rl.train --env CavalryVsInfantry --run PPO --checkpoint-freq 100

Finally, generate some rollouts. (First, you may want to shutdown 0 AD and run it w/o the --autostart-nonvisual command.) To run an agent from a given checkpoint, use the following command:

python -m zero_ad_rl.rollout ~/ray_results/path/to/checkpoint/file --env CavalryVsInfantry --run PPO --steps 5000

Environments

This contains a few different gym environments which use slightly different observation and action spaces:

  • CavalryVsInfantry:
  • MinimapCavVsInf:
  • SimpleMinimapCavVsInf:

About

This repo contains experimental code for exploring applications of RL in 0 AD (using RLlib).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages