benelot / minemonics

(Alpha Stage, work in progress) An open-source 3D virtual creature evolution simulator built in OGRE rendering engine in C++ to experiment with emergent gait-periodicity in evolved creatures on unknown terrain.
29 stars 5 forks source link

Fix generation number when loading #215

Open benelot opened 8 years ago

benelot commented 8 years ago

A saved population will contain the current_generation +1 in the file, which causes the simulation to crash because it can not find a matching generation to load. Fix this by traversing back in the generation number until you find a valid folder.