profqu_neat

A crate that implements the NEAT algorithm Created according to a tutorial from Finn Eggers. I tried to implement NEAT from the official github repository, but I couldn't figure out how to do it, so I used Finn's implementation.

Then I looked on Youtube and found Finn Eggers and his tutorial really helped me with creating this library.

Doesn't allow recurrent connections in the networks.

Examples

```rust use profqu_neat::Neat;

// Load config and create new Neat Neat::loadconfigfrom_file("src/config.txt"); let mut neat = Neat::new(10, 1, 1000);

// Create inputs let input: Vec = vec![rand::random(); 10];

// Try to evolve the clients for iteration in 0..200 { for mut client in neat.iterclients() { let fitness = client.calculate(&input)[0]; client.fitness = fitness; } neat.evolve(); }

/// Get the best client let best = neat.best_client().expect("Failed to get client");

/// Print all the data neat.print_species(); println!("Best: {best:?}");

assert!(best.fitness > 0.8); ```