Belofte  version 2.1.5
A promising chess program using the UCI or Winboard interface
bLevel Class Referencefinal

Public Member Functions

 bLevel ()
 
 ~bLevel ()
 
bLeveloperator= (bLevel const &)=default
 
 bLevel (bLevel const &)=delete
 
 bLevel (bLevel &&)=delete
 
bLeveloperator= (bLevel &&)=delete
 
 operator std::string () const
 
void flagLevelChange ()
 
void setGameTime (int const msPerGame)
 new level or new game More...
 
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)
 set level to search mate in n different from bruteforce search which is non optimised More...
 
void setMoves (std::string movelist)
 
void setNodes (int64_t const n)
 
void initDepths (depth_t const d)
 
void setPondering ()
 
void clearPondering ()
 
bool isPondering () const
 
LevelType getType () const
 
depth_t getDepth () const
 
void setDepth (depth_t const d)
 
bool depthReached (depth_t const d) const
 
bool qsDepthReached (depth_t const d) const
 
bool stoppingSearch (int64_t const nodes, long const nTimeElapsed) const
 Stop search required ? More...
 
bool stillTimeLeft (depth_t const d, long const nTimeElapsed) const
 Do we still have time to do another iteration ? More...
 
void setRemainingTime (int const msPerGame)
 xboard issues time command to update available time More...
 
void setMovePlayed ()
 
void undoMovePlayed ()
 used for recalibrating time in case for undo move in xboard moves per period More...
 
void setEstimatedMovesLeft (int const n)
 

Detailed Description

Definition at line 51 of file level.h.

Constructor & Destructor Documentation

◆ bLevel() [1/3]

bLevel::bLevel ( )

Definition at line 12 of file level.cpp.

+ Here is the call graph for this function:

◆ ~bLevel()

bLevel::~bLevel ( )

Definition at line 19 of file level.cpp.

◆ bLevel() [2/3]

bLevel::bLevel ( bLevel const &  )
delete

◆ bLevel() [3/3]

bLevel::bLevel ( bLevel &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

bLevel& bLevel::operator= ( bLevel const &  )
default

◆ operator=() [2/2]

bLevel& bLevel::operator= ( bLevel &&  )
delete

◆ operator std::string()

bLevel::operator std::string ( ) const

Definition at line 358 of file level.cpp.

+ Here is the call graph for this function:

◆ flagLevelChange()

void bLevel::flagLevelChange ( )

Definition at line 25 of file level.cpp.

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

+ Here is the caller graph for this function:

◆ setGameTime() [1/2]

void bLevel::setGameTime ( int const  msPerGame)

new level or new game

Definition at line 40 of file level.cpp.

+ Here is the call graph for this function:

◆ setGameTime() [2/2]

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

Definition at line 56 of file level.cpp.

+ Here is the call graph for this function:

◆ setMoveTime() [1/3]

void bLevel::setMoveTime ( int const  msPerMove)

Definition at line 72 of file level.cpp.

Referenced by bGameWithTest::evalEpdPosition(), and main().

+ 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 91 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 108 of file level.cpp.

+ Here is the call graph for this function:

◆ setInfinite()

void bLevel::setInfinite ( )

Definition at line 30 of file level.cpp.

Referenced by bGameWithTest::DoPerft().

+ Here is the caller graph for this function:

◆ setMateSearch()

void bLevel::setMateSearch ( depth_t const  d)

set level to search mate in n different from bruteforce search which is non optimised

Definition at line 129 of file level.cpp.

Referenced by bGameWithTest::evalEpdPosition().

+ Here is the caller graph for this function:

◆ setMoves()

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

◆ setNodes()

void bLevel::setNodes ( int64_t const  n)

Definition at line 255 of file level.cpp.

◆ initDepths()

void bLevel::initDepths ( depth_t const  d)

Definition at line 243 of file level.cpp.

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

+ Here is the caller graph for this function:

◆ setPondering()

void bLevel::setPondering ( )

Definition at line 265 of file level.cpp.

◆ clearPondering()

void bLevel::clearPondering ( )

Definition at line 270 of file level.cpp.

◆ isPondering()

bool bLevel::isPondering ( ) const

Definition at line 275 of file level.cpp.

◆ getType()

LevelType bLevel::getType ( ) const

Definition at line 260 of file level.cpp.

◆ getDepth()

depth_t bLevel::getDepth ( ) const

Definition at line 233 of file level.cpp.

◆ setDepth()

void bLevel::setDepth ( depth_t const  d)

Definition at line 238 of file level.cpp.

Referenced by bGameWithTest::DoPerft().

+ Here is the caller graph for this function:

◆ depthReached()

bool bLevel::depthReached ( depth_t const  d) const

Definition at line 282 of file level.cpp.

◆ qsDepthReached()

bool bLevel::qsDepthReached ( depth_t const  d) const

Definition at line 287 of file level.cpp.

◆ stoppingSearch()

bool bLevel::stoppingSearch ( int64_t const  nodes,
long const  nTimeElapsed 
) const

Stop search required ?

Parameters
nodesnumber of nodes searched
nTimeElapsedtime elapsed until now
Returns
true if need to stop search

stopping

aborting

avoid getting flagged

Definition at line 298 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 320 of file level.cpp.

◆ setRemainingTime()

void bLevel::setRemainingTime ( int const  msPerGame)

xboard issues time command to update available time

Definition at line 141 of file level.cpp.

◆ setMovePlayed()

void bLevel::setMovePlayed ( )

Definition at line 151 of file level.cpp.

Referenced by bGame::playUIsuppliedMove().

+ 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 163 of file level.cpp.

Referenced by bGame::revertGameMove().

+ Here is the caller graph for this function:

◆ setEstimatedMovesLeft()

void bLevel::setEstimatedMovesLeft ( int const  n)
inline

Definition at line 99 of file level.h.