Code center > Bugs and fixes

Total freeze up with new speciation feature

(1/2) > >>

Testlund:
A couple of times today my sim got permanently frozen, which I guess is the calculation of the speciation autofork getting stuck. It was not in internet mode. Maybe it happens when it tries to make a new species.

EricL:
How many bots?  How many species?  How long did it freeze?  Was the cycle count on a multiple of 100?  How about a sim?

If your going to file a bug and expect me to do something about it, it would help if you actually gave me enough information to do something about it.

It's almost certainly not frozen forever but on your machine, which I assume isn't the fastest, it might seem that way.  The work to decide if speciation should occur is very cpu intensive and it does block the sim while it is being done.  It is also very sensitive to the size of species.  For the same number of bots, if you have few species with a large number of members, it will take longer than a larger number of species each with fewer members.  On my fairly fast machine, it takes maybe 15 seconds (on a sim of 2000 members) to update the speciation graphs and/or do the work to see if speciation should occur.

In 2.44.1, the schedule for checking if speciation should occur is configurable.

Numsgil:
Could you spread the calculation over the full 100 cycles or whatever?  You might miss some bots that get killed or born in the interim, but you won't have it seem to freeze.

EricL:

--- Quote from: Numsgil ---Could you spread the calculation over the full 100 cycles or whatever?  You might miss some bots that get killed or born in the interim, but you won't have it seem to freeze.
--- End quote ---

Not easily.  I'm maintaining an ancestor list 500 ancestors long for every extant bot.  The set of extant bots changes as bots die and are born.   I pretty much need the rob array locked while I do this.  

Doing the calculation involves finding the most recent common ancestor between every pair of bots in the species O(n*log(n)), calculating the distances and finding the max(s).    I can optimize the algorithm some.  One idea is do the comparisons using youngest bots first.  This allows me to ignore any extant direct ancestors since their generational distance will be lower.  I can't really do this for mutational distance though.

The biggest thing I think it just not to do it very often.  The auto-fork interval is configurable in the next drop.   There really isn't a need to check very often except for graphing and I'm working on graph-specific update intervals to address that.

Any ideas are of course welcome.

Numsgil:
Hmm... maybe make a raw copy of the robarray every X cycles.  Then you could make calculations at leisure.

Navigation

[0] Message Index

[#] Next page

Go to full version