dicechess.engine.model.ModelRole
See theModelRole companion object
What a trained model is used for, declared by its manifest and checked before the model is wired into a search.
The role is not cosmetic metadata: the three roles below answer different questions about different objects, and feeding one where another is expected produces a bot that runs, reports no error, and plays badly. Tensor width cannot tell them apart — two roles may share a feature schema and therefore an identical [batch, F] input — so the role is the only thing that can.
- ModelRole.PositionValue — P(the evaluated color wins) for a position whose next roll is unknown. The leaf evaluator of every ONNX bot here, and the root rescorer, are this role.
- ModelRole.ChanceCollapse — the expectation a chance node would compute for the position reached by a turn, i.e. a learned replacement for expanding all 56 weighted dice outcomes. Trained against a deeper search's value, not against game outcomes, so its scale is an expectation and not a win probability.
- ModelRole.MovePreRank — a score per candidate turn, used only to choose which candidates a search expands. Ordering is all that is consumed; the absolute value is never compared against a value-model score.
The ids are the strings a manifest carries and match the role inventory of the training repository's train/serve contract, so one artifact describes itself the same way on both sides.
Attributes
- Companion
- object
- Source
- ModelRole.scala
- Graph
-
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article