Struct relearn::envs::PartitionGame
source · [−]pub struct PartitionGame;
Expand description
Environment where the goal is to partition vectors based on supervision
Trait Implementations
sourceimpl Clone for PartitionGame
impl Clone for PartitionGame
sourcefn clone(&self) -> PartitionGame
fn clone(&self) -> PartitionGame
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PartitionGame
impl Debug for PartitionGame
sourceimpl Default for PartitionGame
impl Default for PartitionGame
sourcefn default() -> PartitionGame
fn default() -> PartitionGame
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for PartitionGame
impl<'de> Deserialize<'de> for PartitionGame
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl EnvStructure for PartitionGame
impl EnvStructure for PartitionGame
type ObservationSpace = TupleSpace2<PowerSpace<BooleanSpace, NUM_FEATURES>, OptionSpace<TupleSpace2<PowerSpace<BooleanSpace, NUM_FEATURES>, IndexedTypeSpace<Classification>>>>
type ActionSpace = IndexedTypeSpace<Action>
type FeedbackSpace = IntervalSpace<Reward>
sourcefn observation_space(&self) -> Self::ObservationSpace
fn observation_space(&self) -> Self::ObservationSpace
Space containing all possible observations. Read more
sourcefn action_space(&self) -> Self::ActionSpace
fn action_space(&self) -> Self::ActionSpace
The space of all possible actions. Read more
sourcefn feedback_space(&self) -> Self::FeedbackSpace
fn feedback_space(&self) -> Self::FeedbackSpace
The space of all possible feedback. Read more
sourcefn discount_factor(&self) -> f64
fn discount_factor(&self) -> f64
A discount factor applied to future feedback. Read more
sourceimpl Environment for PartitionGame
impl Environment for PartitionGame
type State = PartitionGameState
type State = PartitionGameState
Environment state type. Not necessarily observable by the agent.
type Action = Action
type Action = Action
Action selected by the agent.
sourcefn initial_state(&self, rng: &mut Prng) -> Self::State
fn initial_state(&self, rng: &mut Prng) -> Self::State
Sample a state for the start of a new episode. Read more
sourcefn observe(&self, state: &Self::State, _: &mut Prng) -> Self::Observation
fn observe(&self, state: &Self::State, _: &mut Prng) -> Self::Observation
Generate an observation for a given state.
sourcefn step(
&self,
state: Self::State,
action: &Self::Action,
rng: &mut Prng,
_: &mut dyn StatsLogger
) -> (Successor<Self::State>, Self::Feedback)
fn step(
&self,
state: Self::State,
action: &Self::Action,
rng: &mut Prng,
_: &mut dyn StatsLogger
) -> (Successor<Self::State>, Self::Feedback)
Perform a state transition in reponse to an action. Read more
sourcefn run<T, L>(self, actor: T, seed: SimSeed, logger: L) -> Steps<Self, T, Prng, L>ⓘNotable traits for Steps<E, T, R, L>impl<E, T, R, L> Iterator for Steps<E, T, R, L> where
E: Environment,
T: Actor<E::Observation, E::Action>,
R: BorrowMut<Prng>,
L: StatsLogger, type Item = PartialStep<E::Observation, E::Action, E::Feedback>;
where
T: Actor<Self::Observation, Self::Action>,
L: StatsLogger,
Self: Sized,
fn run<T, L>(self, actor: T, seed: SimSeed, logger: L) -> Steps<Self, T, Prng, L>ⓘNotable traits for Steps<E, T, R, L>impl<E, T, R, L> Iterator for Steps<E, T, R, L> where
E: Environment,
T: Actor<E::Observation, E::Action>,
R: BorrowMut<Prng>,
L: StatsLogger, type Item = PartialStep<E::Observation, E::Action, E::Feedback>;
where
T: Actor<Self::Observation, Self::Action>,
L: StatsLogger,
Self: Sized,
E: Environment,
T: Actor<E::Observation, E::Action>,
R: BorrowMut<Prng>,
L: StatsLogger, type Item = PartialStep<E::Observation, E::Action, E::Feedback>;
Run this environment with the given actor.
sourceimpl Hash for PartitionGame
impl Hash for PartitionGame
sourceimpl PartialEq<PartitionGame> for PartitionGame
impl PartialEq<PartitionGame> for PartitionGame
sourceimpl Serialize for PartitionGame
impl Serialize for PartitionGame
impl CloneBuild for PartitionGame
impl Copy for PartitionGame
impl Eq for PartitionGame
impl StructuralEq for PartitionGame
impl StructuralPartialEq for PartitionGame
Auto Trait Implementations
impl RefUnwindSafe for PartitionGame
impl Send for PartitionGame
impl Sync for PartitionGame
impl Unpin for PartitionGame
impl UnwindSafe for PartitionGame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.