Code center > Darwinbots Program Source Code

Genetic Distance is slow as hell

<< < (3/3)

Peter:
Is it slow in general or just in sexual reproduction sims?

Botsareus:
no, It is only slow every time genetic distance needs to be calculate for two robots. This process takes about 1-3 seconds. So when these guys are reproducing (which is not very often) the screen does periodically lockup for like a second. However, if you want to figure out max genetic distance for all robots (as in the  max. genetic distance graph) it is reasonably slow as hell. Example: if we have 200 robots and we check them all that is 20100 checks, mult by 2 that is 40200 seconds. which is literally 11 hours.

Botsareus:
update:

Just as things began to get interesting the robots fully lost ability to reproduce.
I may have to disable point mutations and increase ageing cost.

edit:

actually disabling aging cost completely may actually have a positive effect. Still looking at this.

Peter:
Ah, I understand it now.  :)


--- Quote from: Botsareus on April 13, 2013, 02:21:20 PM ---It is up to the user if he wants better accuracy per robot or better accuracy for population, both "Simple genetic distance" and "Genetic distance" graphs are included.
--- End quote ---
I prefer to have just one graph if they're basically doing the same. It would also seem easier in code maintenance.

Botsareus:
That's the thing, the algorithm is very different for both graphs.
I need the simpler algorithm to generate a genetic distance matrix (later) for an idea I had.
The simpler algorithm is about x40 faster, therefor (based on my example) instead of waiting 11 hours I will only need to wait 16 minutes.
You can not use crossover with the simpler algorithm.
My thinking was since I am adding it anyway, why not make it available to the user?

Navigation

[0] Message Index

[*] Previous page

Go to full version