Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
bLevel Class Reference

#include <level.h>

Public Member Functions

 bLevel ()
 
 ~bLevel ()
 
 bLevel (bLevel const &)=default
 
bLeveloperator= (bLevel const &)=default
 
 bLevel (bLevel &&)=delete
 
bLeveloperator= (bLevel &&)=delete
 
constexpr bool hasLevelChanged () const
 
void flagLevelChanged ()
 
void clearLevelChanged ()
 new level or new game
 
void setGameTime (int const msPerGame)
 
void setGameTime (int const msPerGame, int const msIncrementPerMove)
 
void setMoveTime (int const msPerMove)
 
void setMoveTime (int const msPerGame, int const nMoves)
 
void setMoveTime (int const msPerGame, int const nMoves, int const msIncrementPerMove)
 
void setInfinite ()
 
void setMateSearch (depth_t const d)
 
void setMoreTimeRequired ()
 increase gradually the allowed time for move, first move to max time for move, then move to abort time
 
void setMoves (std::string movelist)
 
void setNodes (int64_t const n)
 
void setPondering ()
 
void clearPondering ()
 
constexpr bool isPondering () const
 
constexpr LevelType getType () const
 
void setSearchDepth (depth_t const d)
 
constexpr depth_t getSearchDepth () const
 
void setQSDepth (depth_t const d)
 
constexpr depth_t getQSDepth () const
 
void setMaxDepth (depth_t const d)
 
constexpr depth_t getMaxDepth () const
 
void setDepthCommand (depth_t const d)
 
bool searchDepthReached (depth_t const d) const
 
bool qsDepthReached (depth_t const d) const
 
bool stoppingSearch (long const nTimeElapsed) const
 Stop search required ?
 
bool stillTimeLeft (depth_t const d, long const nTimeElapsed) const
 Do we still have time to do another iteration ?
 
void setRemainingTime (int const msPerGame)
 xboard issues time command to update available time
 
void setMovePlayed ()
 
void undoMovePlayed ()
 used for recalibrating time in case for undo move in xboard moves per period
 
 operator std::string () const
 

Detailed Description

Definition at line 48 of file level.h.

Constructor & Destructor Documentation

◆ bLevel() [1/3]

bLevel::bLevel ( )
inline

Definition at line 50 of file level.h.

Referenced by bLevel(), bLevel(), operator=(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~bLevel()

bLevel::~bLevel ( )
inline

Definition at line 56 of file level.h.

◆ bLevel() [2/3]

bLevel::bLevel ( bLevel const & )
default
+ Here is the call graph for this function:

◆ bLevel() [3/3]

bLevel::bLevel ( bLevel && )
delete
+ Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

bLevel & bLevel::operator= ( bLevel const & )
default
+ Here is the call graph for this function:

◆ operator=() [2/2]

bLevel & bLevel::operator= ( bLevel && )
delete
+ Here is the call graph for this function:

◆ hasLevelChanged()

bool bLevel::hasLevelChanged ( ) const
inlineconstexpr

Definition at line 66 of file level.h.

Referenced by setGameTime(), setGameTime(), setMoveTime(), setMoveTime(), and setMoveTime().

+ Here is the caller graph for this function:

◆ flagLevelChanged()

void bLevel::flagLevelChanged ( )
inline

Definition at line 68 of file level.h.

Referenced by bLevel(), cmd_level::execute(), and bGame::newGame().

+ Here is the caller graph for this function:

◆ clearLevelChanged()

void bLevel::clearLevelChanged ( )
inline

new level or new game

Definition at line 70 of file level.h.

Referenced by setGameTime(), setGameTime(), setMoveTime(), setMoveTime(), and setMoveTime().

+ Here is the caller graph for this function:

◆ setGameTime() [1/2]

void bLevel::setGameTime ( int const msPerGame)

Definition at line 23 of file level.cpp.

Referenced by cmd_go::execute(), and cmd_level::execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGameTime() [2/2]

void bLevel::setGameTime ( int const msPerGame,
int const msIncrementPerMove )

Definition at line 41 of file level.cpp.

+ Here is the call graph for this function:

◆ setMoveTime() [1/3]

void bLevel::setMoveTime ( int const msPerMove)

Definition at line 59 of file level.cpp.

Referenced by cmd_go::execute(), cmd_level::execute(), and cmd_st::execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMoveTime() [2/3]

void bLevel::setMoveTime ( int const msPerGame,
int const nMoves )

Definition at line 80 of file level.cpp.

+ Here is the call graph for this function:

◆ setMoveTime() [3/3]

void bLevel::setMoveTime ( int const msPerGame,
int const nMoves,
int const msIncrementPerMove )

Definition at line 99 of file level.cpp.

+ Here is the call graph for this function:

◆ setInfinite()

void bLevel::setInfinite ( )

Definition at line 12 of file level.cpp.

Referenced by cmd_go::execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMateSearch()

void bLevel::setMateSearch ( depth_t const d)

Definition at line 119 of file level.cpp.

Referenced by cmd_fd::execute(), and cmd_go::execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMoreTimeRequired()

void bLevel::setMoreTimeRequired ( )

increase gradually the allowed time for move, first move to max time for move, then move to abort time

Definition at line 297 of file level.cpp.

◆ setMoves()

void bLevel::setMoves ( std::string movelist)

◆ setNodes()

void bLevel::setNodes ( int64_t const n)
inline

Definition at line 85 of file level.h.

Referenced by cmd_go::execute().

+ Here is the caller graph for this function:

◆ setPondering()

void bLevel::setPondering ( )
inline

Definition at line 87 of file level.h.

Referenced by cmd_go::execute(), and cmd_hard::execute().

+ Here is the caller graph for this function:

◆ clearPondering()

void bLevel::clearPondering ( )
inline

Definition at line 89 of file level.h.

Referenced by cmd_easy::execute().

+ Here is the caller graph for this function:

◆ isPondering()

bool bLevel::isPondering ( ) const
inlineconstexpr

Definition at line 91 of file level.h.

◆ getType()

LevelType bLevel::getType ( ) const
inlineconstexpr

Definition at line 95 of file level.h.

◆ setSearchDepth()

void bLevel::setSearchDepth ( depth_t const d)

Definition at line 232 of file level.cpp.

Referenced by setDepthCommand(), setGameTime(), setGameTime(), setInfinite(), setMateSearch(), setMoveTime(), setMoveTime(), and setMoveTime().

+ Here is the caller graph for this function:

◆ getSearchDepth()

depth_t bLevel::getSearchDepth ( ) const
inlineconstexpr

Definition at line 98 of file level.h.

Referenced by SearchPerft::CalcBestMove(), operator std::string(), and searchDepthReached().

+ Here is the caller graph for this function:

◆ setQSDepth()

void bLevel::setQSDepth ( depth_t const d)
inline

Definition at line 100 of file level.h.

Referenced by setInfinite(), and setMateSearch().

+ Here is the caller graph for this function:

◆ getQSDepth()

depth_t bLevel::getQSDepth ( ) const
inlineconstexpr

Definition at line 102 of file level.h.

Referenced by qsDepthReached().

+ Here is the caller graph for this function:

◆ setMaxDepth()

void bLevel::setMaxDepth ( depth_t const d)
inline

Definition at line 104 of file level.h.

Referenced by setDepthCommand(), setGameTime(), setGameTime(), setInfinite(), setMateSearch(), setMoveTime(), setMoveTime(), and setMoveTime().

+ Here is the caller graph for this function:

◆ getMaxDepth()

depth_t bLevel::getMaxDepth ( ) const
inlineconstexpr

Definition at line 106 of file level.h.

Referenced by operator std::string().

+ Here is the caller graph for this function:

◆ setDepthCommand()

void bLevel::setDepthCommand ( depth_t const d)

Definition at line 226 of file level.cpp.

Referenced by cmd_go::execute(), cmd_sd::execute(), main(), and bConfigurableGame::setAlgorithm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchDepthReached()

bool bLevel::searchDepthReached ( depth_t const d) const

Definition at line 245 of file level.cpp.

+ Here is the call graph for this function:

◆ qsDepthReached()

bool bLevel::qsDepthReached ( depth_t const d) const

Definition at line 250 of file level.cpp.

+ Here is the call graph for this function:

◆ stoppingSearch()

bool bLevel::stoppingSearch ( long const nTimeElapsed) const

Stop search required ?

Parameters
nTimeElapsedtime elapsed until now
Returns
true if need to stop search

stopping

avoid getting flagged

Definition at line 260 of file level.cpp.

◆ stillTimeLeft()

bool bLevel::stillTimeLeft ( depth_t const d,
long const nTimeElapsed ) const

Do we still have time to do another iteration ?

Parameters
dcurrent depth searched
nTimeElapsedtime elapsed until now
Returns
true if another iteration could be started

Definition at line 280 of file level.cpp.

◆ setRemainingTime()

void bLevel::setRemainingTime ( int const msPerGame)

xboard issues time command to update available time

Definition at line 133 of file level.cpp.

Referenced by cmd_time::execute().

+ Here is the caller graph for this function:

◆ setMovePlayed()

void bLevel::setMovePlayed ( )

Definition at line 143 of file level.cpp.

Referenced by cmd_usermove::execute().

+ Here is the caller graph for this function:

◆ undoMovePlayed()

void bLevel::undoMovePlayed ( )

used for recalibrating time in case for undo move in xboard moves per period

Definition at line 156 of file level.cpp.

◆ operator std::string()

bLevel::operator std::string ( ) const

Definition at line 325 of file level.cpp.

+ Here is the call graph for this function: