summaryrefslogtreecommitdiff
path: root/include/brain/neuron.h
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2015-10-17 17:02:24 +0200
committerJustin Worthe <justin.worthe@gmail.com>2015-10-17 17:02:24 +0200
commit550caeee11086bd56db69176b3149ddfa160ee30 (patch)
treec935b819a4ad165fbef567db67ad9ddcca62df04 /include/brain/neuron.h
parent31a82b0359515ae579514024b22873fb708c3f53 (diff)
Reverted to a simple decision tree
Turns out it's much easier to write a bot by hand with if statements.
Diffstat (limited to 'include/brain/neuron.h')
-rw-r--r--include/brain/neuron.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/brain/neuron.h b/include/brain/neuron.h
index 204b303..ca26c73 100644
--- a/include/brain/neuron.h
+++ b/include/brain/neuron.h
@@ -12,6 +12,10 @@ public:
void addInput(NeuralLink&& link);
bool calculateActivation();
+Neuron(int index) : NeuralNode('n'+std::to_string(index)){};
+
+ bool hasInputWithWeight(std::string srcIdentifier, double weight) const;
+
private:
std::vector<NeuralLink> _inputLinks;
double sigmoid(double input) const;