This example shows how to install TensorFlow agents and use it on custom environments, such as the environments that come with PyBullet.
It works for both Python 3 and Python 2. Just replace pip3 and python3 with
pip2 and python2.
Set up the dependencies:
sudo pip3 install -U tensorflow
sudo pip3 install -U gym
sudo pip3 install -U ruamel.yamlInstall TensorFlow agents from PyPi:
sudo pip3 install agentsInstead, if you want to hack the code, clone the repository:
git clone [email protected]:tensorflow/agents.git
cd agents
sudo python3 setup.py developRun the script to train an agent:
python3 agents_example.py --mode train --logdir ~/experiments/agents --config pybullet_antLaunch TensorBoard to visualize training:
tensorboard --logdir=~/experiments/agentsDuring or after training, use this script to render videos:
python3 agents_example.py visualize ~/experiments/agents/ppo_on_pybullet_ant