BudgetedRules

dicechess.engine.search.BudgetedRules
object BudgetedRules

Opt-in bounded traversal; the existing complete rules APIs are unchanged.

One work unit admits a move-generator invocation, an examined micro-move, or a capture-roll iteration. A single move-generator invocation is not preempted internally. These counters bound traversal and retained path entries, not elapsed time, instructions or heap bytes; callers still need external wall/memory guards.

Attributes

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

Members list

Type members

Classlikes

final class Budget(val limit: Long)

Share only within one synchronous invocation. Counts are cumulative across queries using this budget. Exhaustion is sticky: a denied admission cannot later be resumed as a complete computation.

Share only within one synchronous invocation. Counts are cumulative across queries using this budget. Exhaustion is sticky: a denied admission cannot later be resumed as a complete computation.

Attributes

Source
BudgetedRules.scala
Supertypes
class Object
trait Matchable
class Any
enum Outcome[+A]

Incomplete computations expose only cumulative work, never partial paths or a partial exact count.

Incomplete computations expose only cumulative work, never partial paths or a partial exact count.

Attributes

Source
BudgetedRules.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def kingCapturePath(state: GameState, budget: Budget): Outcome[Option[List[Move]]]

First canonical king-capture path for the incoming active color and remaining dice, without replacing either. A found capture is a complete existence proof and may stop before other legal paths are generated. Complete None proves absence; exhaustion returns no path or absence claim. King captures are legal regardless of turn maximality. Counts use the shared cumulative budget; atomic generator calls still require an external wall/memory guard.

First canonical king-capture path for the incoming active color and remaining dice, without replacing either. A found capture is a complete existence proof and may stop before other legal paths are generated. Complete None proves absence; exhaustion returns no path or absence claim. King captures are legal regardless of turn maximality. Counts use the shared cumulative budget; atomic generator calls still require an external wall/memory guard.

Attributes

Source
BudgetedRules.scala
def kingCaptureRolls(state: GameState, defender: Color, budget: Budget): Outcome[Int]

Exact successful ordered-roll count out of DiceRolls.totalOrderedRolls. The attacker is the defender's opponent, independent of incoming active color/dice, as in KingCaptureProbability.kingCaptureProbability. A missing defender king has count zero. King capture is always legal, so each roll can stop at its first capture without buffering all paths.

Exact successful ordered-roll count out of DiceRolls.totalOrderedRolls. The attacker is the defender's opponent, independent of incoming active color/dice, as in KingCaptureProbability.kingCaptureProbability. A missing defender king has count zero. King capture is always legal, so each roll can stop at its first capture without buffering all paths.

Attributes

Source
BudgetedRules.scala
def turnPaths(state: GameState, budget: Budget): Outcome[List[List[Move]]]

Ordered full legal paths, with king captures before maximal-dice normal paths, as in TurnGenerator. An empty complete list means a pass. Exhaustion during generation discards the buffered prefix.

Ordered full legal paths, with king captures before maximal-dice normal paths, as in TurnGenerator. An empty complete list means a pass. Exhaustion during generation discards the buffered prefix.

Attributes

Source
BudgetedRules.scala