Giter Club home page Giter Club logo

arcadelearningenvironment.jl's Introduction

ArcadeLearningEnvironment.jl

This package is a Julia wrapper for the ArcadeLearningEnvironment (ALE).

ALE is a modified emulator for the Atari 2600 that can emulate around 50 games with additional access to game state information and in-game rewards. This is useful for learning and benchmarking artificial intelligence agents playing computer games.

A higher-level interface on top of this package is available thanks to Tom Breloff, at the AtariAlgos.jl repository.

Citation

If you use this package for research publications, please cite the following paper to acknowledge the work that went into ALE.

@ARTICLE{bellemare13arcade,
	author = {{Bellemare}, M.~G. and {Naddaf}, Y. and {Veness}, J. and {Bowling}, M.},
	title = {The Arcade Learning Environment: An Evaluation Platform for General Agents},
	journal = {Journal of Artificial Intelligence Research},
	year = 2013,
	month = 06,
	volume = 47,
	pages = {253--279}
}

Installation

On Mac OS and Linux the package automatically downloads and builds version 0.5.1 of the ArcadeLearningEnvironment by issuing the following commands.

Pkg.clone("https://github.com/nowozin/ArcadeLearningEnvironment.jl.git")
Pkg.build("ArcadeLearningEnvironment")

On Windows (which I have not tried yet) you can build the libale_c.dll file manually and set the LIBALE_HOME environment variable to the directory containing this file. Then, the above two commands should work as well. Note that this is untested and any correction or feedback is welcome.

Example

using ArcadeLearningEnvironment

# For this example you need to obtain the Seaquest ROM file from
# https://atariage.com/system_items.html?SystemID=2600&ItemTypeID=ROM

episodes = 50

ale = ALE_new()
loadROM(ale, "SEAQUEST.BIN")

S = Array(Int, episodes)
TR = Array(Float64, episodes)
for ei = 1:episodes
    ctr = 0.0

    fc = 0
    while game_over(ale) == false
        actions = getLegalActionSet(ale)
        ctr += act(ale, actions[rand(1:length(actions))])
        fc += 1
    end
    reset_game(ale)
    println("Game $ei ended after $fc frames with total reward $(ctr).")

    S[ei] = fc
    TR[ei] = ctr
end
ALE_del(ale)

arcadelearningenvironment.jl's People

Contributors

d9w avatar nowozin avatar staticfloat avatar tbreloff avatar tkelman 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.