Giter Club home page Giter Club logo

surprise-adaptive-agents's Introduction

πŸŽ‰ Surprise-Adaptive Intrinsic Motivation for Unsupervised Reinforcement Learning πŸš€

Official codebase for our paper Surprise-Adaptive Intrinsic Motivation for Unsupervised Reinforcement Learning, authored by Adriana Hugessen (*), Roger Creus Castanyer (*), Faisal Mohamed (*), and Glen Berseth.

πŸ“ Published at: Reinforcement Learning Conference 2024

🏫 Affiliations: Work conducted at Mila Quebec and Université de Montréal

πŸ“„ Full Paper: Read here

🌐 Project Website: Explore here

πŸ“œ Abstract

Both entropy-minimizing and entropy-maximizing objectives for unsupervised reinforcement learning (RL) have been shown to be effective in different environments, depending on the environment's level of natural entropy. However, neither method alone results in an agent that will consistently learn intelligent behavior across environments. In an effort to find a single entropy-based method that will encourage emergent behaviors in any environment, we propose an agent that can adapt its objective online, depending on the entropy conditions it faces in the environment, by framing the choice as a multi-armed bandit problem. We devise a novel intrinsic feedback signal for the bandit, which captures the agent's ability to control the entropy in its environment. We demonstrate that such agents can learn to optimize task returns through entropy control alone in didactic environments for both high- and low-entropy regimes and learn skillful behaviors in certain benchmark tasks.

πŸ› οΈ Installation

# clone the repo 
git clone https://github.com/roger-creus/surprise-adaptive-agents.git
cd surprise-adaptive-agents
# install requirement via conda
conda create --name s_adapt python=3.9.18
pip install -r requirements.txt
pip install -e .

πŸ§ͺ Running Experiments

To launce an experiments you can run the following

python scripts/cleanrl_dqn.py --env_id=griddly-ButterfliesEnvLarge --model=sadapt-bandit --buffer_type=bernoulli 1 --normalize_int_reward=1 --soft_reset=0 --total_timesteps=15_000_000 --exploration_fraction=0.5 

Check the file gymnasium_wrappers/args.py to knwo more about the algorithm hyperparametrs.

🌍 Supported Environments

Environment name ID
Large Butterflies griddly-ButterfliesEnvLarge
Small Butterflies griddly-ButterfliesEnv
Small Maze griddly-MazeEnv
Large Maze griddly-MazeEnvLarge
Breakout(MinAtar) MinAtar/Breakout
Freeway(MinAtar) MinAtar/Freeway
Seaquest(MinAtar) MinAtar/Seaquest
SpaceInvaders(MinAtar) MinAtar/SpaceInvaders
Asterix(MinAtar) MinAtar/Asterix

surprise-adaptive-agents's People

Contributors

faisalahmed0 avatar roger-creus avatar ahugs avatar

Stargazers

 avatar

Watchers

 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.