Giter Club home page Giter Club logo

safe-adaptation-agents's Introduction

Safe Adaptation Agents

Baseline algorithms for the safe-adaptation-gym benchmark.

Install

  1. Open a new terminal and git clone the repo.
  2. Create a new environment with your favorite environment manager (venv, conda). Make sure to have it set up with python >= 3.8.13.
  3. Install dependencies with cd safe-adaptation-agents && pip install ..

Run

Let's reporduce the experiments for the benchmark.

The following command runs the on-policy algorithms:

 python scripts/adaptation_experiment.py --configs defaults multitask on_policy"  --agent <insert agent> --seed <insert seed>

where $\texttt{seed} \in \lbrace1,2, \dots, 10\rbrace$ and $\texttt{agent} \in \lbrace$maml_ppo_lagrangian, rl2_cpo, rarl_cpo$\rbrace$

Similarly, to run the model-based algorithms:

 python scripts/adaptation_experiment.py --configs defaults multitask model_based"  --agent <insert agent> --seed <insert seed>

where $\texttt{agent} \in \lbrace$la_mbda, carl$\rbrace$

To run an agent on a specific task:

 python scripts/no_adaptation_experiment.py --configs defaults no_adaptation" --agent <insert agent> --task <insert task>

where $\texttt{task} \in \lbrace$go_to_goal, dribble_ball, collect, push_box, haul_box, press_buttons, catch_goal, roll_rod$\rbrace$ In our experiments, we used cpo as our agent.

More generally, every parameter in the configs.yaml file can be easily changed when running either scripts/no_adaptation_experiment.py or scripts/adaptation_experiment.py by appending --parameter when running the script.

Benchamrk

We provide the results for our experiments and a jupyter-notebook that summarizes them in the benchmark folder.

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.