ALEx v0.3.2 Alex View Source
(A)rcade (L)earning (E)nvironment for Eli(x)ir.
ALEx is an interface for the ALE in Elixir. There are two ways to interact with the ALE from ALEx: through the Alex.Interface
module which mimics the ALE C Lib and provides NIFs for interacting directly with the ALE C++ Interface, or through the Alex
module which is a safer wrapper of Alex.Interface
.
Alex
allows you to interact with the ALE without worrying about some of the lower level details of the ALE Interface. Every function in Alex
returns an Alex.Interface
struct which contains details about the current ALE Interface. See Alex.Interface
for information about the Interface struct.
Link to this section Summary
Functions
Checks if game is over.
Loads the specified ROM and populates fields in %Interface{}
.
Initializes a new ALE Interface.
Resets the interface to beginning of an episode.
Takes a screenshot.
Sets option for provided interface.
Sets interface to given state.
Performs a step with provided action
and updates the interface.
Link to this section Functions
Checks if game is over.
Returns boolean
.
Parameters
interface
:%Interface{}
.
Loads the specified ROM and populates fields in %Interface{}
.
Returns %Interface{}
.
Parameters
interface
:%Interface{}
.
Initializes a new ALE Interface.
Returns %Interface{}
.
Parameters
opts
:Keyword
options.
Options
:display_screen
:true
orfalse
to display screen. Defaults tofalse
.:sound
:true
orfalse
to play sound. Defaults tofalse
.:random_seed
:Integer
random seed.
Resets the interface to beginning of an episode.
Returns %Interface{}
.
Parameters
interface
:%Interface{}
.
Takes a screenshot.
Returns :ok
.
Parameters
interface
:%Interface{}
.
Sets option for provided interface.
Returns %Interface{}
.
Parameters
interface
:%Interface{}
to set option for.key
:Atom
orString
key.val
:String
,Integer
,Boolean
, orFloat
value.
Options
:repeat_action_probability
:Float
probability that agent will repeat action in next frame regardless of it's choice. Defaults to 0.:color_averaging
:true
orfalse
to enable color averaging. Defaults tofalse
.:max_num_frames
:Integer
maximum frames to run. Defaults to0
or no max.:max_num_frames_per_episode
: maximum frames to run per episode. Defaults to0
or no max.:frame_skip
:Integer
frame skipping rate. Defaults to1
or no skip.:difficulty
:Integer
game difficulty. Defaults to0
.:mode
:Integer
game mode. Defaults to0
.
Sets interface to given state.
Returns %Interface{}
.
Parameters
interface
:%Interface{}
.
Performs a step with provided action
and updates the interface.
Returns %Interface
.
Parameters
interface
:%Interface{}
.action
:Integer
valid action.