Giter Club home page Giter Club logo

nlimb's Introduction

Jointly Learning to Construct and Control Agents using Reinforcement Learning

This code accompanies the paper Jointly Learning to Construct and Control Agents using Reinforcement Learning.

Arxiv Link: https://arxiv.org/abs/1801.01432

Dependencies

This code is build on top of OpenAI's Roboschool.

To install Roboschool follow the instructions at https://github.com/openai/roboschool

All other dependencies can be installed by calling: pip install -r requirements.txt

Experiments

Experiments are run by calling two scripts: init.py and train.py.

init.py

init.py initializes experiment directories and saves hyperparameters. See init.py for a full list of hyperparameters.

python init.py logdir --hyperparameter value ...

train.py

train.py starts or continues an experiment from the latest checkpoint.

python train.py logdir -s maxseconds --save_freq timesteps_per_checkpoint

Replicating the experiments in the paper

Pretrained models from our experiments are included with the release of this code.

Additionally, for each of the robot morphologies (Hopper, Walker, Ant) and each terrian type (level, inclined), our experiments can be replicated using the following commands

Level Terrain

python init.py logs/hopper_level --robot hopper --terrain flat
python train.py logs/hopper_level
python init.py logs/walker_level --robot walker --terrain flat
python train.py logs/walker_level
python init.py logs/ant_level --robot ant --terrain flat -t 1500000000 --steps_before_robot_update 200000000 --chop_freq 200000000
python train.py logs/ant_level

Inclined Terrain

python init.py logs/hopper_incline --robot hopper --terrain slope
python train.py logs/hopper_incline
python init.py logs/walker_incline --robot walker --terrain slope
python train.py logs/walker_incline
python init.py logs/ant_incline --robot ant --terrain slope -t 1500000000 --steps_before_robot_update 200000000 --chop_freq 200000000
python train.py logs/ant_incline

Evaluation and Visualization

The training script creates Tensorboard summaries in logdir/summaries. These can be visualized by launching Tensorboard:

tensorboard --logdir logdir/summaries

Additionally, two scripts are provided to evaluate and visualize checkpoints: eval.py and viz.py.

eval.py samples robot designs from the design distribution and computes episode statistics averaged over n episodes. Results are saved in logdir/eval

python eval.py logdir -t checkpoint -n nepisodes -s nsamples

viz.py renders or creates videos of the mode of the design distribution. Videos are saved in logdir/videos.

python viz.py logdir -t checkpoint -n nepisodes --save

nlimb's People

Contributors

cbschaff avatar jiahenghu avatar

Watchers

 avatar

Forkers

jiahenghu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.