Trait border_core::Policy

source ·
pub trait Policy<E: Env> {
    type Config: Clone;

    // Required methods
    fn build(config: Self::Config) -> Self;
    fn sample(&mut self, obs: &E::Obs) -> E::Act;
}
Expand description

A policy on an environment.

Policy is a mapping from an observation to an action. The mapping can be either of deterministic or stochastic.

Required Associated Types§

source

type Config: Clone

Configuration of the policy.

Required Methods§

source

fn build(config: Self::Config) -> Self

Builds the policy.

source

fn sample(&mut self, obs: &E::Obs) -> E::Act

Sample an action given an observation.

Implementors§