Giter Club home page Giter Club logo

advantage_sum_mbrl's Introduction

Overview

Model-based reinforcement learning (MBRL) methods, particularly those based on model predictive control (MPC), leverage environment models to pre-plan actions before execution. MPC optimizes a scoring function to determine optimal actions. However, incorporating global information in the scoring function accelerates learning but introduces variance. This project addresses this issue by proposing the use of the sum of advantage functions (Sum-Advantage) as a scoring function, contrasting with the previously employed sum of state-action values (Sum-Value). Our experiments on one Gym environment show that...

Installation Guide

Follow these steps to set up the project on your local machine.

Environment Setup

You can install mujoco using this guideline.

Clone the Repository and navigate to the code directory:

git clone https://github.com/re0078/advantage_sum_mbrl.git
cd advantage_sum_mbrl

Create a Virtual Environment:

virtualenv --python=<path-to-python-3.8.18> venv
source venv/bin/activate
# or
conda create --name venv --python=python3.8.18
conda activate venv

Installing requirements:

pip install -r requirements.txt --force-reinstall

Running Experiments

Run the Main Experiment Script:

python main.py --env_id Hopper-v3 --instance_number [inst_num] --scoring_method [advantage|value]

You can view the logs in logs/<env_id>/<instance_number>/<scoring_method>/logs.txt.

Also, the rewards and the saved models are stored in checkpoints/<env_id>/<instance_number>/<scoring_method>.

You can modify hyperparameters in main.py for further exploration.

Debugging

  • If you face any issues while cythonizing mujoco_py module you can use this command:
python3.8.18 -m pip install "cython<3" 
  • Make sure you set the LD_LIBRARY_PATH environment variable to your mojuco bin files before running the main python script:
export LD_LIBRARY_PATH=<path-to-mujoco>/.mujoco/mujoco210/bin

Contributors

  • Amir Noohian
  • Alireza Isavand
  • Reza Abdollahzadeh

Acknowledgments

We would like to express our gratitude to Prof. Machado for his advice and guidance throughout the development of this project.

advantage_sum_mbrl's People

Contributors

alirezaisavand avatar re0078 avatar amir-noohian avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

amir-noohian

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.