From 6fd23da97fa9700f59c61a966b4bf7d25fa46b34 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 03:15:03 +0100 Subject: initial commit --- MemCell.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 MemCell.hpp (limited to 'MemCell.hpp') diff --git a/MemCell.hpp b/MemCell.hpp new file mode 100644 index 0000000..4b1a38f --- /dev/null +++ b/MemCell.hpp @@ -0,0 +1,26 @@ +#ifndef __MEMCELL_HPP__ +#define __MEMCELL_HPP__ + +#include "Neuron.hpp" + +class MemCell : public Node +{ +public: + MemCell(unsigned inputCount, bool zeroed = false); + + void setChromosome(const Chromosome &chromosome); + Chromosome getChromosome() const; + unsigned getChromosomeSize() const; + + float io(const std::vector &inputs); + +private: + Neuron m_input; + Neuron m_inputGate; + Neuron m_memGate; + Neuron m_outputGate; + + float m_context = 0.f; +}; + +#endif // __MEMCELL_HPP__ -- cgit v1.2.1