peter-ch / MultiNEAT

Portable NeuroEvolution Library
http://MultiNEAT.com
GNU Lesser General Public License v3.0
328 stars 104 forks source link

Assert error. #26

Open pbplugge opened 7 years ago

pbplugge commented 7 years ago

I get the message below when running your original c++ function main():

ASSERT! ../src/MultiNEAT/Genome.cpp, line 126: (a_NumInputs > 1) && (a_NumOutputs > 0) is false

terminate called after throwing an instance of 'std::exception' what(): std::exception

pbplugge commented 7 years ago

In main.cpp line 167 parameter 2 should be 2. After i changed i get 1 generation:

Neurons:

ID: 1 : v - -5, x - 0.542495, y - "c", ID: 2 : x - 0.872972, y - "a", ID: 3 : v - 5, x - 0.509868, y - "c",

Links:

ID: 1 : z - "true", ID: 2 : z - "false",

==================================================================== Generation: 0, best fitness: 1.76667 Species: 1

Neurons:

ID: 1 : v - -5, x - 0.542495, y - "c", ID: 2 : x - 0.872972, y - "a", ID: 3 : v - 5, x - 0.509868, y - "c",

Links:

ID: 1 : z - "true", ID: 2 : z - "false",

==================================================================== Generation: 1, best fitness: 1.76667 Species: 1

ASSERT! ../src/MultiNEAT/Species.cpp, line 244: t_fitness >= 0 is false

terminate called after throwing an instance of 'std::exception' what(): std::exception

pbplugge commented 7 years ago

If i just remove the assert on line 244 in Species.cpp it goes for 389 generations with best fitness 3.98889. After which i get another error:

ASSERT! ../src/MultiNEAT/Population.cpp, line 377: t_oldbestid != -1 is false

terminate called after throwing an instance of 'std::exception' what(): std::exception