From 0ae5cc81e03a725dc4ba5e0eca44a7de2803e9b0 Mon Sep 17 00:00:00 2001 From: vandomej Date: Wed, 23 Jun 2021 12:35:59 -0700 Subject: [PATCH] Adding some documentation. --- gemla/src/bracket/genetic_state.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gemla/src/bracket/genetic_state.rs b/gemla/src/bracket/genetic_state.rs index ad1dc0f..18aa766 100644 --- a/gemla/src/bracket/genetic_state.rs +++ b/gemla/src/bracket/genetic_state.rs @@ -1,7 +1,18 @@ +//! A trait used to interact with the internal state of nodes within the genetic bracket + +/// A trait used to interact with the internal state of nodes within the genetic bracket pub trait GeneticState { + + /// Runs a simulation on the state object in order to guage it's fitness. + /// - iterations: the number of iterations (learning cycles) that the current state should simulate + /// + /// This will be called for every node in a bracket before evaluating it's fitness against other nodes. fn run_simulation(&mut self, iterations: u32); + /// Returns a fit score associated with the nodes performance. + /// This will be used by a bracket in order to determine the most successful child. fn get_fit_score(&self) -> f64; + /// Initializes a new instance of a genetic state. fn initialize() -> Self; } \ No newline at end of file