SearchScoring

dicechess.engine.search.SearchScoring
object SearchScoring

Shared scoring utilities used by all SearchAlgorithm implementations.

Centralises the terminal-win sentinel and the path-scoring logic so that every strategy applies them consistently.

Attributes

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

Members list

Value members

Concrete methods

def isTerminalWin(state: GameState, path: List[Move]): Boolean

Returns true if the path ends with an immediate King capture (terminal win).

Returns true if the path ends with an immediate King capture (terminal win).

Attributes

Source
SearchAlgorithm.scala
def scorePath(state: GameState, path: List[Move], evalFn: (GameState, Color) => Int = ...): ScoredSequence

Attributes

Source
SearchAlgorithm.scala

Concrete fields

val TerminalWinScore: Int

Sentinel score assigned to any path that ends with a King capture.

Sentinel score assigned to any path that ends with a King capture.

Using Int.MaxValue guarantees that any winning path outscores all material-only evaluations. Strategies that prefer shorter wins over longer ones must compare path lengths separately (see GreedySearch).

Attributes

Source
SearchAlgorithm.scala