Skip to content

Stuck in an infinity loop in Genome::Genome(std::ifstream &a_DataFile) #64

@ClarkyMacLeod

Description

@ClarkyMacLeod

I saved my previous population with Genome::Save(FILE *a_file) and stopped the evolution.
When I tried to resume where I left, the program froze and threw a Runtime Error.

After some digging and debugging, I found the Bug.
In the Genome constructor, Genome.cpp, row 3467 is a do-while loop, which runs forever, when the file format given as an argument uses commas instead of dots as decimal separator.

The workaround is to change the language format in the OS-settings.

Steps to reproduce the issue:

Change your formats for numbers etc. so it uses commas for decimal separators: 3,14 instead of 3.14.
Let population evolve and interrupt the process after a couple generations and save your progress with Genome::Save(FILE *a_file).
Then load your previously evolved population with NEAT.Population(a_file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions