Giter VIP home page Giter VIP logo

th_rl's Introduction

th_rl

Pytorch-based package for multi-agent reinforcement learning in an iterated prisonner dilemma setting.

Installation

  • create python venv
python -m venv power_markets
power_markets\scripts\activate
  • install in local editable mode:
git clone https://github.com/nikitcha/th_rl
pip install -e th_rl
  • install as module from Github
pip install -U git+https://github.com/nikitcha/th_rl.git
  • if you want to install just dependencies:
pip install -r th_rl/requirements.txt

Usage - training

  • Create a set of training configs and store them somewhere, i.e. /some_path/configs
    • Configs should follow the structured laid out in 'example_config.json'
  • Run training with the follwing command:
    • This would run each config 20 times
    • Result will be stored under /some_path/runs
python main.py --cdir=/some_path/configs --runs=20  

Or if installed:

python -m th_rl.main.py --cdir=/some_path/configs --runs=20  

Usage - plot results

  • To plot a single trajectory:
python utils.py --dir=/some_path/runs/qtable_001/1 --fun=plot_experiment
  • To plot the mean of all [20] runs:
python utils.py --dir=/some_path/runs/qtable_001 --fun=plot_mean_result

Or if installed:

python -m th_rl.utils --dir=/some_path/runs/qtable_001 --fun=plot_mean_result

th_rl's People

Contributors

ceebios avatar nikitcha avatar

Watchers

 avatar

Forkers

hakimnessah

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.