Git Product home page Git Product logo

carlb15 / humans_and_rl_in_atari Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wuhoward/ccm_final

0.0 1.0 0.0 763 KB

In this project, we attempt to equip the agent with the recognition of basic components of an Atari game environment through curriculum learning—gleaned from human developmental psychology—and evaluate its performance. Our best agent was pre-trained on a carefully designed curriculum to learn to complete a new game 5x faster than regular agents. By analyzing our agent’s behavior, we can examine how it acquires knowledge and skills differently from humans.

Python 100.00%
human-priors reinforcement-learning atari-games atari python pygame

humans_and_rl_in_atari's Introduction

Incorporating Human Prior Knowledge to Reinforcement Learning Agent for Atari Games

In this project, we attempt to equip the agent with the recognition of basic components of an Atari game environment through curriculum learning—gleaned from human developmental psychology—and evaluate its performance. Our best agent was pre-trained on a carefully designed curriculum to learn to complete a new game 5x faster than regular agents. By analyzing our agent’s behavior, we can examine how it acquires knowledge and skills differently from humans.

This code is modified from https://github.com/uvipen/Street-fighter-A3C-ICM-pytorch. Specifically, the major changes are made in src/env.py. Please install PLE and the dependencies listed in requirements-dev.txt. Let me know if there is any bug. Thanks!

TL;DR

# running on CPUs
python train.py --num_processes 16 --map_file fire_3.txt --exp my_exp
python test.py --resume_path trained_models/my_exp/500K --map_file fire_3.txt
# visualize with tensorboard
tensorboard --logdir tensorboard --bind_all &

Notes:

  • I found that training speed on CPU is on par with GPU. Probably because of larger CPU memory and the on-policy training mechanism. CIMS's crunchy servers seems to be good choices.
  • Not recommend using to many processes, the A3C paper uses 16 processes.
  • --max_steps needs to be greater than 500 for longer exploration
  • Decreasing the learning rate and changing the weight (--lambda) for curiosity loss might be worth tuning.
  • The ICM paper uses --lr=1e-3. However, from my experiments it can't be that large.
  • Previous papers use --frame_skip=4.
  • Removing the null action (or set --num_action=5) doesn't help.
  • Adding negative rewards doesn't work on map.txt. It's worth looking into how to change the hyperparameters to make it work.
  • The initial position of the player can be changed by modifying self.playerPosition in board.py. However, I haven't figured out how to map coordinates in map.txt to the real position. So I currently just modify the the values and output the screen to see the effects.

Known Bugs:

  • Tensorboard cannot show results from every process, probably due to race condition?

humans_and_rl_in_atari's People

Contributors

carlb15 avatar wuhoward avatar

Watchers

 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.