Coder Social home page Coder Social logo

theovincent / directfutureprediction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from isl-org/directfutureprediction

0.0 0.0 0.0 188.75 MB

Code for the paper "Learning to Act by Predicting the Future", Alexey Dosovitskiy and Vladlen Koltun, ICLR 2017

License: Other

Python 100.00%

directfutureprediction's Introduction

Code for the paper "Learning to Act by Predicting the Future" by Alexey Dosovitskiy and Vladlen Koltun

If you use this code or the provided environments in your research, please cite the following paper:

@inproceedings{DK2017,
author    = {Alexey Dosovitskiy and Vladlen Koltun},
title     = {Learning to Act by Predicting the Future},
booktitle = {International Conference on Learning Representations (ICLR)},
year      = {2017}
}

Content

  • master branch contains the algorithm implementation, example experiment configuration files and ViZDoom environment definitions (.cfg and .wad) - around 10Mb in total
  • pretrained_models branch additionally contains pre-trained models for all examples, and corresponding log files - around 200 Mb in total
  • Clone only the master branch to avoid extra traffic

Dependencies:

  • ViZDoom
  • numpy
  • tensorflow
  • OpenCV python bindings
  • (optionally, cuda and cudnn)

Tested with:

  • Ubuntu 14.04
  • python 3.4
  • tensorflow 1.0
  • ViZDoom master branch commit ed25f236ac93fbe7f667d64fe48d733506ce51f4

Running the code:

  • Adjust ViZDoom path in doom_simulator.py

  • For testing, switch to the pretrained_models branch and run (using D3 as an example):

      cd examples/D3_battle
      python3 run_exp.py show
    
  • For training, run the following (using D2 as an example):

      cd examples/D3_battle
      python3 run_exp.py train
    
  • If you have multiple gpus, make sure that only one is visible with

      export CUDA_VISIBLE_DEVICES=NGPU
    

    where NGPU is the number of GPU you want to use, or "" if you do not want to use a gpu

  • For speeding things up you may want to prepend "taskset -c NCORE" before the command, where NCORE is the number of the core to be used, for example:

      taskset -c 1 python3 run_exp.py train
    

    When training with a GPU, one core seems to perform the best. Without a GPU, you may want 4 or 8 cores.

Remarks

  • For experiments in the paper we used a slightly modified ViZDoom version which provided a post-mortem measurement. This turns out to make a difference for training. For this reason, the results with this code and the default ViZDoom version may differ slightly from the results in the paper.

  • Results may vary across training runs: in our experiments, up to roughly 15%.

  • In battle scenarios, the reward provided by ViZDoom is the number of frags. For training the baseline approaches we did not use this reward, but rather a weighted average of the three measurements, same as for our approach, for a fair comparison.

Troubleshooting

Please send bug reports to Alexey Dosovitskiy [email protected]

directfutureprediction's People

Contributors

dosovits avatar linzichuan avatar vkoltun 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.