aboutsummaryrefslogtreecommitdiff
path: root/include/HyperNeat/Genome.hpp
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 19:04:34 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 19:16:14 +0100
commite6ab4a8ed100d5d5b7611c74cf3ccd556f1f1d71 (patch)
tree129cf13c2f9b3eae54402300db4570815789a02a /include/HyperNeat/Genome.hpp
Initial commitHEADmaster
Diffstat (limited to 'include/HyperNeat/Genome.hpp')
-rw-r--r--include/HyperNeat/Genome.hpp42
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