Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Assert error in get_new_node_key during reproduction #172

@realimposter

Description

@realimposter

I'm using neat-python inside of the program Houdini. I am trying to train biped movements. The program runs great until at a random generation usually between 4 and 100 where the the organisms stop reproducing. I tracked the problem down to the species members list suddenly being empty, because the reproduce function stops at the assert line in this code in genome.py:

` def get_new_node_key(self, node_dict):

    if self.node_indexer is None:

        self.node_indexer = count(max(list(iterkeys(node_dict))) + 1)

    new_id = next(self.node_indexer)

    assert new_id not in node_dict

    return new_id`

Anyone know whats causing this?

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