diff --git a/cpprevolve/revolve/brains/controller/DifferentialCPG.cpp b/cpprevolve/revolve/brains/controller/DifferentialCPG.cpp index 1ff4ae481d..d355cc7e5d 100644 --- a/cpprevolve/revolve/brains/controller/DifferentialCPG.cpp +++ b/cpprevolve/revolve/brains/controller/DifferentialCPG.cpp @@ -94,6 +94,7 @@ DifferentialCPG::DifferentialCPG( // build the NN according to the genome NEAT::NeuralNetwork net; gen.BuildPhenotype(net); + unsigned int net_depth = net.CalculateNetworkDepth(); // get weights for each connection // assuming that connections are distinct for each direction @@ -109,9 +110,12 @@ DifferentialCPG::DifferentialCPG( inputs[3] = 1; std::tie(inputs[4], inputs[5], inputs[6]) = motor.first; inputs[7] = -1; + inputs[8] = 1; + net.Flush(); net.Input(inputs); - net.Activate(); + for (int i=0; i