-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Genome is a trait that implements mutation, mating, distance measure etc. (opens up for more experimentation and extensibility) - The default Genome implementor is NeuralNetwork which implements said functionality pretty much just as before. So NeuralNetwork is the new Genome. Some slight changes in how bias works had to be done to be able to mirror the way they do it in some paper that introduced or explained CTRNN iirc. - Thus now we pass around Organisms not Genomes - And..: - Update rand - Removed lots of unnecessary f64 - Remove CtrnnNeuralNetwork (can just use Ctrnn for setting up the network) - Fix an error in species
- Loading branch information
Showing
17 changed files
with
820 additions
and
962 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
use organism::Organism; | ||
use crate::Genome; | ||
|
||
/// A trait that is implemented by user to allow test of the Environment. | ||
pub trait Environment: Sync { | ||
/// A trait that is implemented by user to test the fitness of organisms. | ||
pub trait Environment<G: Genome>: Sync { | ||
/// This test will return the value required by this enviroment to test | ||
/// against | ||
fn test(&self, organism: &mut Organism) -> f64; | ||
fn test(&self, organism: &mut G) -> f64; | ||
} |
Oops, something went wrong.