|
Belofte version 2.2.0
A promising chess program using the UCI or Winboard interface
|
board More...
#include <board.h>
Inheritance diagram for bBoard:
Collaboration diagram for bBoard:Public Member Functions | |
| bBoard (bBoard const &b) | |
| Copy board with limited board data, no board history. | |
| bBoard (bBoard const &b, bMove &m) | |
| Create copy of board with limited board data and history. | |
| bBoard (bFen const &fen) | |
| used by setFENInitialPos | |
| ~bBoard () override | |
| bBoard & | operator= (bBoard const &b) |
| bBoard & | operator= (bBoard &&b)=delete |
| void | invertColours () |
| invert colours update kingpos, update colour to move, castle rights, ... | |
| constexpr bGameStage | getGameStage () const |
| void | clearGameStage () |
| std::string | getGameStageName () const |
| void | calcGameStage () |
| calculate stage of game to assist in evaluation | |
| constexpr bool | needCalcMinorPieces () const |
| constexpr bool | noNeedCalcMinorPieces () const |
| void | setNeedCalcMinorPieces () |
| void | clearNeedCalcMinorPieces () |
| void | calcMinorPieces (bool const bForceRecalc) |
| Recalculate minor pieces, used for evaluation and end of game condition in case of less than 5 pieces. | |
| constexpr bmove_t | getMove () const |
| void | clearMove () |
| void | setMove (bmove_t const bmt) |
| movesequence_t const & | getPreviousMoves () const |
| void | setPreviousMoves (movesequence_t const &v) |
| movesequence_t const & | getVariation () const |
| void | clearVariation () |
| void | setVariation (bBoard const &chldbrd) |
| boardInfo_t | applyMove (bMove const &m) override |
| modification of board move is kept on previous board newboard does not have move stored and has flag to recalculate minor pieces | |
| operator std::string () const | |
| print board | |
Public Member Functions inherited from bBasicBoard | |
| bBasicBoard (bBasicBoard const &bb) | |
| virtual | ~bBasicBoard () |
| constexpr plynum_t | getPly () const |
| void | setPly (plynum_t const p) |
| void | incPly () |
| void | decPly () |
| constexpr bool | isEpSet () const |
| constexpr case_t | getEp () const |
| constexpr column_t | getEpColumn () const |
| void | setEp (case_t const e) |
| set ep case, it will actually be stored as column only rank will be calculated based on side to move function is never called to clear ep case or when ep is not set | |
| void | clearEp () |
| constexpr movenum50_t | getPly50Moves () const |
| void | setPly50Moves (movenum50_t const p) |
| void | incPly50Moves () |
| void | clearPly50Moves () |
| constexpr bool | hasCastleRights (uint8_t const f) const |
| void | setWhiteHasCastled () |
| void | setBlackHasCastled () |
| void | clearWhiteHasCastled () |
| void | clearBlackHasCastled () |
| constexpr bool | whiteHasCastled () const |
| constexpr bool | blackHasCastled () const |
| void | setCastleRights (uint8_t const f) |
| void | setCastleRights (uint8_t const f, bool const c) |
| void | clearCastleRights (uint8_t const f) |
| constexpr bool | isInCheck () const |
| void | setInCheck () |
| void | clearInCheck () |
| constexpr bool | isNonSilent () const |
| void | setNonSilent () |
| void | clearNonSilent () |
| constexpr piece_t | getCapturedPiece () const |
| void | setCapturedPiece (piece_t p) |
| void | clearCapturedPiece () |
| constexpr bool | whiteToMove () const |
| constexpr bool | blackToMove () const |
| constexpr int16_t | getMoveNumber () const |
| constexpr side_t | getColourToMove () const |
| constexpr bScore | minimizing () const |
| constexpr piece_t | getPiece (case_t const cf) const |
| constexpr piece_t | getPiece (column_t const iColumn, rank_t const iRank) const |
| piece_t | getPieceCtl (column_t const iColumn, rank_t const iRank) const |
| void | setPiece (case_t const cf, piece_t const piece) |
| void | setPiece (case_t const cf, uint8_t const piece) |
| piece_t | setGetPiece (column_t const newcol, rank_t const newrank, piece_t const piece) |
| piece_t | removePiece (column_t const newcol, rank_t const newrank) |
| void | clearPiece (case_t const cf) |
| constexpr bool | isFieldEmpty (case_t const cf) const |
| constexpr bool | isFieldEmpty (column_t const iColumn, rank_t const iRank) const |
| constexpr case_t | getWhiteKingPos () const |
| constexpr case_t | getBlackKingPos () const |
| void | movePiece (case_t const cf, case_t const ct, piece_t const np) |
| void | swapPiece (case_t const cf, piece_t const op, piece_t const np) |
| void | clearPiece (case_t const cf, piece_t const op) |
| void | restorePiece (case_t const cf, piece_t const op) |
| void | moveWhiteKing (case_t const cf, case_t const ct) |
| void | moveBlackKing (case_t const cf, case_t const ct) |
| bFen | getFEN () const |
| constexpr int8_t | pieceCount () const |
| std::string | getHashStr () const |
| constexpr hashkey_t | getHash () const |
| void | setHash (hashkey_t const newHash) |
| boardInfo_t | getBoardInfo () const |
| void | setBoardInfo (boardInfo_t boardInfo) |
| boardInfo_t | applyWhiteMove (bMove const &m) |
| boardInfo_t | applyBlackMove (bMove const &m) |
| void | unApplyMove (bMove const &m, boardInfo_t const oldBoardInfo) |
| exact restoration of basic board using move details | |
| boardInfo_t | makeBoardMove (column_t const oldcol, rank_t const oldrank, column_t const newcol, rank_t const newrank) |
| apply move to check if in check only, board to be discarded as it will be in incomplete state, no hash update no check flag set, etc. | |
| void | unMakeBoardMove (case_t const &cf, column_t const newcol, rank_t const newrank, boardInfo_t const oldBoardInfo) |
| undo makeBoardMove, restoring previous situation | |
Friends | |
| class | bPositionEvaluation |
| class | PosEvalPositionalBoard |
| class | bWhitePiece |
| class | bBlackPiece |
| std::ostream & | operator<< (std::ostream &os, bBoard const &bd) |
| print board | |
Additional Inherited Members | |
Protected Member Functions inherited from bBasicBoard | |
| bBasicBoard () | |
| bBasicBoard (bBasicBoard &&bb) | |
| bBasicBoard (bFen const &fen) | |
| bBasicBoard & | operator= (bBasicBoard const &bb) |
| bBasicBoard & | operator= (bBasicBoard &&)=delete |
| void | calcHash () |
| Set hash based on board position, also calc pieces Byte 0: bits 4-6 capture count (masked) bit 7 player to move We are using 64 bits for hash. | |
| void | capturePieceOn (piece_t const capturedPiece, case_t const ct) |
| Clear castle flag if rook captured update piece counter, update hash, clear field. | |
| void | setPieceKU (case_t const cf, piece_t const piece) |
| void | setPieceCount (int8_t const n) |
| void | incPieceCount () |
| void | decPieceCount () |
|
explicit |
Copy board with limited board data, no board history.
Definition at line 20 of file board.cpp.
Referenced by bBlackPiece, bBoard(), bBoard(), operator<<, operator=(), operator=(), and setVariation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
explicit |
| void bBoard::invertColours | ( | ) |
invert colours update kingpos, update colour to move, castle rights, ...
castledone, capturedcase, capturedpiece, bmove, eval
epcase
Definition at line 181 of file board.cpp.
Referenced by bel_debug::execute(), and cmd_eval::execute().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 68 of file board.h.
Referenced by PosEvalPositionalBoard::getEvaluation(), PosEvalStaticBoard::getEvaluation(), and getGameStageName().
Here is the caller graph for this function:| std::string bBoard::getGameStageName | ( | ) | const |
Definition at line 165 of file board.cpp.
Referenced by cmd_eval::execute(), and operator std::string().
Here is the call graph for this function:
Here is the caller graph for this function:| void bBoard::calcGameStage | ( | ) |
calculate stage of game to assist in evaluation
Definition at line 137 of file board.cpp.
Referenced by bBoard(), and bSearchAlgorithm::SearchBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 78 of file board.h.
Referenced by calcGameStage(), and calcMinorPieces().
Here is the caller graph for this function:
|
inline |
Definition at line 80 of file board.h.
Referenced by applyMove().
Here is the caller graph for this function:
|
inline |
Definition at line 82 of file board.h.
Referenced by calcMinorPieces().
Here is the caller graph for this function:| void bBoard::calcMinorPieces | ( | bool const | bForceRecalc | ) |
Recalculate minor pieces, used for evaluation and end of game condition in case of less than 5 pieces.
| bForceRecalc | force to recalculate |
Definition at line 66 of file board.cpp.
Referenced by bBoard(), cmd_eval::execute(), invertColours(), bSearchAlgorithm::RetrieveBoardEvaluation(), bSearchAlgorithm::RetrieveBoardEvaluationForWhite(), and bSearchAlgorithm::SearchBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 89 of file board.h.
Referenced by bGame::revertGameMove().
Here is the caller graph for this function:
|
inline |
Definition at line 91 of file board.h.
Referenced by applyMove().
Here is the caller graph for this function:
|
inline |
Definition at line 94 of file board.h.
Referenced by bBoard(), XboardMode::sendInfoSearching(), and setVariation().
Here is the caller graph for this function:
|
inline |
Definition at line 96 of file board.h.
Referenced by bSearchAlgorithm::SearchBestMove().
Here is the caller graph for this function:
|
inline |
Definition at line 98 of file board.h.
Referenced by UCIMode::sendInfoCurrMove(), UCIMode::sendInfoSearching(), UCIMode::sendInfoSearching(), XboardMode::sendInfoSearching(), and setVariation().
Here is the caller graph for this function:
|
inline |
Definition at line 100 of file board.h.
Referenced by bSearchAlgorithm::SearchBestMove().
Here is the caller graph for this function:| void bBoard::setVariation | ( | bBoard const & | chldbrd | ) |
Definition at line 225 of file board.cpp.
Referenced by SearchAlphaBeta::CalcBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
modification of board move is kept on previous board newboard does not have move stored and has flag to recalculate minor pieces
Reimplemented from bBasicBoard.
Definition at line 215 of file board.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), and SearchAlphaBeta::Quiescence().
Here is the call graph for this function:
Here is the caller graph for this function:| bBoard::operator std::string | ( | ) | const |
|
friend |
Definition at line 109 of file board.h.
Referenced by bPositionEvaluation.
|
friend |
Definition at line 110 of file board.h.
Referenced by PosEvalPositionalBoard.
|
friend |
Definition at line 111 of file board.h.
Referenced by bWhitePiece.
|
friend |
Definition at line 112 of file board.h.
Referenced by bBlackPiece.