Darwinbots Forum

Code center => Bugs and fixes => Topic started by: Endy on May 07, 2006, 08:54:00 PM

Title: Sexrepro
Post by: Endy on May 07, 2006, 08:54:00 PM
Found at least part of what was causing plants using sexrepro to be able to continually reproduce, disregarding their population limit. The code has a limit in place for repro but not sexrepro

Code: [Select]
If rob(robA).Veg = True And totvegs > SimOpts.MaxPopulation Then Exit Sub
Here's the corrected code. It's basically the code from repro modified to use robA instead of n. There's still something oddball with nrg going on, and I'm not sure they're sharing dna properly. I'm running a longterm evosim with sexrepro'ing bots to see if anything else causes an error.
Title: Sexrepro
Post by: Numsgil on May 07, 2006, 10:13:03 PM
Good to track that down