Git Product home page Git Product logo

lanqingli1993 / focal-latest Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 2.46 MB

We provide an updated reproducible version of FOCAL due to some reported issues for the original codebase https://github.com/LanqingLi1993/FOCAL-ICLR. We thank the authors of CORRO (https://github.com/PKU-RL/CORRO) for sharing their own implementation!

License: MIT License

Python 99.22% Ruby 0.75% Shell 0.04%

focal-latest's Introduction

Requirements

pytorch==1.6.0, mujoco-py==2.0.2.13 All the requirments are specified in requirements.txt

Data Collection

Run the following script in a bash.

for seed in {1..40}
do
	python train_data_collection.py --env-type cheetah_vel --save-models 1 --log-tensorboard 1 --seed $seed
done

Data collection program uses SAC algorithm to collect offline data, hyperparameters can be accessed and modified at data_collection_config

Mujoco Environment Installation

Ant and Cheetah environments need mujoco210. Refer to https://github.com/openai/mujoco-py for more details about mujoco210 installation.

Walker and Hopper environments need mujoco131. Download mjpro131 and mjkey from https://www.roboti.us/download.html, extract them into ~/.mujoco/mjpro131, and set export MUJOCO_PY_MJPRO_PATH=~/.mujoco/mjpro131, then mujoco131 is ready to go.

Be aware that the environment variable of mujoco131 MUJOCO_PY_MJPRO_PATH is different from mujoco210 MUJOCO_PY_MUJOCO_PATH. Please discern them to avoid potential errors.

Run FOCAL

python train_offline_FOCAL.py --env-type cheeta_vel

Change the argument --env-type to choose a different environment:

Environment Argument
Half-Cheetah-Vel cheetah_vel
Half-Cheetah-Dir cheetah_dir
Ant-Dir ant_dir

Hyperparameters of FOCAL can be modified at offline_rl_config

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.