2008-08-31 23:59:13 -06:00
|
|
|
/*
|
2008-10-19 10:56:28 -06:00
|
|
|
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
|
|
|
|
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
|
2016-01-02 02:43:25 -07:00
|
|
|
Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
|
2017-01-11 00:46:29 -07:00
|
|
|
Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
|
2008-08-31 23:59:13 -06:00
|
|
|
|
2008-10-19 10:56:28 -06:00
|
|
|
Stockfish is free software: you can redistribute it and/or modify
|
2008-08-31 23:59:13 -06:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
2009-01-07 06:26:58 -07:00
|
|
|
|
2008-10-19 10:56:28 -06:00
|
|
|
Stockfish is distributed in the hope that it will be useful,
|
2008-08-31 23:59:13 -06:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2009-01-07 06:26:58 -07:00
|
|
|
|
2008-08-31 23:59:13 -06:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
2010-11-22 06:55:56 -07:00
|
|
|
#include "bitboard.h"
|
|
|
|
#include "position.h"
|
2011-04-24 02:20:03 -06:00
|
|
|
#include "search.h"
|
2011-12-30 03:30:26 -07:00
|
|
|
#include "thread.h"
|
2017-08-06 05:43:02 -06:00
|
|
|
#include "tt.h"
|
2014-10-26 00:09:19 -06:00
|
|
|
#include "uci.h"
|
2015-01-18 00:05:05 -07:00
|
|
|
#include "syzygy/tbprobe.h"
|
2014-11-25 16:45:28 -07:00
|
|
|
|
2016-09-17 00:19:06 -06:00
|
|
|
namespace PSQT {
|
|
|
|
void init();
|
|
|
|
}
|
|
|
|
|
2010-11-08 12:49:40 -07:00
|
|
|
int main(int argc, char* argv[]) {
|
2008-08-31 23:59:13 -06:00
|
|
|
|
2012-04-01 02:25:07 -06:00
|
|
|
std::cout << engine_info() << std::endl;
|
2012-03-18 16:08:37 -06:00
|
|
|
|
2012-08-18 04:50:43 -06:00
|
|
|
UCI::init(Options);
|
2015-05-01 18:36:39 -06:00
|
|
|
PSQT::init();
|
2012-04-01 03:46:38 -06:00
|
|
|
Bitboards::init();
|
2013-06-09 05:43:30 -06:00
|
|
|
Position::init();
|
2015-01-03 08:39:17 -07:00
|
|
|
Bitbases::init();
|
2011-11-26 04:07:35 -07:00
|
|
|
Search::init();
|
2014-10-12 13:03:49 -06:00
|
|
|
Pawns::init();
|
2017-08-06 05:43:02 -06:00
|
|
|
Tablebases::init(Options["SyzygyPath"]);
|
|
|
|
TT.resize(Options["Hash"]);
|
2017-08-13 00:58:31 -06:00
|
|
|
Threads.init(Options["Threads"]);
|
2017-08-06 05:43:02 -06:00
|
|
|
Search::clear(); // After threads are up
|
2008-08-31 23:59:13 -06:00
|
|
|
|
2014-04-12 04:52:10 -06:00
|
|
|
UCI::loop(argc, argv);
|
2012-08-29 08:43:01 -06:00
|
|
|
|
|
|
|
Threads.exit();
|
2015-09-27 02:53:39 -06:00
|
|
|
return 0;
|
2008-08-31 23:59:13 -06:00
|
|
|
}
|