top of page
Search

Coding a Model(part 1.5)

Humble Pie Time: I was working on the part 2 post when I noticed a whole in my model. I was looking at my numbers and they seemed High. So I started looking around and found this great article:


When My distributions didn't match I started looking at the code. And found this problem. When drawing the wager cards in a war if one player is out of cards you get locked in a state that keeps counting rounds but doesn't resolve. This is surprisingly common.

So we fix it by adding some state to the OutOfCardsException and improving the handling


from the game class


I also lowered the boredom threshold to 400 rounds.

Results


We get a much cleaner distribution over 100,000 games





7 views0 comments

Recent Posts

See All
bottom of page