|
Belofte version 2.2.0
A promising chess program using the UCI or Winboard interface
|
#include <movelist.h>
Public Member Functions | |
| bMoveList () | |
| bMoveList (bMoveList &ml) | |
| ~bMoveList () | |
| bMoveList & | operator= (bMoveList const &ml) |
| bMoveList (bMoveList const &ml)=delete | |
| bMoveList (bMoveList &&ml)=delete | |
| bMoveList & | operator= (bMoveList &&ml)=delete |
| movenum_t | adjustQSMoves () |
| reduce the number of QS moves to filter out the best ones only | |
| bool | atLeastOneMovePossible (bBasicBoard &b) |
| see if at least one move can be played e.g. | |
| movenum_t | generateMoves (bBasicBoard const &b) |
| generate moves if not yet generated | |
| void | emptyMoveList () |
| constexpr movenum_t | getNumberOfMoves () const |
| constexpr movenum_t | getNumberOfQSMoves () const |
| bMove const & | operator[] (movenum_t const moveid) const |
| constexpr fromto_t | getFromTo (movenum_t const moveid) const |
| constexpr bmove_t | getBMoveT (movenum_t const moveid) const |
| movenum_t | addWhiteMoveIfValid (bBasicBoard const &b, bMove &m) |
| Only add move to movelist if valid. | |
| movenum_t | addBlackMoveIfValid (bBasicBoard const &b, bMove &m) |
| Only add move to movelist if valid. | |
| movenum_t | addWhitePromotionIfValid (bBasicBoard const &b, bMove &m) |
| Only add move to movelist if valid. | |
| movenum_t | addBlackPromotionIfValid (bBasicBoard const &b, bMove &m) |
| Only add move to movelist if valid. | |
| void | sortMoves (bool const bFastSort) |
| sort moves and update bestmove id if less than 5 moves, sort all if more than 5 moves, and less than 3 qs moves, sort 3 best if more than 5 moves and at least 3 qs moves, sort qsmoves + 1 | |
| void | clearScores () |
| void | clearScores (bScore const sc) |
| bool | setScoreOfMove (movenum_t const moveid, bScore const score) |
| Store score of move and update best move. | |
| bool | setMinScoreOfMove (movenum_t const moveid, bScore const score) |
| Store score of move and update best move (minimum) | |
| void | setScoreOfMoveUnsorted (movenum_t const moveid, bScore const score) |
| Store score of move and update best move. | |
| void | setMinScoreOfMoveUnsorted (movenum_t const moveid, bScore const score) |
| Store score of move and update best move. | |
| constexpr bScore | getBestMoveScore () const |
| void | setBestMoveScore (bScore const score) |
| void | setBestMoveScore (movenum_t const moveid, bScore const score) |
| void | setMoveScore (movenum_t const moveid, bScore const score) |
| constexpr movenum_t | getBestMoveId () const |
| void | setBestMoveId (movenum_t const n) |
| void | clearBestMoveId () |
| void | setNeedSorted () |
| void | clearNeedSorted () |
| void | setKeepScores () |
| void | clearKeepScores () |
Public Attributes | |
| movenum_t | curmoveid = 0 |
Protected Member Functions | |
| constexpr bool | isGenerated () const |
| void | setIsGenerated () |
| void | clearIsGenerated () |
| constexpr bool | isSorted () const |
| constexpr bool | isNotSorted () const |
| void | setIsSorted () |
| void | clearIsSorted () |
| constexpr bool | isOnlyMove () const |
| void | setIsOnlyMove () |
| void | clearIsOnlyMove () |
| constexpr bool | isPossibleMove () const |
| void | setIsPossibleMove () |
| void | clearIsPossibleMove () |
| constexpr bool | isNeedSorted () const |
| constexpr bool | isNoNeedSorted () const |
| constexpr bool | isKeepScores () const |
| constexpr bool | isNoKeepScores () const |
Friends | |
| std::ostream & | operator<< (std::ostream &os, bMoveList const &ml) |
Definition at line 15 of file movelist.h.
|
inlineexplicit |
Definition at line 17 of file movelist.h.
Referenced by bMoveList(), bMoveList(), bMoveList(), operator<<, operator=(), and operator=().
Here is the caller graph for this function:
|
inline |
|
inline |
Definition at line 27 of file movelist.h.
|
delete |
Here is the call graph for this function:
|
delete |
Here is the call graph for this function:
Here is the call graph for this function:| movenum_t bMoveList::adjustQSMoves | ( | ) |
reduce the number of QS moves to filter out the best ones only
Definition at line 460 of file movelist.cpp.
Here is the call graph for this function:| bool bMoveList::atLeastOneMovePossible | ( | bBasicBoard & | b | ) |
see if at least one move can be played e.g.
(stale-)mate eval called from addMoveToList, iterative search main loop and gameEndedResult
Definition at line 481 of file movelist.cpp.
Referenced by bPositionEvaluation::gameEndedResult(), and bSearchAlgorithm::SearchBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:| movenum_t bMoveList::generateMoves | ( | bBasicBoard const & | b | ) |
generate moves if not yet generated
| b | board to generate moves |
Definition at line 417 of file movelist.cpp.
Referenced by bPgnMove::bPgnMove(), bPgnMoveList::bPgnMoveList(), SearchAlphaBeta::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchRandom::CalcBestMove(), bel_debug::execute(), bGame::playPGNMoves(), and SearchAlphaBeta::Quiescence().
Here is the call graph for this function:
Here is the caller graph for this function:| void bMoveList::emptyMoveList | ( | ) |
Definition at line 447 of file movelist.cpp.
Referenced by SearchRandom::CalcBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 49 of file movelist.h.
Referenced by bPgnMove::bPgnMove(), SearchEvalPosOnly::CalcBestMove(), generateMoves(), and operator<<.
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 51 of file movelist.h.
Referenced by operator<<, and SearchAlphaBeta::Quiescence().
Here is the caller graph for this function:Definition at line 54 of file movelist.h.
Definition at line 56 of file movelist.h.
Definition at line 58 of file movelist.h.
Referenced by bPgnMoveList::bPgnMoveList().
Here is the caller graph for this function:| movenum_t bMoveList::addWhiteMoveIfValid | ( | bBasicBoard const & | b, |
| bMove & | m ) |
Only add move to movelist if valid.
| b | board on which move is calculated |
| m | move to be added |
Definition at line 251 of file movelist.cpp.
Referenced by bWhitePawn::addCapturePawnMove(), bWhitePawn::addEPMove(), bWhitePiece::addMove(), bWhitePiece::addMoves(), bWhitePawn::addNonCapturePawnMove(), and bWhiteKing::GenerateMoves().
Here is the call graph for this function:
Here is the caller graph for this function:| movenum_t bMoveList::addBlackMoveIfValid | ( | bBasicBoard const & | b, |
| bMove & | m ) |
Only add move to movelist if valid.
| b | board on which move is calculated |
| m | move to be added |
Definition at line 267 of file movelist.cpp.
Referenced by bBlackPawn::addCapturePawnMove(), bBlackPawn::addEPMove(), bBlackPiece::addMove(), bBlackPiece::addMoves(), bBlackPawn::addNonCapturePawnMove(), and bBlackKing::GenerateMoves().
Here is the call graph for this function:
Here is the caller graph for this function:| movenum_t bMoveList::addWhitePromotionIfValid | ( | bBasicBoard const & | b, |
| bMove & | m ) |
Only add move to movelist if valid.
| b | board on which move is calculated |
| m | move to be added |
Definition at line 283 of file movelist.cpp.
Referenced by bWhitePawn::addCapturePromotionMove(), and bWhitePawn::addNonCapturePromotionMove().
Here is the call graph for this function:
Here is the caller graph for this function:| movenum_t bMoveList::addBlackPromotionIfValid | ( | bBasicBoard const & | b, |
| bMove & | m ) |
Only add move to movelist if valid.
| b | board on which move is calculated |
| m | move to be added |
Definition at line 324 of file movelist.cpp.
Referenced by bBlackPawn::addCapturePromotionMove(), and bBlackPawn::addNonCapturePromotionMove().
Here is the call graph for this function:
Here is the caller graph for this function:| void bMoveList::sortMoves | ( | bool const | bFastSort | ) |
sort moves and update bestmove id if less than 5 moves, sort all if more than 5 moves, and less than 3 qs moves, sort 3 best if more than 5 moves and at least 3 qs moves, sort qsmoves + 1
| bFastSort | only do partial sorting (default) |
Definition at line 369 of file movelist.cpp.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchBruteForce::CalcBestMove(), bel_debug::execute(), and SearchAlphaBeta::Quiescence().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 67 of file movelist.h.
Referenced by SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchRandom::CalcBestMove(), and SearchAlphaBeta::Quiescence().
Here is the caller graph for this function:
|
inline |
Definition at line 69 of file movelist.h.
Store score of move and update best move.
| moveid | of move to be stored [1 -> max number of moves] |
| score | to be stored |
Definition at line 157 of file movelist.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:Store score of move and update best move (minimum)
| moveid | of move to be stored [1 -> max number of moves] |
| score | to be stored |
Definition at line 184 of file movelist.cpp.
Here is the call graph for this function:Store score of move and update best move.
| moveid | of move to be stored [1 -> max number of moves] |
| score | to be stored |
Definition at line 210 of file movelist.cpp.
Referenced by SearchMiniMax::CalcBestMove(), and SearchRandom::CalcBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:Store score of move and update best move.
| moveid | of move to be stored [1 -> max number of moves] |
| score | to be stored |
Definition at line 230 of file movelist.cpp.
Referenced by SearchMiniMax::CalcBestMove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 78 of file movelist.h.
Referenced by SearchMiniMax::CalcBestMove().
Here is the caller graph for this function:
|
inline |
Definition at line 80 of file movelist.h.
Referenced by SearchMiniMax::CalcBestMove(), SearchAlphaBeta::Quiescence(), setMinScoreOfMove(), setMinScoreOfMoveUnsorted(), setScoreOfMove(), and setScoreOfMoveUnsorted().
Here is the caller graph for this function:Definition at line 84 of file movelist.h.
Referenced by setBestMoveScore(), setMinScoreOfMove(), setMinScoreOfMoveUnsorted(), setScoreOfMove(), and setScoreOfMoveUnsorted().
Here is the caller graph for this function:
|
inlineconstexpr |
Definition at line 87 of file movelist.h.
Referenced by bGame::getEpdMoveInPosition(), isPossibleMove(), setMinScoreOfMove(), setMinScoreOfMoveUnsorted(), setScoreOfMove(), setScoreOfMoveUnsorted(), and bGame::WaitForSearchEnd().
Here is the caller graph for this function:
|
inline |
Definition at line 89 of file movelist.h.
Referenced by sortMoves().
Here is the caller graph for this function:
|
inline |
Definition at line 91 of file movelist.h.
Referenced by emptyMoveList(), and sortMoves().
Here is the caller graph for this function:
|
inline |
Definition at line 94 of file movelist.h.
Referenced by SearchBruteForce::CalcBestMove().
Here is the caller graph for this function:
|
inline |
Definition at line 96 of file movelist.h.
Referenced by SearchMiniMax::CalcBestMove(), and SearchRandom::CalcBestMove().
Here is the caller graph for this function:
|
inline |
Definition at line 98 of file movelist.h.
Referenced by SearchMiniMax::CalcBestMove().
Here is the caller graph for this function:
|
inline |
Definition at line 100 of file movelist.h.
Referenced by SearchMiniMax::CalcBestMove(), and SearchRandom::CalcBestMove().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 107 of file movelist.h.
Referenced by generateMoves().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 109 of file movelist.h.
Referenced by generateMoves().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 111 of file movelist.h.
Referenced by emptyMoveList().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 113 of file movelist.h.
Referenced by adjustQSMoves().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 115 of file movelist.h.
Referenced by sortMoves().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 117 of file movelist.h.
Referenced by emptyMoveList(), setMinScoreOfMove(), setScoreOfMove(), and sortMoves().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 119 of file movelist.h.
Referenced by setMinScoreOfMove(), and setScoreOfMove().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 123 of file movelist.h.
|
inlineprotected |
Definition at line 125 of file movelist.h.
Referenced by sortMoves().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 127 of file movelist.h.
Referenced by sortMoves().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 131 of file movelist.h.
Referenced by atLeastOneMovePossible().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 133 of file movelist.h.
Referenced by atLeastOneMovePossible(), and generateMoves().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 135 of file movelist.h.
Referenced by emptyMoveList().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 138 of file movelist.h.
Referenced by setScoreOfMove(), and sortMoves().
Here is the caller graph for this function:
|
inlineconstexprprotected |
Definition at line 140 of file movelist.h.
|
inlineconstexprprotected |
Definition at line 142 of file movelist.h.
|
inlineconstexprprotected |
Definition at line 144 of file movelist.h.
|
friend |
Definition at line 512 of file movelist.cpp.
| movenum_t bMoveList::curmoveid = 0 |
Definition at line 104 of file movelist.h.
Referenced by bMoveList(), bPgnMove::bPgnMove(), bPgnMoveList::bPgnMoveList(), SearchAlphaBeta::CalcBestMove(), SearchEvalPosOnly::CalcBestMove(), SearchMiniMax::CalcBestMove(), SearchRandom::CalcBestMove(), operator=(), bGame::playPGNMoves(), and SearchAlphaBeta::Quiescence().