[−][src]Trait coliseum::env::Environment
Required methods
fn reset(&mut self) -> OSample
Reset indicates that all environment state should be wiped and re-initialized. Analogous to starting a new game. Returns an observation from the newly initialized env.
fn step(&mut self, action: ASample) -> State<OSample>
Step takes an agent action and (probably) mutates itself; returns State to the agent.
Implementors
impl Environment<Discrete, u32, Discrete, u32> for RockPaperScissors
[src]
Examples
use coliseum::env; use env::{Environment, State}; use env::rock_paper_scissors::RockPaperScissors; let mut game = RockPaperScissors::default(); game.reset(); // our player loves rock let agent = || 1; loop { let State { reward, done, .. } = game.step(agent()); if done { break; } }