Giter VIP home page Giter VIP logo

a3c-1's Introduction

a3c

使用PyTorch實作a3c演算法,參考了openai/universe-starter-agen以tensorflow實作的版本,以及ikostrikov/pytorch-a3c以PyTorch實作的版本。
以ikostrikov為主要參考,加上自行修改的一些部分,並以盡量精簡行數、寫出容易理解的code為目標。

Dependencies

  • Python 3.6
  • Anaconda
  • PyTorch
  • gym
  • gym[atari]
  • opencv-python

Getting Started

以下以Ubuntu 16.04 LTS環境為準,安裝Anaconda時請一路Enter與Yes到底。

wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
bash Anaconda3-4.4.0-Linux-x86_64.sh
source .bashrc
conda install pytorch torchvision -c soumith
conda install opencv
conda install libgcc
pip install gym[Atari]
sudo apt-get update
sudo apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libboost-all-dev libsdl2-dev swig

Rendering on a server

如果是跑在server上,需要依靠xvfb創造虛擬畫面支持rendering。

xvfb-run -s "-screen 0 1400x900x24" python main.py --env-name "Pong-v0" --num-processes 16

Architecture

Result

使用16顆cpu在GCP上跑2個小時。

References

Asynchronous Methods for Deep Reinforcement Learning
openai/universe-starter-agen
ikostrikov/pytorch-a3c

a3c-1's People

Contributors

nailo2c avatar

Watchers

 avatar  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.