X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fuci.cpp;h=c4c1a03705924516558ac8c5651b7bd63bc13bf5;hp=a0ac045b7672520f06d2ca2da8c968160b06b135;hb=cf486cf229b9877afd8120830bece47d93c7e8d0;hpb=1ae8c59c0bf7cc87d69673de95363bd222ef6642 diff --git a/src/uci.cpp b/src/uci.cpp index a0ac045b..c4c1a037 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -124,7 +124,7 @@ namespace { } else if (token == "ucinewgame") { - push_button("Clear Hash"); + push_button("New Game"); Position::init_piece_square_tables(); RootPosition.from_fen(StartPosition); } @@ -148,8 +148,8 @@ namespace { else if (token == "eval") { EvalInfo ei; - cout << "Incremental mg: " << RootPosition.value().mg() - << "\nIncremental eg: " << RootPosition.value().eg() + cout << "Incremental mg: " << mg_value(RootPosition.value()) + << "\nIncremental eg: " << eg_value(RootPosition.value()) << "\nFull eval: " << evaluate(RootPosition, ei, 0) << endl; } else if (token == "key") @@ -324,18 +324,17 @@ namespace { void perft(UCIInputParser& uip) { string token; - int depth = 0; + int depth, tm, n; + Position pos = RootPosition; - while (!uip.eof()) - { - uip >> token; + if (uip.eof()) + return; + + uip >> depth; + tm = get_system_time(); + + n = perft(pos, depth * OnePly); - if (token == "depth") - uip >> depth; - } - Position pos = RootPosition; - int tm = get_system_time(); - int n = perft(pos, depth * OnePly); tm = get_system_time() - tm; std::cout << "\nNodes " << n << "\nTime (ms) " << tm