create NEAT app repo
This commit is contained in:
commit
9cd2d19fb9
34 files changed
+4454
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#ifndef __ConnectionGene_h__
|
||||
#define __ConnectionGene_h__
|
||||
|
||||
#include "Gene.h"
|
||||
|
||||
class Innovator;
|
||||
|
||||
class ConnectionGene: public Gene
|
||||
{
|
||||
public:
|
||||
|
||||
ConnectionGene(Innovator& innovator, int input_id, int output_id);
|
||||
ConnectionGene(Innovator& innovator, int input_id, int output_id, float weight);
|
||||
|
||||
void Mutate();
|
||||
|
||||
void Disable();
|
||||
void Enable();
|
||||
bool IsEnabled() const;
|
||||
|
||||
int GetInputNeuron() const;
|
||||
int GetOutputNeuron() const;
|
||||
float GetWeight() const;
|
||||
|
||||
bool operator< (const ConnectionGene& rhs) const;
|
||||
bool operator== (const ConnectionGene& rhs) const;
|
||||
|
||||
private:
|
||||
|
||||
int m_in_node;
|
||||
int m_out_node;
|
||||
float m_weight;
|
||||
bool m_enabled;
|
||||
};
|
||||
|
||||
#endif // __ConnectionGene_h__
|
||||
|
||||
Reference in new issue
Block a user