PieceDiversity

dicechess.engine.search.PieceDiversity

Unweighted Piece Diversity Index (PDI): presence of Pawn, Knight, Bishop, Rook, and Queen for one side.

Each represented type contributes one, regardless of its number of pieces or their squares. Kings are excluded. This measures material diversity, not mobility or the number of dice a side can use: a present type may be blocked, and promotion can restore an absent type. The index is independent of the active color and dice pool.

Attributes

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

Members list

Value members

Concrete methods

def count(state: GameState, color: Color): Int

Returns the number of non-king piece types present for color, in the inclusive range 0 to 5.

Returns the number of non-king piece types present for color, in the inclusive range 0 to 5.

Attributes

Source
PieceDiversity.scala
def difference(state: GameState, color: Color): Int

Returns own PDI minus the opponent's PDI from color's perspective, in the inclusive range -5 to 5.

Returns own PDI minus the opponent's PDI from color's perspective, in the inclusive range -5 to 5.

Attributes

Source
PieceDiversity.scala