RootRescore

dicechess.engine.search.RootRescore
final case class RootRescore(evalBatch: (Array[GameState], Color) => Array[Int], weight: Double)

Root-level rescoring: after the search's own chance-node expectation is computed for each root candidate, blend it with a second, cheaper-at-the-root evaluator run once on the candidates' own resulting positions (before the opponent's roll) — finalScore = (1 - weight) * searchValue + weight * rescoreValue.

Meant for a tactically sharp but leaf-prohibitive evaluator: e.g. king/queen capture-probability features cost a 216-outcome DFS each, far too expensive under a chance node's hundreds of leaves, but cheap enough for the handful of root candidates (ExpectimaxConfig.candidateLimit).

A candidate where at least one dice roll loses our king outright (ExpectimaxSearch.LossValue) is never rescored, at any weight — that sentinel must always rank last regardless of what the rescorer thinks of the resulting position (see the root loop's blendedRootValue).

Value parameters

evalBatch

the rescoring evaluator, same batching contract as the search's own evalBatch

weight

blend weight; must be in [0, 1]. Zero is deliberately accepted as an operationally safe way to disable a configured rescorer: it is exactly equivalent to None and does not invoke evalBatch.

Attributes

Source
ExpectimaxSearch.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product