Struct relearn::envs::MemoryGame [−][src]
Expand description
Memory Game Environment
The agent must remember the inital state and choose the corresponding action as the final action in an episode.
- The environment consists of
(NUM_ACTIONS + HISTORY_LEN)
states. - An episode starts in a state
[0, NUM_ACTIONS)
uniformly at random. - Step
i
in[0, HISTORY_LEN)
transitions to stateNUM_ACTIONS + i
with 0 reward regardless of the action. - On step
HISTORY_LEN
, the agent chooses one ofNUM_ACTIONS
actions and if the action index matches the index of the inital state then the agent earns+1
reward, otherwise it earns-1
reward. This step is terminal. - Every episode has length
HISTORY_LEN + 1
.
Fields
num_actions: usize
The number of actions.
history_len: usize
Length of remembered history required to solve the environment.
Implementations
Trait Implementations
type ObservationSpace = IndexSpace
type ActionSpace = IndexSpace
Space containing all possible observations. Read more
The space of all possible actions. Read more
A lower and upper bound on possible reward values. Read more
A discount factor applied to future rewards. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MemoryGame
impl Send for MemoryGame
impl Sync for MemoryGame
impl Unpin for MemoryGame
impl UnwindSafe for MemoryGame
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
Apply an update from the given source value.