Code Monkey home page Code Monkey logo

daai22-rl's Introduction

Starting code for course project of Data Analysis and Artificial Intelligence (DAAI) 2022

"Sim-to-Real transfer of Reinforcement Learning policies in robotics" exam project.

Note! This template has changed on Dec 21st, 2022. Make sure to clone the latest version.

Getting started

You can play around with the code on your local machine, and use Google Colab for training on GPUs. When dealing with simple multi-layer perceptrons (MLPs), you can even attempt training on your local machine.

Before starting to implement your own code, make sure to:

  1. read and study the material provided
  2. read the documentation of the main packages you will be using (mujoco-py, Gym, stable-baselines3)
  3. play around with the code in the template to familiarize with all the tools. Especially with the test_random_policy.py script.

1. Local (Linux)

You can work on your local machine directly. By doing so, you will also be able to render the Mujoco environments and visualize what's happening. This code has been tested on Linux with python 3.7 (Windows is somewhat deprecated, but may work also).

Dependencies

  • Install MuJoCo and the Python Mujoco interface following the instructions here: https://github.com/openai/mujoco-py
  • Run pip install -r requirements.txt to further install Gym and Stable-baselines3.

Check your installation by launching python test_random_policy.py.

1. Local (Windows)

As the latest version of mujoco-py is not compatible for Windows, you may:

  • Try downloading a previous version (not recommended)
  • Try installing WSL2 (requires fewer resources) or a full Virtual Machine to run Linux on Windows. Then you can follow the instructions above for Linux.
  • Stick to the Google Colab template (see below), which runs on the browser regardless of the operating system. This option, however, will not allow you to render the environment in an interactive window for debugging purposes.

2. Google Colab

You can also run the code on Google Colab

  • Download all files contained in the colab_template folder in this repo.
  • Load the test_random_policy.ipynb file on https://colab.research.google.com/ and follow the instructions on it

NOTE 1: rendering is currently not officially supported on Colab, making it hard to see the simulator in action. We recommend that each group manages to play around with the visual interface of the simulator at least once, to best understand what is going on with the Hopper environment.

NOTE 2: you need to stay connected to the Google Colab interface at all times for your python scripts to keep training.

daai22-rl's People

Contributors

gabrieletiboni 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.