ale

Crates.ioale
lib.rsale
version0.1.3
sourcesrc
created_at2020-02-07 18:01:48.834043
updated_at2020-05-06 18:40:48.621516
descriptionA Rust encapsulation of the Arcade Learning Environment
homepagehttps://github.com/trolleyman/ale-rs
repositoryhttps://github.com/trolleyman/ale-rs
max_upload_size
id205911
size426,215
Callum Tolley (trolleyman)

documentation

https://docs.rs/ale

README

ale

A Rust interface to the Arcade Learning Environment.

Some games such as Breakout, Asteroids, MsPacman and Space Invaders are bundled into the libarary, so that anyone using it can run them. A full list is at https://github.com/trolleyman/ale-rs/blob/master/src/lib.rs#L353-L430.

Requirements

Breakout example

For an example of the Atari playing Breakout, run this command:

cargo run --release --example breakout

Controls:

  • P: Toggle pause
  • A/Left: Move paddle left
  • D/Right: Move paddle right
  • Space: "Fire" key (trigger ball)
  • R: Reset game

ale-sys

Rust bindings to the Arcade Learning Environment, with a few tweaks. See https://github.com/trolleyman/Arcade-Learning-Environment.

Differences:

  • zlib is vendored so that compilation is easier
  • The C library is statically linked

xtask

xtask is a small sub-project used for development. Subcommands can be run by running cargo xtask <subcommand> in the root of the repository.

There are two subcommands: gen-bindings and download-roms.

gen-bindings generates the ale-sys/src/bindings.rs file, and requires clang to be installed.

download-roms downloads the bundled Atari ROMs and outputs them in the roms/ folder, that is then included in the binary via. include_bytes!. This is meant to protect me against copyright infringement. It's a similar technique used by atari-py.

Commit count: 73

cargo fmt