pub struct UniformBernoulliBandits {
pub num_arms: usize,
}
Expand description
A distribution over Beroulli bandit environments with uniformly sampled means.
The mean of each arm is sampled uniformly from [0, 1]
.
§Reference
This environment distribution is used in the paper “RL^2: Fast Reinforcement Learning via Slow Reinforcement Learning” by Duan et al.
Fields§
§num_arms: usize
Number of bandit arms.
Implementations§
Trait Implementations§
Source§impl Clone for UniformBernoulliBandits
impl Clone for UniformBernoulliBandits
Source§fn clone(&self) -> UniformBernoulliBandits
fn clone(&self) -> UniformBernoulliBandits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UniformBernoulliBandits
impl Debug for UniformBernoulliBandits
Source§impl Default for UniformBernoulliBandits
impl Default for UniformBernoulliBandits
Source§impl<'de> Deserialize<'de> for UniformBernoulliBandits
impl<'de> Deserialize<'de> for UniformBernoulliBandits
Source§fn 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
Source§impl EnvDistribution for UniformBernoulliBandits
impl EnvDistribution for UniformBernoulliBandits
type State = <<UniformBernoulliBandits as EnvDistribution>::Environment as Environment>::State
type Observation = <<UniformBernoulliBandits as EnvDistribution>::Environment as Environment>::Observation
type Action = <<UniformBernoulliBandits as EnvDistribution>::Environment as Environment>::Action
type Feedback = <<UniformBernoulliBandits as EnvDistribution>::Environment as Environment>::Feedback
type Environment = Bandit<Bernoulli>
Source§fn sample_environment(&self, rng: &mut Prng) -> Self::Environment
fn sample_environment(&self, rng: &mut Prng) -> Self::Environment
Sample an environment from the distribution. Read more
Source§impl EnvStructure for UniformBernoulliBandits
impl EnvStructure for UniformBernoulliBandits
type ObservationSpace = SingletonSpace
type ActionSpace = IndexSpace
type FeedbackSpace = IntervalSpace<Reward>
Source§fn observation_space(&self) -> Self::ObservationSpace
fn observation_space(&self) -> Self::ObservationSpace
Space containing all possible observations. Read more
Source§fn action_space(&self) -> Self::ActionSpace
fn action_space(&self) -> Self::ActionSpace
The space of all possible actions. Read more
Source§fn feedback_space(&self) -> Self::FeedbackSpace
fn feedback_space(&self) -> Self::FeedbackSpace
The space of all possible feedback. Read more
Source§fn discount_factor(&self) -> f64
fn discount_factor(&self) -> f64
A discount factor applied to future feedback. Read more
Source§impl Hash for UniformBernoulliBandits
impl Hash for UniformBernoulliBandits
Source§impl PartialEq for UniformBernoulliBandits
impl PartialEq for UniformBernoulliBandits
Source§impl Serialize for UniformBernoulliBandits
impl Serialize for UniformBernoulliBandits
impl CloneBuild for UniformBernoulliBandits
impl Copy for UniformBernoulliBandits
impl Eq for UniformBernoulliBandits
impl StructuralPartialEq for UniformBernoulliBandits
Auto Trait Implementations§
impl Freeze for UniformBernoulliBandits
impl RefUnwindSafe for UniformBernoulliBandits
impl Send for UniformBernoulliBandits
impl Sync for UniformBernoulliBandits
impl Unpin for UniformBernoulliBandits
impl UnwindSafe for UniformBernoulliBandits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BuildEnvDist for Twhere
T: StructuredEnvDist + CloneBuild,
impl<T> BuildEnvDist for Twhere
T: StructuredEnvDist + CloneBuild,
type Observation = <<T as EnvStructure>::ObservationSpace as Space>::Element
type Action = <<T as EnvStructure>::ActionSpace as Space>::Element
type Feedback = <<T as EnvStructure>::FeedbackSpace as Space>::Element
type ObservationSpace = <T as EnvStructure>::ObservationSpace
type ActionSpace = <T as EnvStructure>::ActionSpace
type FeedbackSpace = <T as EnvStructure>::FeedbackSpace
type EnvDistribution = T
Source§fn build_env_dist(&self) -> <T as BuildEnvDist>::EnvDistribution
fn build_env_dist(&self) -> <T as BuildEnvDist>::EnvDistribution
Build an environment distribution instance.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more