An example project demonstrating how the Autonomous Learning Library can be used to build new reinforcement learning agents.

Overview

About

This repository shows how Autonomous Learning Library can be used to build new reinforcement learning agents. In particular, it contains a model based agent that predicts future frames and uses them to guide decision making.

Instructions

First, you'll need the latest version of Pytorch. If you wish to view Tensorboard logs, you'll also need to grab a copy of that (it also comes with tensorflow). Then, you'll need to install the autonomous-learning-library along with the Atari environments:

pip install autonomous-learning-library[atari]

Unfortunately, the current IP holders for the Atari library made it more difficult to acquire a license and use the ROMs than it used to be. If you have a license to use the ROMs, you can try AutoROM.

Usage

You can run the agent as well as a baseline DQN agent using:

python main.py Pong

You can track progress using:

tensorboard --logdir runs

Once the script has finished (could take a long time, especially if you do not have a fast GPU!), you can see the final results using:

python plot.py

Results

For us, the above instructions produced the following results:

results

As you can see, this agent isn't very good! On the other hand, the purpose of this agent was not performance, but to demonstrate the utility of the autonomous-learning-library in developing new agents not included in the original library. Maybe you can come up with ways of improving this agent!

You might also like...
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation, with emphasis on pick and place. It features a Gym-like API with 10 tabletop rearrangement tasks, each with (i) a scripted oracle that provides expert demonstrations (for imitation learning), and (ii) reward functions that provide partial credit (for reinforcement learning).

ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge (ManiSkill Challenge), a large-scale learning-from-demonstrations benchmark for object manipulation.

ManiSkill-Learn ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge, a large-scale learning-from-dem

The aim of this project is to build an AI bot that can play the Wordle game, or more generally Squabble

Wordle RL The aim of this project is to build an AI bot that can play the Wordle game, or more generally Squabble I know there are more deterministic

Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX
Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX

CQL-JAX This repository implements Conservative Q Learning for Offline Reinforcement Reinforcement Learning in JAX (FLAX). Implementation is built on

Reinforcement-learning - Repository of the class assignment questions for the course on reinforcement learning

DSE 314/614: Reinforcement Learning This repository containing reinforcement lea

An example to implement a new backbone with OpenMMLab framework.

Backbone example on OpenMMLab framework English | 简体中文 Introduction This is an template repo about how to use OpenMMLab framework to develop a new bac

Trading environnement for RL agents, backtesting and training.

TradzQAI Trading environnement for RL agents, backtesting and training. Live session with coinbasepro-python is finaly arrived ! Available sessions: L

Lux AI environment interface for RLlib multi-agents
Lux AI environment interface for RLlib multi-agents

Lux AI interface to RLlib MultiAgentsEnv For Lux AI Season 1 Kaggle competition. LuxAI repo RLlib-multiagents docs Kaggle environments repo Please let

PyTorch implementation of our ICCV 2021 paper, Interpretation of Emergent Communication in Heterogeneous Collaborative Embodied Agents.
PyTorch implementation of our ICCV 2021 paper, Interpretation of Emergent Communication in Heterogeneous Collaborative Embodied Agents.

PyTorch implementation of our ICCV 2021 paper, Interpretation of Emergent Communication in Heterogeneous Collaborative Embodied Agents.

Comments
  • Can't instantiate abstract class Experiment with abstract methods episode, frame, test, train

    Can't instantiate abstract class Experiment with abstract methods episode, frame, test, train

    Hi, I followed your instructions and got this error:

    $ python main.py Pong
    Traceback (most recent call last):
      File "main.py", line 33, in <module>
        run()
      File "main.py", line 26, in run
        Experiment(model_predictive_dqn(device=args.device), env, frames=args.frames)
    TypeError: Can't instantiate abstract class Experiment with abstract methods episode, frame, test, train
    

    Do you know what is the problem?

    opened by fatemehN 2
  • .eval() does not put torch in no_grad mode

    .eval() does not put torch in no_grad mode

    https://github.com/cpnota/all-example-project/blob/eb90aa7bbc8c076239dbfdd301a995c662562093/agent.py#L65

    Choose the best action in the current state using our model predictions. Note that every call below uses .eval(), which puts torch in no_grad mode, and sometimes changes their behavior.

    .eval() does not put torch in no_grad mode, but only allows some modules (such as BatchNorm or Dropout) to go into eval() mode.

    opened by mctigger 1
Owner
Chris Nota
PhD student studying reinforcement learning at UMass Amherst.
Chris Nota
AI virtual gym is an AI program which can be used to exercise and can be used to see if we are doing the exercises

AI virtual gym is an AI program which can be used to exercise and can be used to see if we are doing the exercises

null 4 Feb 13, 2022
This project uses reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can learn to read tape. The project is dedicated to hero in life great Jesse Livermore.

Reinforcement-trading This project uses Reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can

Deepender Singla 1.4k Dec 22, 2022
Pacman-AI - AI project designed by UC Berkeley. Designed reflex and minimax agents for the game Pacman.

Pacman AI Jussi Doherty CAP 4601 - Introduction to Artificial Intelligence - Fall 2020 Python version 3.0+ Source of this project This repo contains a

Jussi Doherty 1 Jan 3, 2022
Neon-erc20-example - Example of creating SPL token and wrapping it with ERC20 interface in Neon EVM

Example of wrapping SPL token by ERC2-20 interface in Neon Requirements Install

null 7 Mar 28, 2022
Example-custom-ml-block-keras - Custom Keras ML block example for Edge Impulse

Custom Keras ML block example for Edge Impulse This repository is an example on

Edge Impulse 8 Nov 2, 2022
Python-kafka-reset-consumergroup-offset-example - Python Kafka reset consumergroup offset example

Python Kafka reset consumergroup offset example This is a simple example of how

Willi Carlsen 1 Feb 16, 2022
Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression

Quantile Regression DQN Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression (https://arx

Arsenii Senya Ashukha 80 Sep 17, 2022
banditml is a lightweight contextual bandit & reinforcement learning library designed to be used in production Python services.

banditml is a lightweight contextual bandit & reinforcement learning library designed to be used in production Python services. This library is developed by Bandit ML and ex-authors of Facebook's applied reinforcement learning platform, Reagent.

Bandit ML 51 Dec 22, 2022