pub trait Obs: Clone + Debug {
    fn dummy(n: usize) -> Self;
fn merge(self, obs_reset: Self, is_done: &[i8]) -> Self;
fn len(&self) -> usize; }
Expand description

A set of observations of an environment.

Old versions of the library support vectorized environment and Obs was able to handle multiple observations. In the current version, no vectorized environment is implemented. Thus, Obs::len() always returns 1.

Required methods

Returns a dummy observation.

The observation created with this method is ignored.

Replace elements of observation where is_done[i] == 1.

This method assumes that is_done.len() == n_procs.

Returns the number of observations in the object.

Implementors