baibonjwa / ale_ruby_interface

A ruby version of the arcade learning environment interface.

Home Page:https://rubygems.org/gems/ale_ruby_interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ale_ruby_interface

Gem Version

A ruby version of the arcade learning environment interface.

Description:

ale_ruby_interface is base on The Arcade Learning Environment and provide a ruby version interface.

Installation

ale_ruby_interface have dependency with following library.

Basic Installation

gem install ale_ruby_interface

Usages

require 'ale_ruby_interface'

ale = ALEInterface.new
# A.L.E: Arcade Learning Environment (version 0.6.0)
# [Powered by Stella]
# Use -help for help screen.
#  => #<ALEInterface:0x007fc7a4048238 @obj=#<FFI::Pointer # address=0x007fc7a267c990>>

ale.load_ROM('./pong.bin')
# Game console created:
#  ROM file:  ./pong.bin
#  Cart Name: Video Olympics (1978) (Atari)
#  Cart MD5:  60e0ea3cbe0913d39803477945e9e5ec
#  Display Format:  AUTO-DETECT ==> NTSC
#  ROM Size:        2048
#  Bankswitch Type: AUTO-DETECT ==> 2K


# WARNING: Possibly unsupported ROM: mismatched MD5.
# Cartridge_MD5: 60e0ea3cbe0913d39803477945e9e5ec
# Cartridge_name: Video Olympics (1978) (Atari)

# Running ROM file...
# Random seed is 0
#  => #<FFI::Pointer address=0x00000000000000>

action_set = ale.get_minimal_action_set() # => [0, 1, 3, 4, 11, 12]
ale.act(action_set[0]) # => 0
ale.get_screen_RGB() # => #<NMatrix:0x007f9d860d1d00 shape:[160,210,3] dtype:int16 stype:dense>

Documents

http://www.rubydoc.info/github/happybai/ale_ruby_interface/master

License

alm_ruby_interface is MIT licensed.

About

A ruby version of the arcade learning environment interface.

https://rubygems.org/gems/ale_ruby_interface

License:MIT License


Languages

Language:Ruby 100.0%