Let benchmark to default to depth 12

And also simplify a lot the code.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-11-08 11:08:01 +01:00
parent d2d953713f
commit fad595f5b6
2 changed files with 22 additions and 59 deletions

View File

@@ -71,18 +71,16 @@ int main(int argc, char *argv[]) {
}
else // Process command line arguments
{
if (string(argv[1]) != "bench" || argc < 4 || argc > 8)
if (string(argv[1]) != "bench" || argc < 4 || argc > 7)
cout << "Usage: stockfish bench <hash size> <threads> "
<< "[time = 60s] [fen positions file = default] "
<< "[time, depth, perft or node limited = time] "
<< "[timing file name = none]" << endl;
<< "[limit = 12] [fen positions file = default] "
<< "[depth, time, perft or node limited = depth]" << endl;
else
{
string time = argc > 4 ? argv[4] : "60";
string fen = argc > 5 ? argv[5] : "default";
string lim = argc > 6 ? argv[6] : "time";
string tim = argc > 7 ? argv[7] : "";
benchmark(string(argv[2]) + " " + string(argv[3]) + " " + time + " " + fen + " " + lim + " " + tim);
string val = argc > 4 ? argv[4] : "12";
string fen = argc > 5 ? argv[5] : "default";
string lim = argc > 6 ? argv[6] : "depth";
benchmark(string(argv[2]) + " " + string(argv[3]) + " " + val + " " + fen + " " + lim);
}
}