diff options
Diffstat (limited to 'include/HyperNeat/Genome.hpp')
-rw-r--r-- | include/HyperNeat/Genome.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/HyperNeat/Genome.hpp b/include/HyperNeat/Genome.hpp new file mode 100644 index 0000000..d8f678f --- /dev/null +++ b/include/HyperNeat/Genome.hpp @@ -0,0 +1,42 @@ +#ifndef __HYPERNEAT_GENOME_HPP__ +#define __HYPERNEAT_GENOME_HPP__ + +#include <HyperNeat/Utils/Map.hpp> +#include <HyperNeat/Utils/Size.hpp> +#include <HyperNeat/Utils/NodeTypes.hpp> + +namespace hyperneat +{ + class Genome + { + public: + Genome() = default; + explicit Genome(size_t inputs); + + class NodeGene + { + public: + NodeGene() = default; + NodeGene(double depth, NodeType nodeType); + + class LinkGene + { + public: + LinkGene() = default; + LinkGene(double weight, bool isEnabled = true); + + double _weight = 0.0; + bool _isEnabled = true; + }; + + double _depth = 0.0; + NodeType _nodeType = NodeType::NULL_TYPE; + Map<size_t, LinkGene> _linkGenes; + }; + + size_t _inputs = 0; + Map<size_t, NodeGene> _nodeGenes; + }; +} + +#endif |