pub trait Game<T>where
T: Float + AddAssign + Display + Send,{
fn run_generation(&mut self) -> Vec<T>;
fn reset_players(&mut self, nets: Vec<NeuralNetwork<T>>);
fn post_training(&mut self, history: Vec<HistoricTopologyLazy<T>>);
}
Expand description
Trait to implement in order to use Train
Required Methods
sourcefn run_generation(&mut self) -> Vec<T>
fn run_generation(&mut self) -> Vec<T>
Run a game round
sourcefn reset_players(&mut self, nets: Vec<NeuralNetwork<T>>)
fn reset_players(&mut self, nets: Vec<NeuralNetwork<T>>)
Resets the neural networks
Arguments
nets
- A vector containing the last generation of neural networks