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

#include <epd_testsuite.h>

+ Inheritance diagram for bEpd:

Public Types

enum  tReturn {
  EPD_ERROR = -4 , NO_MOVE_FOUND = -3 , PERFT_MISS = -2 , NOT_RESOLVED = -1 ,
  EPD_OK = 0 , STS_OK = 1 , BM_OK = 10 , AM_OK = 11 ,
  MATE_OK = 12 , PERFT_OK = 13
}
 

Public Member Functions

 bEpd (epdTest_t const typeOfTest)
 
virtual ~bEpd ()
 
 bEpd (bEpd const &)=delete
 
 bEpd (bEpd &&)=delete
 
bEpdoperator= (bEpd const &)=delete
 
bEpdoperator= (bEpd &&)=delete
 
virtual bEpdResult parse ()
 parse any epd position
 
 operator std::string () const
 

Protected Member Functions

void setPos (std::string const &s)
 EPD pos is fen-board fen-tomove fen-castling fen-ep [50moves] [move#] cmdsection* cmdsection is bm SanMove!
 
int getScore () const
 
void setScore (int const s)
 
epdTest_t getTestType () const
 
bEpdResult parseEpdPosition (bFen const &fen)
 do actual epd position test
 
bEpdResult parsePerftPosition (bFen const &fen)
 check perft result for different depths D[1-99] # perft test - nodes
 
bEpdResult parseSTSPosition (bFen const &fen)
 
bEpdResult translateEpdResult (bPgnMove const &m)
 check move found against epd line m_Keys, change level before starting search am avoid-moves bm best-moves acs # set search seconds acn # set search nodes dm # set direct mate depth
 
int translateSTSResult (bPgnMove const &m, bEpdMoveValues &moveValues)
 
std::string const getTag (std::string const &tag)
 

Detailed Description

Definition at line 33 of file epd_testsuite.h.

Member Enumeration Documentation

◆ tReturn

Enumerator
EPD_ERROR 
NO_MOVE_FOUND 
PERFT_MISS 
NOT_RESOLVED 
EPD_OK 
STS_OK 
BM_OK 
AM_OK 
MATE_OK 
PERFT_OK 

Definition at line 75 of file epd_testsuite.h.

Constructor & Destructor Documentation

◆ bEpd() [1/3]

bEpd::bEpd ( epdTest_t const typeOfTest)
inlineexplicit

Definition at line 35 of file epd_testsuite.h.

Referenced by bEpd(), bEpd(), bEpdFile::bEpdFile(), bEpdFile::bEpdFile(), bEpdPos::bEpdPos(), bEpdPos::bEpdPos(), operator=(), and operator=().

+ Here is the caller graph for this function:

◆ ~bEpd()

virtual bEpd::~bEpd ( )
inlinevirtual

Definition at line 38 of file epd_testsuite.h.

◆ bEpd() [2/3]

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

◆ bEpd() [3/3]

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

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ parse()

bEpdResult bEpd::parse ( )
virtual

parse any epd position

Reimplemented in bEpdFile.

Definition at line 117 of file epd_testsuite.cpp.

Referenced by cmd_epd::execute(), cmd_epdpos::execute(), and bEpdFile::parse().

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

◆ operator std::string()

bEpd::operator std::string ( ) const

Definition at line 10 of file epd_testsuite.cpp.

◆ setPos()

void bEpd::setPos ( std::string const & s)
protected

EPD pos is fen-board fen-tomove fen-castling fen-ep [50moves] [move#] cmdsection* cmdsection is bm SanMove!

| am SanMove! | id=["]identification["] id ["]identification["] | D[1-99] n | n[,n[,n]...]

Todo
do only consider opcode starting with letter
Note
backwards compatibility with belofte 0.9.x, which has testfiles where id is followed by = sign instead of space

Definition at line 27 of file epd_testsuite.cpp.

Referenced by bEpdPos::bEpdPos(), bEpdPos::bEpdPos(), and bEpdFile::parse().

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

◆ getScore()

int bEpd::getScore ( ) const
inlineprotected

Definition at line 53 of file epd_testsuite.h.

Referenced by bEpdFile::parse().

+ Here is the caller graph for this function:

◆ setScore()

void bEpd::setScore ( int const s)
inlineprotected

Definition at line 54 of file epd_testsuite.h.

Referenced by parseSTSPosition().

+ Here is the caller graph for this function:

◆ getTestType()

epdTest_t bEpd::getTestType ( ) const
inlineprotected

Definition at line 55 of file epd_testsuite.h.

Referenced by parse(), and bEpdFile::parse().

+ Here is the caller graph for this function:

◆ parseEpdPosition()

bEpdResult bEpd::parseEpdPosition ( bFen const & fen)
protected

do actual epd position test

Definition at line 189 of file epd_testsuite.cpp.

Referenced by parse().

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

◆ parsePerftPosition()

bEpdResult bEpd::parsePerftPosition ( bFen const & fen)
protected

check perft result for different depths D[1-99] # perft test - nodes

Definition at line 242 of file epd_testsuite.cpp.

Referenced by parse().

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

◆ parseSTSPosition()

bEpdResult bEpd::parseSTSPosition ( bFen const & fen)
protected
Todo
protect against malformed STS containing no = sign

Definition at line 141 of file epd_testsuite.cpp.

Referenced by parse().

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

◆ translateEpdResult()

bEpdResult bEpd::translateEpdResult ( bPgnMove const & m)
protected

check move found against epd line m_Keys, change level before starting search am avoid-moves bm best-moves acs # set search seconds acn # set search nodes dm # set direct mate depth

Todo
implement other opcodes such as mate search

Definition at line 206 of file epd_testsuite.cpp.

Referenced by parseEpdPosition().

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

◆ translateSTSResult()

int bEpd::translateSTSResult ( bPgnMove const & m,
bEpdMoveValues & moveValues )
protected

Definition at line 229 of file epd_testsuite.cpp.

Referenced by parseSTSPosition().

+ Here is the caller graph for this function:

◆ getTag()

std::string const bEpd::getTag ( std::string const & tag)
protected

Definition at line 104 of file epd_testsuite.cpp.

Referenced by bEpdFile::parse().

+ Here is the caller graph for this function: