My Project
osl::eval::ml::KnightFork Class Reference

#include <minorPiece.h>

Public Types

enum  { DROP_DIM = PTYPE_SIZE*PTYPE_SIZE , ONE_DIM = DROP_DIM*2*2 , DIM = ONE_DIM * EvalStages }

Public Member Functions

template<osl::Player Defense>
osl::MultiIntPair evalOne (const NumEffectState &state, bool has_knight, BoardMask &knight_fork_squares, std::pair< Square, int > &knight_drop)
template<osl::Player Defense>
osl::MultiIntPair accumulate (const NumEffectState &state, bool has_knight, const BoardMask &knight_fork_squares, std::pair< Square, int > &knight_drop)
template<osl::Player P>
osl::MultiIntPair evalWithUpdate (const NumEffectState &state, Move moved, CArray< BoardMask, 2 > &knight_fork_squares, CArray< std::pair< Square, int >, 2 > &knight_drop)

Static Public Member Functions

static void setUp (const Weights &weights)
template<Player Defense>
static MultiIntPair evalOne (const NumEffectState &state, bool has_knight, BoardMask &knight_fork_squares, std::pair< Square, int > &knight_drop)
static MultiIntPair eval (const NumEffectState &state, CArray< BoardMask, 2 > &knight_fork_squares, CArray< std::pair< Square, int >, 2 > &knight_drop)
template<Player P>
static MultiIntPair evalWithUpdate (const NumEffectState &state, Move moved, CArray< BoardMask, 2 > &knight_fork_squares, CArray< std::pair< Square, int >, 2 > &knight_drop)
static bool isForkSquare (const NumEffectState &state, Player defense, int y, int x0, int x1)
static int index (Ptype a, Ptype b)
static bool isTarget (Ptype ptype)

Static Public Attributes

static CArray< MultiInt, ONE_DIMtable

Static Private Member Functions

template<Player P, Player Defense>
static void updateSquares (const NumEffectState &state, Move moved, BoardMask &knight_fork_squares)
template<osl::Player Defense>
static MultiIntPair accumulate (const NumEffectState &state, bool has_knight, const BoardMask &knight_fork_squares, std::pair< Square, int > &knight_drop)

Detailed Description

Definition at line 1667 of file minorPiece.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DROP_DIM 
ONE_DIM 
DIM 

Definition at line 1670 of file minorPiece.h.

Member Function Documentation

◆ accumulate() [1/2]

template<osl::Player Defense>
osl::MultiIntPair osl::eval::ml::KnightFork::accumulate ( const NumEffectState & state,
bool has_knight,
const BoardMask & knight_fork_squares,
std::pair< Square, int > & knight_drop )

◆ accumulate() [2/2]

template<osl::Player Defense>
MultiIntPair osl::eval::ml::KnightFork::accumulate ( const NumEffectState & state,
bool has_knight,
const BoardMask & knight_fork_squares,
std::pair< Square, int > & knight_drop )
staticprivate

Referenced by evalWithUpdate().

◆ eval()

◆ evalOne() [1/2]

◆ evalOne() [2/2]

template<Player Defense>
MultiIntPair osl::eval::ml::KnightFork::evalOne ( const NumEffectState & state,
bool has_knight,
BoardMask & knight_fork_squares,
std::pair< Square, int > & knight_drop )
static

References eval().

Referenced by eval(), and evalWithUpdate().

◆ evalWithUpdate() [1/2]

template<osl::Player P>
osl::MultiIntPair osl::eval::ml::KnightFork::evalWithUpdate ( const NumEffectState & state,
Move moved,
CArray< BoardMask, 2 > & knight_fork_squares,
CArray< std::pair< Square, int >, 2 > & knight_drop )

◆ evalWithUpdate() [2/2]

template<Player P>
MultiIntPair osl::eval::ml::KnightFork::evalWithUpdate ( const NumEffectState & state,
Move moved,
CArray< BoardMask, 2 > & knight_fork_squares,
CArray< std::pair< Square, int >, 2 > & knight_drop )
static

◆ index()

int osl::eval::ml::KnightFork::index ( Ptype a,
Ptype b )
inlinestatic

Definition at line 1692 of file minorPiece.h.

References osl::PTYPE_SIZE.

Referenced by accumulate(), evalOne(), and setUp().

◆ isForkSquare()

bool osl::eval::ml::KnightFork::isForkSquare ( const NumEffectState & state,
Player defense,
int y,
int x0,
int x1 )
static

◆ isTarget()

bool osl::eval::ml::KnightFork::isTarget ( Ptype ptype)
inlinestatic

Definition at line 1696 of file minorPiece.h.

References osl::KNIGHT, osl::LANCE, osl::PAWN, and osl::unpromote().

Referenced by updateSquares().

◆ setUp()

void osl::eval::ml::KnightFork::setUp ( const Weights & weights)
static

◆ updateSquares()

Member Data Documentation

◆ table

osl::CArray< osl::MultiInt, 256 *2 *2 > osl::eval::ml::KnightFork::table
static

Definition at line 1688 of file minorPiece.h.

Referenced by accumulate(), evalOne(), and setUp().


The documentation for this class was generated from the following files: