Giter VIP home page Giter VIP logo

learning-task-relevant-representations-via-rewards-and-real-actions-for-reinforcement-learning's Introduction

Learning Task-relevant Representations via Rewards and Real Actions for Reinforcement Learning

This is the code of paper Learning Task-relevant Representations via Rewards and Real Actions for Reinforcement Learning.

Requirements

pip install -r requirements.txt

Reproduce the Results on Distracting DeepMind Control

Move the background.py file to the /home/XXXX/miniconda3/envs/XXXX/lib/python3.6/site-packages/distracting_control directory.

Then run experiments on Cartpole-swingup with background distractions using our auxiliary task:

bash run.sh

Modify the --env argument in run.sh to specify a different task, employ the --agent argument to select a reinforcement learning agent from either the curl agent or the drq agent, utilize the --auxiliary argument to choose an auxiliary task between cresp and our method (denoted by rra), and utilize the -s argument to set the seed.

Reproduce the Results on CARLA

install CARLA

Please first install UE4.26 before installing CARLA.

Download CARLA from https://github.com/carla-simulator/carla/releases, e.g., https://carla-assets-internal.s3.amazonaws.com/Releases/Linux/CARLA_0.9.6.tar.gz.

Add to your python path:

export PYTHONPATH=$PYTHONPATH:/home/XXXX/CARLA_0.9.6/PythonAPI
export PYTHONPATH=$PYTHONPATH:/home/XXXX/CARLA_0.9.6/PythonAPI/carla
export PYTHONPATH=$PYTHONPATH:/home/XXXX/CARLA_0.9.6/PythonAPI/carla/dist/carla-0.9.8-py3.5-linux-x86_64.egg

Install:

pip install pygame
pip install networkx

Move the carla_env.py file to the /home/XXXX/CARLA_0.9.6/PythonAPI/carla/agents/navigation directory.

run experiments on CARLA

First open the CARLA engine:

Terminal 1:

cd CARLA_0.9.6
bash CarlaUE4.sh --RenderOffScreen --carla-rpc-port=1314 --fps=20

Then run experiments on CARLA using our auxiliary task:

Terminal 2:

bash runCarla096.sh

All experimental results will be stored under data directory.

Reference

Our code is modified based on:

  1. https://github.com/MIRALab-USTC/RL-CRESP.git
  2. https://github.com/facebookresearch/deep_bisim4control.git

learning-task-relevant-representations-via-rewards-and-real-actions-for-reinforcement-learning's People

Contributors

dmu-xmu avatar flora55 avatar

Stargazers

 avatar  avatar  avatar

Watchers

Kostas Georgiou 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.