#include "common.h"
#include <algorithm>
#include <string>
Go to the source code of this file.
|
uint | matsig_getCount (matSigT m, pieceT p) |
|
matSigT | matsig_setCount (matSigT m, pieceT p, uint count) |
|
std::string | matsig_makeString (matSigT matsig) |
|
bool | matsig_isReachable (matSigT mStart, matSigT mTarget, bool promos, bool upromo) |
|
bool | matsig_isReachablePawns (matSigT mStart, matSigT mTarget) |
|
matSigT | matsig_Make (const byte *materialCounts) |
|
bool | hpSig_PossibleMatch (uint hpSig, const byte *changeList) |
|
bool | hpSig_Prefix (const byte *changeListA, const byte *changeListB) |
|
uint | hpSig_Final (const byte *changeList) |
|
uint | hpSig_AddPawn (uint hpSig, colorT color, fyleT fyle) |
|
uint | hpSig_ClearPawn (uint hpSig, colorT color, fyleT fyle) |
|
std::pair< uint16_t, uint16_t > | hpSig_make (const pieceT *board) |
| Creates a 16-bits bitmap of the missing pawns in the home ranks. More...
|
|
bool | hpSig_match (int hpSig, int nMoved, const byte *changeList) |
|
◆ MASK_BB
#define MASK_BB 0x000000C0 |
◆ MASK_BN
#define MASK_BN 0x00000030 |
◆ MASK_BP
#define MASK_BP 0x0000000F |
◆ MASK_BQ
#define MASK_BQ 0x00000C00 |
◆ MASK_BR
#define MASK_BR 0x00000300 |
◆ MASK_WB
#define MASK_WB 0x000C0000 |
◆ MASK_WN
#define MASK_WN 0x00030000 |
◆ MASK_WP
#define MASK_WP 0x0000F000 |
◆ MASK_WQ
#define MASK_WQ 0x00C00000 |
◆ MASK_WR
#define MASK_WR 0x00300000 |
◆ MATSIG_Count_BB
◆ MATSIG_Count_BN
◆ MATSIG_Count_BP
◆ MATSIG_Count_BQ
◆ MATSIG_Count_BR
◆ MATSIG_Count_WB
◆ MATSIG_Count_WN
◆ MATSIG_Count_WP
◆ MATSIG_Count_WQ
◆ MATSIG_Count_WR
◆ MATSIG_FlipColor
#define MATSIG_FlipColor |
( |
|
x | ) |
((x) >> 12) | (((x) & 0x00000FFF) << 12) |
◆ MATSIG_Has_BB
#define MATSIG_Has_BB |
( |
|
x | ) |
((x) & MASK_BB) |
◆ MATSIG_Has_BN
#define MATSIG_Has_BN |
( |
|
x | ) |
((x) & MASK_BN) |
◆ MATSIG_Has_BP
#define MATSIG_Has_BP |
( |
|
x | ) |
((x) & MASK_BP) |
◆ MATSIG_Has_BQ
#define MATSIG_Has_BQ |
( |
|
x | ) |
((x) & MASK_BQ) |
◆ MATSIG_Has_BR
#define MATSIG_Has_BR |
( |
|
x | ) |
((x) & MASK_BR) |
◆ MATSIG_Has_WB
#define MATSIG_Has_WB |
( |
|
x | ) |
((x) & MASK_WB) |
◆ MATSIG_Has_WN
#define MATSIG_Has_WN |
( |
|
x | ) |
((x) & MASK_WN) |
◆ MATSIG_Has_WP
#define MATSIG_Has_WP |
( |
|
x | ) |
((x) & MASK_WP) |
◆ MATSIG_Has_WQ
#define MATSIG_Has_WQ |
( |
|
x | ) |
((x) & MASK_WQ) |
◆ MATSIG_Has_WR
#define MATSIG_Has_WR |
( |
|
x | ) |
((x) & MASK_WR) |
◆ MATSIG_HasBishops
◆ MATSIG_HasKnights
◆ MATSIG_HasPawns
◆ MATSIG_HasQueens
◆ MATSIG_HasRooks
◆ SHIFT_BB
◆ SHIFT_BN
◆ SHIFT_BP
◆ SHIFT_BQ
◆ SHIFT_BR
◆ SHIFT_WB
◆ SHIFT_WN
◆ SHIFT_WP
◆ SHIFT_WQ
◆ SHIFT_WR
◆ matSigT
◆ hpSig_AddPawn()
◆ hpSig_ClearPawn()
◆ hpSig_Final()
uint hpSig_Final |
( |
const byte * |
changeList | ) |
|
◆ hpSig_make()
std::pair<uint16_t, uint16_t> hpSig_make |
( |
const pieceT * |
board | ) |
|
|
inline |
Creates a 16-bits bitmap of the missing pawns in the home ranks.
Used to speed up the searches of positions with the same pawn structure.
- Returns
- a std::pair containing the bitmap and the number of moved pawns.
Definition at line 298 of file matsig.h.
◆ hpSig_match()
bool hpSig_match |
( |
int |
hpSig, |
|
|
int |
nMoved, |
|
|
const byte * |
changeList |
|
) |
| |
|
inline |
◆ hpSig_PossibleMatch()
bool hpSig_PossibleMatch |
( |
uint |
hpSig, |
|
|
const byte * |
changeList |
|
) |
| |
◆ hpSig_Prefix()
bool hpSig_Prefix |
( |
const byte * |
changeListA, |
|
|
const byte * |
changeListB |
|
) |
| |
◆ matsig_getCount()
◆ matsig_isReachable()
bool matsig_isReachable |
( |
matSigT |
mStart, |
|
|
matSigT |
mTarget, |
|
|
bool |
promos, |
|
|
bool |
upromo |
|
) |
| |
◆ matsig_isReachablePawns()
◆ matsig_Make()
◆ matsig_makeString()
std::string matsig_makeString |
( |
matSigT |
matsig | ) |
|
◆ matsig_setCount()
◆ HPSIG_Empty
const uint HPSIG_Empty = 0x0 |
◆ HPSIG_StdStart
const uint HPSIG_StdStart = 0xFFFF |
◆ MASK_BY_PIECE
Initial value:
Definition at line 70 of file matsig.h.
◆ MATSIG_Empty
◆ MATSIG_StdStart
Initial value:
Definition at line 178 of file matsig.h.
◆ SHIFT_BY_PIECE
const uint SHIFT_BY_PIECE[16] |
Initial value:
Definition at line 89 of file matsig.h.