First, install box2d from source:
git clone https://github.com/jonasschneider/box2d-py/
cd box2d-py
python setup.py build
python setup.py install
Then, install visdom from source:
git clone https://github.com/facebookresearch/visdom
cd visdom
pip install -e .
easy_install .
Install TensorFlow and PyTorch following the instructions on the website.
Finally, check all required packages have been installed by
pip install -r requirements.txt
Train a cloned policy by
python imiatation.py --train --num_episodes [NUM_EPISODES] --log_dir [LOG_DIR]
where NUM_EPISODES
is the number of expert episodes in the training set.
Run python imitation.py -h
for more options.
First, start a visdom server by
python -m visdom.server
To train a REINFORCE agent with default parameters, run
python reinforce.py --task_name [TASK_NAME]
You can navigate to http://localhost:8097 to see the learning curve and other plots.
Run python reinforce.py -h
to see the hyperparameters that can be set.
First, start a visdom server by
python -m visdom.server
To train an A2C agent with default parameters, run
python a2c.py --task_name [TASK_NAME] -n [N]
where N
is the number bootstrapping steps.
You can navigate to http://localhost:8097 to see the learning curve and other plots.
Run python a2c.py -h
to see the hyperparameters that can be set.