First, install OpenAI Gym, PyTorch and Visdom.
Then, install the gridworld environment by running
pip install -e gridworldTo train an agent, first open visdom by running
python -m visdom.serverThen start training by running
python a2c_v2.pyand navigate to http://localhost:8097 to view the training plots.
To test the trained agent, run
python test.py --model [path_to_saved_model]Run python a2c_v2.py -h or python test.py -h to see more options.
You can also play with the environment yourself by running python play.py. Have fun!