dybukk, on 26 August 2013 - 08:47 PM, said:
score = max(bees[combo[1]].score, bees[combo[2]].score)
It didn't take into account if one of the combo's might not a targeted drone. So I changed it to :
No it doesn't at that point, but there is a guard on line 640 that checks if either the primary or secondary species is not targeted, it will exit and return a score of 0. So by the time it hits that line of code, you know both will be targeted.
dybukk, on 26 August 2013 - 08:47 PM, said:
Industrious - Industrious
Unweary - Industrious
Dilligent - Industrious
Unweary - Dilligent
That is almost correct, but not quite. For a princess and a drone there are 4 combinations of primary and secondary that could happen. I score each of those combinations as if they had a 100% chance of succeeding in a mutation, which is simplified and not correct. So an Industrious:Industrious princess bred with an Industrious:Industrious drone will score each combination as Industrious and add them up. An Unweary:Unweary princess bred with a Diligent:Diligent drone will score 4 combinations (all being Unweary-Diligent) as Industrious and add them up the same. (I honestly don't know how the bee code is written, so this could be totally off. But it makes sense from a mendelian inheritance perspective.)
dybukk, on 26 August 2013 - 08:47 PM, said:
Your guess is right. I think what is really needed is to account for the fact that a mutation has a chance of succeeding and to take that percentage and multiply it by the difference in the base score and the potential score. This way the Industrious-Industrious (100% chance of Industrious) combo will score higher than the Unweary-Diligent (8% chance) combo.
Or more simply, I could deduct one for each actual species attribute that doesn't match the potential attribute. Then I don't need to add percent mutation data to the program. This is almost the fix you did, but you boosted a drone for matching instead of deducting from a drone that didn't match. I think deducting is better because it maps to the potential outcome better.
Quote
At that point the program is trying to stabalize the attributes of the bees. This is used so that you can breed in flyer and nocternal and other attributes. I think I should add an option to the program to specify if you don't care about purifying attributes.
BTW
bees[combo[1]].targeted and bees[combo[1]].score or 0
That is almost a ternary operator. It can break down if the second value is nil.











