Coder Social home page Coder Social logo

awac_iql's Introduction

Offline RL: AWAC & IQL

PyTorch Black

This repository contains a PyTorch implementation of two offline reinforcement learning algorithms:

  1. AWAC: Accelerating Online Reinforcement Learning with Offline Datasets
  2. Offline Reinforcement Learning with Implicit Q-Learning

Installation

Each algorithm is provided in two versions: a .py file and an .ipynb notebook. It is recommended to run the IPython versions directly in Google Colab. For the .py file to work, you need to install and set up d4rl and mujoco on your local machine. You can use the following command for installation:

 apt-get -qq update
 apt-get -qq install -y libosmesa6-dev libgl1-mesa-glx libglfw3 libgl1-mesa-dev libglew-dev patchelf
 mkdir ~/.mujoco
 wget -q https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz -O mujoco.tar.gz
 tar -zxf mujoco.tar.gz -C "$HOME/.mujoco"
 rm mujoco.tar.gz
 echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mujoco210/bin' >> ~/.bashrc
 echo 'export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libGLEW.so' >> ~/.bashrc
 echo "/root/.mujoco/mujoco210/bin" > /etc/ld.so.conf.d/mujoco_ld_lib_path.conf
 ldconfig
 pip3 install -U 'mujoco-py<2.2,>=2.1'
 touch .mujoco_setup_complete

Please note that we cannot guarantee that this script will successfully install all the required libraries on your local machine. If any values are missing in your ~/.bashrc file, an error will be reported upon launching.

To set up your local machine, you can also consider using the Dockerfile available at: https://github.com/tinkoff-ai/CORL/blob/main/Dockerfile

Training

To run training locally, execute the following command:

python3 iql.py --yaml_path=configs/iql/antmaze_medium_seed_0.yaml

Ensure that the yaml_path parameter contains the path to the .yaml file with the desired configuration.

Credits

This implementation draws significant inspiration from the following repositories:

awac_iql's People

Contributors

acforvs avatar

Watchers

 avatar  avatar

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.