[ad_1]
I was trying to come up with a genetic system for my game. However, after doing the math I found the system I had in mind won’t really work.
Characters have 5 stats that can range from 0 to 12. What I was planning on doing was averaging each stat, and then rolling two numbers for each. The one that would be inherited for each stat would be the one closest to the average.
However, I found the bias isn’t that great. For any number between 0 and 12, there’s a 23/144 chance, or about a 15% chance of it occurring. This means say that if the two parents had a 12 in a score, there was an 85% chance about that the offspring’s score would be lower than 12. Clearly, that isn’t going to work. If both parents have the highest number, the odds should be weighed far more towards them.
I could increase the number of rolls, but adding more rolls decreases the odds of the farthest result too much.
If it matters, I’m trying to recreate the genetic system of The Sims 2. I have no idea how it generated its results, other than that all possibilities would possible but somehow weighted based on the parents. The totals of all 5 stats were also always between 25 and 35. I know how that was accomplished, but it doesn’t help me with the first part.
I did think of an alternate method, but I don’t like it much either. I was thinking of taking the averages of the parents, and then incrementing every stat at random x times, then doing it again x times but this time decrementing. This however doesn’t work too well either. Either it would heavily weigh scores towards the middle, or it would make it nigh impossible for a child to match its parent. If I added too many increments/decrements, it would probably result in the final stats bearing no resemblence to the parents. I may as well just be starting with 0, and incrementing stats at random until a total of 30 is reached.
What would be a good system for my game?
[ad_2]