mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Retire a couple of unused debug functions
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
3835f49aa1
commit
3e8bb6f63d
3 changed files with 10 additions and 28 deletions
11
src/misc.cpp
11
src/misc.cpp
|
@ -127,17 +127,6 @@ void dbg_print_mean() {
|
||||||
<< (float)dbg_cnt1 / (dbg_cnt0 ? dbg_cnt0 : 1) << endl;
|
<< (float)dbg_cnt1 / (dbg_cnt0 ? dbg_cnt0 : 1) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dbg_print_hit_rate(ofstream& logFile) {
|
|
||||||
|
|
||||||
logFile << "Total " << dbg_cnt0 << " Hit " << dbg_cnt1
|
|
||||||
<< " hit rate (%) " << (dbg_cnt1*100)/(dbg_cnt0 ? dbg_cnt0 : 1) << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
void dbg_print_mean(ofstream& logFile) {
|
|
||||||
|
|
||||||
logFile << "Total " << dbg_cnt0 << " Mean "
|
|
||||||
<< (float)dbg_cnt1 / (dbg_cnt0 ? dbg_cnt0 : 1) << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// engine_name() returns the full name of the current Stockfish version.
|
/// engine_name() returns the full name of the current Stockfish version.
|
||||||
/// This will be either "Stockfish YYMMDD" (where YYMMDD is the date when
|
/// This will be either "Stockfish YYMMDD" (where YYMMDD is the date when
|
||||||
|
|
|
@ -65,7 +65,5 @@ extern void dbg_after();
|
||||||
extern void dbg_mean_of(int v);
|
extern void dbg_mean_of(int v);
|
||||||
extern void dbg_print_hit_rate();
|
extern void dbg_print_hit_rate();
|
||||||
extern void dbg_print_mean();
|
extern void dbg_print_mean();
|
||||||
extern void dbg_print_hit_rate(std::ofstream& logFile);
|
|
||||||
extern void dbg_print_mean(std::ofstream& logFile);
|
|
||||||
|
|
||||||
#endif // !defined(MISC_H_INCLUDED)
|
#endif // !defined(MISC_H_INCLUDED)
|
||||||
|
|
|
@ -451,9 +451,6 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
||||||
MultiPV = Options["MultiPV"].value<int>();
|
MultiPV = Options["MultiPV"].value<int>();
|
||||||
UseLogFile = Options["Use Search Log"].value<bool>();
|
UseLogFile = Options["Use Search Log"].value<bool>();
|
||||||
|
|
||||||
if (UseLogFile)
|
|
||||||
LogFile.open(Options["Search Log Filename"].value<std::string>().c_str(), std::ios::out | std::ios::app);
|
|
||||||
|
|
||||||
read_weights(pos.side_to_move());
|
read_weights(pos.side_to_move());
|
||||||
|
|
||||||
// Set the number of active threads
|
// Set the number of active threads
|
||||||
|
@ -483,12 +480,17 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
||||||
|
|
||||||
// Write search information to log file
|
// Write search information to log file
|
||||||
if (UseLogFile)
|
if (UseLogFile)
|
||||||
LogFile << "Searching: " << pos.to_fen() << endl
|
{
|
||||||
<< "infinite: " << infinite
|
std::string name = Options["Search Log Filename"].value<std::string>();
|
||||||
<< " ponder: " << ponder
|
LogFile.open(name.c_str(), std::ios::out | std::ios::app);
|
||||||
<< " time: " << myTime
|
|
||||||
|
LogFile << "Searching: " << pos.to_fen()
|
||||||
|
<< "\ninfinite: " << infinite
|
||||||
|
<< " ponder: " << ponder
|
||||||
|
<< " time: " << myTime
|
||||||
<< " increment: " << myIncrement
|
<< " increment: " << myIncrement
|
||||||
<< " moves to go: " << movesToGo << endl;
|
<< " moves to go: " << movesToGo << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// We're ready to start thinking. Call the iterative deepening loop function
|
// We're ready to start thinking. Call the iterative deepening loop function
|
||||||
Move ponderMove = MOVE_NONE;
|
Move ponderMove = MOVE_NONE;
|
||||||
|
@ -501,12 +503,6 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
||||||
|
|
||||||
if (UseLogFile)
|
if (UseLogFile)
|
||||||
{
|
{
|
||||||
if (dbg_show_mean)
|
|
||||||
dbg_print_mean(LogFile);
|
|
||||||
|
|
||||||
if (dbg_show_hit_rate)
|
|
||||||
dbg_print_hit_rate(LogFile);
|
|
||||||
|
|
||||||
LogFile << "\nNodes: " << pos.nodes_searched()
|
LogFile << "\nNodes: " << pos.nodes_searched()
|
||||||
<< "\nNodes/second: " << nps(pos)
|
<< "\nNodes/second: " << nps(pos)
|
||||||
<< "\nBest move: " << move_to_san(pos, bestMove);
|
<< "\nBest move: " << move_to_san(pos, bestMove);
|
||||||
|
@ -516,10 +512,9 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[
|
||||||
LogFile << "\nPonder move: "
|
LogFile << "\nPonder move: "
|
||||||
<< move_to_san(pos, ponderMove) // Works also with MOVE_NONE
|
<< move_to_san(pos, ponderMove) // Works also with MOVE_NONE
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
|
||||||
|
|
||||||
if (UseLogFile)
|
|
||||||
LogFile.close();
|
LogFile.close();
|
||||||
|
}
|
||||||
|
|
||||||
// This makes all the threads to go to sleep
|
// This makes all the threads to go to sleep
|
||||||
ThreadsMgr.set_active_threads(1);
|
ThreadsMgr.set_active_threads(1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue