pub struct Chain {
    pub size: usize,
    pub discount_factor: f64,
}
Expand description

Chain Environment

Consists of n states in a line with 2 actions.

  • Action 0 moves back to the start for 2 reward.
  • Action 1 moves forward for 0 reward in all states but the last. In the last state, taking action 1 is a self-transition with 10 reward.
  • Every action has a 0.2 chance of “slipping” and taking the opposite action.

Described in “Bayesian Q-learning” by Dearden, Friedman and Russel (1998)

Fields

size: usizediscount_factor: f64

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Space containing all possible observations. Read more

The space of all possible actions. Read more

The space of all possible feedback. Read more

A discount factor applied to future feedback. Read more

Environment state type. Not necessarily observable by the agent.

Observation of the state provided to the agent.

Action selected by the agent.

Feedback provided to a learning agent as the result of each step. Reward, for example. Read more

Sample a state for the start of a new episode. Read more

Generate an observation for a given state.

Perform a state transition in reponse to an action. Read more

Run this environment with the given actor.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Convert into an Any trait reference.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.