This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const device_pins = [ | |
AnalogPin.P0, | |
AnalogPin.P1, | |
AnalogPin.P2, | |
AnalogPin.P3, | |
AnalogPin.P4, | |
AnalogPin.P5, | |
AnalogPin.P6, | |
AnalogPin.P7, | |
AnalogPin.P8, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const GROWTH_RATE: f64 = 3.9666; | |
const GENERATIONS: usize = 2000; | |
const STARTING_POPULATION: f64 = 0.975; | |
fn main() { | |
let mut data: Vec<(usize, f64)> = Vec::with_capacity(GENERATIONS); | |
println!("Initial Population: {STARTING_POPULATION}"); | |
data.push((0, STARTING_POPULATION as f64)); | |
for i in 1..=GENERATIONS { |
OlderNewer