FeatureSchema

dicechess.engine.model.FeatureSchema
See theFeatureSchema companion object
final class FeatureSchema

One feature-extraction contract of this engine: the id a model manifest names, the column layout that id promises, and the extractor that produces a row.

This is what makes a manifest's featureSchema field actionable rather than documentation. A host that loads a model no longer hardcodes which extractor to pair with it — the artifact declares its schema, this registry resolves it, and a model trained on a different layout fails to load instead of silently receiving a vector in which every column means something else. That failure mode is the reason the field exists: two schemas of equal width (there is no such pair today, but nothing prevents one) would otherwise be indistinguishable at run time.

The engine is the single source of truth for the values themselves — every extractor here is the same code the training enrichment calls — so train == serve holds by construction rather than by a Python reimplementation.

Value parameters

columnNames

the layout in extract's order; its length is the input width a conforming model must declare

extract

(state, color) => row, from color's perspective and independent of state's active color and dice pool

id

the extractor's own schemaId, never a string repeated here

Attributes

Companion
object
Source
FeatureSchema.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
FeatureSchema.scala

Concrete fields

val columnNames: List[String]

Attributes

Source
FeatureSchema.scala
val extract: (GameState, Color) => Array[Float]

Attributes

Source
FeatureSchema.scala
val featureCount: Int

Input width a model on this schema must declare — [batch, featureCount].

Input width a model on this schema must declare — [batch, featureCount].

Attributes

Source
FeatureSchema.scala
val id: String

Attributes

Source
FeatureSchema.scala