CollapseModel

dicechess.engine.search.CollapseModel
See theCollapseModel companion object
final case class CollapseModel(modelPath: String, extractFeatures: (GameState, Color) => Array[Float], lossGuard: Boolean = ..., contract: Option[ModelManifest] = ...)

A model that answers a root candidate's whole chance node in one row instead of an expansion of the opponent's 56 weighted dice outcomes — wired as ChanceCollapse, whose Scaladoc states what the hook keeps and what it gives up.

It gets its own ONNX session, never the leaf model's: the two answer different questions (an expectation over the opponent's roll versus the value of one position), so a model in this slot is a different artifact with a different training target, and CollapseModel.fromPackage refuses one whose manifest says otherwise.

Value parameters

extractFeatures

this model's own feature extractor

lossGuard

whether to re-establish the exact search's loss-taint rule with one KingCaptureProbability search per root candidate — see ChanceCollapse.lossGuard

modelPath

path to the chance-collapse model, independent of the main model

Attributes

Companion
object
Source
OnnxExpectimaxSearch.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