mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Teach 'bench' to run current position
Now that we can call bench from command prompt has a sense to teach bench to run the current set position. To do this is enough to call bench with 'current' as fen source parameter. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -83,7 +83,12 @@ void benchmark(istringstream& is) {
|
|||||||
else
|
else
|
||||||
limits.depth = atoi(limit.c_str());
|
limits.depth = atoi(limit.c_str());
|
||||||
|
|
||||||
if (fenFile != "default")
|
if (fenFile == "current")
|
||||||
|
{
|
||||||
|
fens.clear();
|
||||||
|
fens.push_back(Search::RootPosition.to_fen());
|
||||||
|
}
|
||||||
|
else if (fenFile != "default")
|
||||||
{
|
{
|
||||||
fens.clear();
|
fens.clear();
|
||||||
string fen;
|
string fen;
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ void uci_loop(const string& args) {
|
|||||||
Position pos(StartFEN, false, Threads.main_thread()); // The root position
|
Position pos(StartFEN, false, Threads.main_thread()); // The root position
|
||||||
string cmd, token;
|
string cmd, token;
|
||||||
|
|
||||||
|
Search::RootPosition = pos;
|
||||||
|
|
||||||
while (token != "quit")
|
while (token != "quit")
|
||||||
{
|
{
|
||||||
if (!args.empty())
|
if (!args.empty())
|
||||||
|
|||||||
Reference in New Issue
Block a user