Balancing 7's on 1v1
Discover how Colonist.io uses a unique algorithm to balance the dice rolls in 1v1 matches.
The 7 Streaks
We dug into the data and found that a two-seven streak occurs 1.6 times per game. Even worse, three-seven streaks happen in a staggering 70% of games, practically every other match! Do the math: with an average of 15,000 1v1 games per day, that's:
- 75 players experiencing an unfair eight-seven streak.
- 165 players struggling with a dominant seven-streak advantage for their opponent.
- Nearly 5,000 players facing a four-seven streak daily.
The 7 Imbalance
But wait, there's more! Even with an algorithm designed to avoid streaks, a seven imbalance can still rear its ugly head. Imagine this scenario:
Yikes! In this situation, your opponent hoarded 75% of all sevens, leaving you at a significant disadvantage. Let's dive into actual data
Only 30% of our games have an even split of sevens. If we do the math like before, 100 players each day only get 10% of all the sevens rolled. So, in a game with 10 sevens, you only rolled one!
Dynamic Seven Adjustments
So, here's the fix: before each Balanced Dice roll, we fine-tune the probability of rolling a seven based on whose turn it is.
- If you're on a seven streak, the chance of you rolling another seven decreases
- Likewise, if your opponent is on a winning seven streak, it becomes less likely for the sevens to roll in their favor.
Additionally, we keep track of the overall seven distributions throughout the game. Ideally, in a two-player match, each player should have roughly 50% of the sevens. Any deviation from this balance triggers an adjustment:
- We calculate the difference between the ideal and actual seven ownership.
- We translate this difference into a percentage.
- This percentage is then added to the "streak adjustment" mentioned earlier.
- Voila! The final probability of rolling a seven is now perfectly balanced, no matter who's winning or losing.
The results
Look at these results. We can not only reduce the chance of streaks, but also make sure each player gets the same number of total seven rolls.
Final Code: link
Remember, balanced gameplay is at the heart of Colonist.io, and we're constantly refining our algorithms to ensure fair and exciting matches, especially in those intense 1v1’s. So, roll on, colonists, and may the sevens (and all other numbers) be ever in your favor!
Feel free to participate in our Discord to tell us what you like and don’t like!
- Mau!