ai-graph 0.0.18

Ai Graph is a new tool for creating machine learning that runs blazingly fast when learning has finished.
Documentation
use super::{species::creature::MadeFrom, Generation};

impl Generation {
    pub fn print_generation_info(&self) -> () {
        println!(
            "score {:>width$} {:?} {:>width$} {:>width$}",
            self.top_score(),
            self.top_scorer_is_made_from(),
            self.generations_before(),
            self.number_of_creatures(),
            width = 6
        );
    }
    fn top_score(&self) -> f64 {
        self.sort()[self.sort().len() - 1].score
    }
    fn top_scorer_is_made_from(&self) -> MadeFrom {
        self.sort()[self.sort().len() - 1].made_from.clone()
    }
    fn generations_before(&self) -> u64 {
        self.generations_before
    }
    fn number_of_creatures(&self) -> usize {
        self.sort().len()
    }
}