|
@@ -151,22 +151,27 @@ void UciParser::position(const vector<string>& args)
|
|
|
|
|
|
void UciParser::go(const vector<string>& args)
|
|
|
{
|
|
|
- chessy::Move m = minimax.calculateBest(5);
|
|
|
+ fst = make_unique<FixedSearchTimer>(cg, *this);
|
|
|
+
|
|
|
+ fst->setThinkTime(std::chrono::milliseconds{ 1000 });
|
|
|
+ fst->startSearch();
|
|
|
+
|
|
|
+ //chessy::Move m = minimax.calculateBest(5);
|
|
|
|
|
|
// TODO: hack!
|
|
|
- string suffix;
|
|
|
+ /*string suffix;
|
|
|
if (cg.getBoard().getAtPosition(m.origin) == chessy::PieceType::PAWN &&
|
|
|
(m.destination.index < 8 || m.destination.index >= 56)) {
|
|
|
suffix = "Q";
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
- sendCommand("bestmove", { m.asString() + suffix });
|
|
|
+ //sendCommand("bestmove", { m.asString() + suffix });
|
|
|
}
|
|
|
|
|
|
|
|
|
void UciParser::stop(const vector<string>& args)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|