ArcadeLearningEnvironment.ALE_del
— MethodALE_del(ale_instance::ALEPtr)
Destroys the passed ALE instance pointer. Acts as a destructor. Use with caution.
ArcadeLearningEnvironment.ALE_new
— MethodALE_new()
Creates a new ALE instance.
ArcadeLearningEnvironment.act
— Methodact(ale_instance::ALEPtr, action::Integer)
Applies an action to the game and returns the reward. It is the user's responsibility to check if the game has ended and reset when neccessary - this function will keep pushing buttons on the game over screen.
ArcadeLearningEnvironment.cloneState
— MethodcloneState(ale_instance::ALEPtr)
This makes a copy of the environment state. This copy does not include pseudorandomness, making it suitable for planning purposes.
See also: cloneSystemState
ArcadeLearningEnvironment.cloneSystemState
— MethodcloneSystemState(ale_instance::ALEPtr)
This makes a copy of the system & environment state, suitable for serialization. This includes pseudorandomness and so is not suitable for planning purposes.
ArcadeLearningEnvironment.game_over
— Methodgame_over(ale_instance::ALEPtr)
Returns a boolean value that tells whether the game is over. Any actions performed from hereon until the next reset_game()
have no effect.
ArcadeLearningEnvironment.getBool
— MethodgetBool(ale_instance::ALEPtr, key::String)
Returns the boolean value held by the ALE instance's field with the same name as key
.
ArcadeLearningEnvironment.getEpisodeFrameNumber
— MethodgetEpisodeFrameNumber(ale_instance::ALEPtr)
Returns the frame number since the last reset.
ArcadeLearningEnvironment.getFloat
— MethodgetFloat(ale_instance::ALEPtr, key::String)
Returns the float value held by the ALE field with the same name as key
.
ArcadeLearningEnvironment.getFrameNumber
— MethodgetFrameNumber(ale_instance::ALEPtr)
Returns the frame number since the ALE instance was created.
ArcadeLearningEnvironment.getInt
— MethodgetInt(ale_instance::ALEPtr, key::String)
Returns the integer value held by the ALE instance's field with the same name as key
.
ArcadeLearningEnvironment.getLegalActionSet
— MethodgetLegalActionSet(ale_instance::ALEPtr)
Returns the vector of the legal set of actions needed the play the game. Not to be confused with getMinimalActionSet
.
See also: getMinimalActionSet
ArcadeLearningEnvironment.getLegalActionSize
— MethodgetLegalActionSize(ale_instance::ALEPtr)
Returns the size of the legal action set. Not to be confused with getMinimalActionSet
.
See also: getLegalActionSize
ArcadeLearningEnvironment.getMinimalActionSet
— MethodgetMinimalActionSet(ale_instance::ALEPtr)
Returns the set of actions that actually affect the game. Not to be confused with getLegalActionSet
.
See also: getLegalActionSet
ArcadeLearningEnvironment.getMinimalActionSize
— MethodgetMinimalActionSize(ale_instance::ALEPtr)
Returns the size of the minimal action set required to play the game. Not to be confused with getLegalActionSize
.
See also: getLegalActionSize
ArcadeLearningEnvironment.getRAM
— MethodgetRAM(ale_instance::ALEPtr)
Returns the snapshot of the RAM as a vector.
ArcadeLearningEnvironment.getRAMSize
— MethodgetRAMSize(ale_instance::ALEPtr)
Returns the size of the RAM.
ArcadeLearningEnvironment.getROMList
— MethodgetROMList()
Returns an array of names of ROMs available. These ROMS can be loaded by simply passing their name to the loadROM
function, as opposed to passing their full path.
Example
julia> getROMList()
74-element Array{String,1}:
"adventure"
"air_raid"
"alien"
"amidar"
"assault"
"asterix"
⋮
"venture"
"video_pinball"
"wizard_of_wor"
"yars_revenge"
"zaxxon"
ArcadeLearningEnvironment.getScreen
— MethodgetScreen(ale_instance::ALEPtr)
Returns the current game screen.
ArcadeLearningEnvironment.getScreenGrayscale
— MethodgetScreenGrayscale(ale_instance::ALEPtr)
Returns the grayscale representation of the screen.
ArcadeLearningEnvironment.getScreenRGB
— MethodgetScreenRGB(ale_instance::ALEPtr)
Returns the RGB representation of the game screen as a (width * heigth * 3)-element Array{UInt, 1}.
ArcadeLearningEnvironment.getString
— MethodgetString(ale_instance::ALEPtr, key::String)
Returns the string value held by the ALE instance's field with the same name as key
.
ArcadeLearningEnvironment.lives
— Methodlives(ale_instance::ALEPtr)
Returns the number of lives remaining, by games that support the concept of lives.
ArcadeLearningEnvironment.loadROM
— MethodloadROM(ale_instance::ALEPtr, rom_file::String)
Loads the binary of passed. rom_file
can either be the absolute path to the binary, or the name of the ROM that is present in the "deps/roms" directory. Access this list using getROMList()
.
Examples
julia> loadROM(ale, "pong")
Game console created:
ROM file: /Users/juliauser/.julia/artifacts/4af00c03a4bcddb3ce20c2d96c3d09527100767/ROMS/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
julia> loadROM(ale, "/Users/juilauser/Desktop/pewpew/roms/ms_pacman.bin")
Game console created:
ROM file: /Users/juilauser/Desktop/pewpew/roms/ms_pacman.bin
Cart Name: Ms. Pac-Man (1982) (CCE)
Cart MD5: 9469d18238345d87768e8965f9f4a6b2
Display Format: AUTO-DETECT ==> NTSC
ROM Size: 8192
Bankswitch Type: AUTO-DETECT ==> F8
WARNING: Possibly unsupported ROM: mismatched MD5.
Cartridge_MD5: 9469d18238345d87768e8965f9f4a6b2
Cartridge_name: Ms. Pac-Man (1982) (CCE)
Running ROM file...
Random seed is 0
ArcadeLearningEnvironment.loadState
— MethodloadState(ale_instance::ALEPtr)
Loads the state of the game
ArcadeLearningEnvironment.reset_game
— Methodreset_game(ale_instance::ALEPtr)
Resets the game and the reward counter.
ArcadeLearningEnvironment.restoreState
— MethodrestoreState(ale_instance::ALEPtr, state::ALEStatePtr)
Reverse operation of cloneState(). This doesn't restore pseudorandomness, so that repeated calls to restoreState() in the stochastic controls settinig will not lead to the same outcomes.
See also: restoreSystemState
ArcadeLearningEnvironment.restoreSystemState
— MethodrestoreSystemState(ale_instance::ALEPtr, state::ALEStatePtr)
Reverse operation of cloneSystemState
.
ArcadeLearningEnvironment.saveScreenPNG
— MethodsaveScreenPNG(ale_instance::ALEPtr, filename::String)
Save the current screen as a png file.
Example
julia> saveScreenPNG(ale, "pongscreenshot.png")
ArcadeLearningEnvironment.saveState
— MethodsaveState(ale_instance::ALEPtr)
Saves the state of the game
ArcadeLearningEnvironment.setBool
— MethodsetBool(ale_instance::ALEPtr, key::String, value::Bool)
Modifies the ALE instance field value with the same name as key
to the passed boolean value.
ArcadeLearningEnvironment.setFloat
— MethodsetFloat(ale_instance::ALEPtr, key::String, value::)
Modifies the ALE instance field with the same name as key
to the passed floating point value.
ArcadeLearningEnvironment.setInt
— MethodsetInt(ale_instance::ALEPtr, key::String, value::Int32)
Modifies the ALE instance field value with the same name as key
to the passed integer value.
ArcadeLearningEnvironment.setLoggerMode!
— MethodsetLoggerMode!(mode::Symbol)
Sets the mode for the Logger for the ALE instance. Three modes(::Symbol) are available. :info ==> logs all details and information :warning ==> logs warnings and errors :error ==> logs errors only
Example
julia> setLoggerMode!(:info)
ArcadeLearningEnvironment.setString
— MethodsetString(ale_interface::ALEPtr, key::String, value::String)
Modifies the ALE instance field value with the same name as key
to the passed String value.