How the KCD2 Dice Solver works

How the KCD2 Dice Solver scores a throw, computes each dice set's exact expected value, searches for the best six dice, values badges, and where its numbers are estimates.

Scoring

Scoring is the Kingdom Come wiki's table for the game's Farkle variant. A throw scores the best way of splitting its dice into combinations; dice left over score nothing.

CombinationPoints
Each 1100
Each 550
Three 1s1000
Three of a kind (2-6)100 x face
Each die beyond three of a kinddoubles the set
Straight 1-5500
Straight 2-6750
Straight 1-61500

Expected score per throw

The expected value is exact. Scoring depends only on how many of each face a throw shows, so the six dice are convolved into a distribution over those counts: at most 924 of them, instead of 46,656 ordered outcomes. The bust chance and the 90th-percentile throw come from the same distribution.

Choosing the six dice

The solver evaluates whole sets, because a set's value is not the sum of its dice. Dice with identical face odds are pooled first (several of the game's dice are plain fair dice under different names). Small inventories are enumerated exhaustively and reported as provably optimal; larger ones use a multi-start steepest-ascent local search and are reported as not proven.

Points per turn

Turn value depends on how you play, so it is a seeded Monte Carlo simulation of an explicit policy: hold the subset that maximises points plus 60 for each die left to throw, and bank at 300.

Badges

A badge only takes effect when the opponent brings a badge of the same tier, so the solver recommends one badge per tier rather than one overall winner.

What the numbers are not

Sources