TimePolicy

dicechess.engine.search.TimePolicy
trait TimePolicy

The variable part of TimeManager's clock allocation.

A policy estimates how many turns the moving side still has to budget for. TimeManager deliberately owns the safety envelope around that estimate — reserve, hard cap, panic clamp, and caller overhead — so every policy gets the same anti-flag guarantees.

Policies are pure and platform-independent. Consumers choose one when they construct a TimeManager; deployment configuration (environment variables, Worker bindings, command-line flags) belongs to the consumer rather than this shared engine module.

Attributes

Source
TimePolicy.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object EmpiricalV1
object LegacyLinear

Members list

Value members

Abstract methods

def estimateMovesToGo(clock: ClockState): Double

Estimates the number of further turns to spread the spendable clock over.

Estimates the number of further turns to spread the spendable clock over.

The estimate is fractional because empirical expected remaining turns and interpolation between observations are not restricted to whole numbers.

ClockState.movesToGo is an explicit time-control override and is applied by TimeManager before this estimate is used. The manager also clamps the final value to at least one.

Attributes

Source
TimePolicy.scala
def id: String

Stable configuration/reporting identifier. Version policy ids when their behaviour changes materially.

Stable configuration/reporting identifier. Version policy ids when their behaviour changes materially.

Attributes

Source
TimePolicy.scala