KingCaptureProbability

dicechess.engine.search.KingCaptureProbability

Probabilistic king (and queen) capture analysis for Dice Chess.

Given a position, enumerates all 216 possible 3d6 outcomes (grouped into 56 weighted multisets) and determines whether the opponent can capture the defender's king (or queen) on their next turn.

King-capture paths are always legal regardless of the Maximum Micro-moves Rule, so a depth-first search with early exit yields exact probabilities. Queen-capture paths respect the Maximum Micro-moves Rule; the returned probability may therefore be slightly overestimated in edge cases where a queen capture is not part of any max-length sequence.

Attributes

Source
KingCaptureProbability.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def kingCaptureProbability(state: GameState, defenderColor: Color): Double

Returns the probability [0.0, 1.0] that the opponent can capture the defender's king on their next turn.

Returns the probability [0.0, 1.0] that the opponent can capture the defender's king on their next turn.

Attributes

Source
KingCaptureProbability.scala
def queenCaptureProbability(state: GameState, defenderColor: Color): Double

Returns the probability [0.0, 1.0] that the opponent can capture a defender's queen on their next turn.

Returns the probability [0.0, 1.0] that the opponent can capture a defender's queen on their next turn.

This method applies the same DFS used for king capture and may slightly overestimate the true probability in edge cases where a queen capture is not part of any max‑length micro‑move sequence (Maximum Micro‑moves Rule).

Attributes

Source
KingCaptureProbability.scala