Struct relearn::envs::UniformBernoulliBandits
source · [−]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
sourceimpl Clone for UniformBernoulliBandits
impl Clone for UniformBernoulliBandits
sourcefn clone(&self) -> UniformBernoulliBandits
fn clone(&self) -> UniformBernoulliBandits
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 UniformBernoulliBandits
impl Debug for UniformBernoulliBandits
sourceimpl Default for UniformBernoulliBandits
impl Default for UniformBernoulliBandits
sourceimpl<'de> Deserialize<'de> for UniformBernoulliBandits
impl<'de> Deserialize<'de> for UniformBernoulliBandits
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 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>
sourcefn 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
sourceimpl EnvStructure for UniformBernoulliBandits
impl EnvStructure for UniformBernoulliBandits
type ObservationSpace = SingletonSpace
type ActionSpace = IndexSpace
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 Hash for UniformBernoulliBandits
impl Hash for UniformBernoulliBandits
sourceimpl PartialEq<UniformBernoulliBandits> for UniformBernoulliBandits
impl PartialEq<UniformBernoulliBandits> for UniformBernoulliBandits
sourcefn eq(&self, other: &UniformBernoulliBandits) -> bool
fn eq(&self, other: &UniformBernoulliBandits) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UniformBernoulliBandits) -> bool
fn ne(&self, other: &UniformBernoulliBandits) -> bool
This method tests for !=
.
sourceimpl Serialize for UniformBernoulliBandits
impl Serialize for UniformBernoulliBandits
impl CloneBuild for UniformBernoulliBandits
impl Copy for UniformBernoulliBandits
impl Eq for UniformBernoulliBandits
impl StructuralEq for UniformBernoulliBandits
impl StructuralPartialEq for UniformBernoulliBandits
Auto Trait Implementations
impl RefUnwindSafe for UniformBernoulliBandits
impl Send for UniformBernoulliBandits
impl Sync for UniformBernoulliBandits
impl Unpin for UniformBernoulliBandits
impl UnwindSafe for UniformBernoulliBandits
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.