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:Keywordoptions.
Options
:display_screen:trueorfalseto display screen. Defaults tofalse.:sound:trueorfalseto play sound. Defaults tofalse.:random_seed:Integerrandom 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:AtomorStringkey.val:String,Integer,Boolean, orFloatvalue.
Options
:repeat_action_probability:Floatprobability that agent will repeat action in next frame regardless of it's choice. Defaults to 0.:color_averaging:trueorfalseto enable color averaging. Defaults tofalse.:max_num_frames:Integermaximum frames to run. Defaults to0or no max.:max_num_frames_per_episode: maximum frames to run per episode. Defaults to0or no max.:frame_skip:Integerframe skipping rate. Defaults to1or no skip.:difficulty:Integergame difficulty. Defaults to0.:mode:Integergame 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:Integervalid action.