cellular encoding
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "./Instruction.h"
|
||||
#include "../Cell.h"
|
||||
#include "../CelularEncoding.h"
|
||||
|
||||
namespace NeuralNetworks {
|
||||
namespace ConstructiveAlgorithms {
|
||||
namespace CelularEncoding {
|
||||
namespace Instruction{
|
||||
class Wait : public Instruction{
|
||||
public:
|
||||
Wait(bool terminal = false) : _numberOfNodes(terminal? 0 : 1) {
|
||||
|
||||
}
|
||||
|
||||
virtual void run(Cell &cell, CelularEncoding &, const std::vector<double> &) override {
|
||||
cell.setCodePointer(cell.getCodePointer()->c1);
|
||||
}
|
||||
|
||||
virtual std::size_t numberOfNodes() const override {
|
||||
return _numberOfNodes;
|
||||
}
|
||||
|
||||
virtual std::string toString() const override {
|
||||
return "Wait";
|
||||
}
|
||||
protected:
|
||||
std::size_t _numberOfNodes;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user