@Namespace(value="ale") @NoOffset @Properties(inherit=ale.class) public class StellaEnvironment extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
StellaEnvironment(OSystem system,
RomSettings settings) |
StellaEnvironment(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
act(int player_a_action,
int player_b_action)
Applies the given actions (e.g.
|
ALEState |
cloneState() |
ALEState |
cloneState(boolean include_rng)
Returns a copy of the current environment state.
|
int |
getDifficulty() |
Random |
getEnvironmentRNG() |
int |
getEpisodeFrameNumber() |
int |
getFrameNumber() |
int |
getMode() |
ALERAM |
getRAM() |
ALEScreen |
getScreen()
Returns the current screen after processing (e.g.
|
ALEState |
getState() |
StellaEnvironmentWrapper |
getWrapper()
Returns a wrapper providing #include-free access to our methods.
|
boolean |
isGameTerminal()
Returns true if the ROM reported a terminal signal
|
boolean |
isGameTruncated()
Returns true if the episode is truncated, i.e., max number of frames is reached
|
boolean |
isTerminal()
Returns true if the ROM reported a terminal signal OR if the episode is truncated
(i.e., isGameTerminal() || isTruncated()).
|
void |
pressSelect() |
void |
pressSelect(long num_steps)
Keep pressing the console select button for a given amount of time
|
void |
reset()
Resets the system to its start state.
|
void |
restoreState(ALEState arg0)
Restores a previously saved copy of the state.
|
void |
setDifficulty(int value)
Set the difficulty according to the value.
|
void |
setMode(int value)
Set the game mode according to the value.
|
void |
setRAM(long memory_index,
byte value)
Accessor methods for RAM.
|
void |
setState(ALEState state)
Accessor methods for the environment state.
|
void |
softReset()
This functions emulates a push on the reset button of the console
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public StellaEnvironment(Pointer p)
Pointer(Pointer)
.public StellaEnvironment(OSystem system, RomSettings settings)
public void reset()
@ByVal public ALEState cloneState(@Cast(value="bool") boolean include_rng)
include_rng
to true. For planning you probably want to disable
sticky actions. The emulator is fully deterministic.public void restoreState(@Const @ByRef ALEState arg0)
@Cast(value="ale::reward_t") public int act(@Cast(value="ale::Action") int player_a_action, @Cast(value="ale::Action") int player_b_action)
public void softReset()
public void pressSelect(@Cast(value="size_t") long num_steps)
public void pressSelect()
public void setDifficulty(@Cast(value="ale::difficulty_t") int value)
public void setMode(@Cast(value="ale::game_mode_t") int value)
@Cast(value="bool") public boolean isTerminal()
@Cast(value="bool") public boolean isGameTerminal()
@Cast(value="bool") public boolean isGameTruncated()
public void setState(@Const @ByRef ALEState state)
@Const @ByRef public ALEScreen getScreen()
public void setRAM(@Cast(value="size_t") long memory_index, @Cast(value="ale::byte_t") byte value)
setRAM
can be useful to alter the environment.
For example, learning a causal model of RAM transitions, changing environment dynamics, etc.public int getFrameNumber()
public int getEpisodeFrameNumber()
@Name(value="getWrapper().get") public StellaEnvironmentWrapper getWrapper()
Copyright © 2022. All rights reserved.