2019-11-03 13:00:45 +08:00
|
|
|
/*
|
2020-12-14 00:59:45 +08:00
|
|
|
This file is part of Sanmill.
|
|
|
|
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
|
2019-11-03 13:00:45 +08:00
|
|
|
|
|
|
|
Sanmill is free software: you can redistribute it and/or modify
|
|
|
|
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.
|
|
|
|
|
|
|
|
Sanmill is distributed in the hope that it will be useful,
|
|
|
|
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.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2019-07-28 02:40:49 +08:00
|
|
|
|
2019-06-30 07:40:27 +08:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
2019-09-07 19:19:45 +08:00
|
|
|
#include "debug.h"
|
|
|
|
|
2019-08-11 14:26:36 +08:00
|
|
|
#if _MSC_VER >= 1600
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
#endif
|
|
|
|
|
2021-01-31 13:22:31 +08:00
|
|
|
//#define EVALUATE_MOBILITY
|
|
|
|
|
2020-11-13 23:35:51 +08:00
|
|
|
//#undef QT_GUI_LIB
|
2020-07-11 23:41:59 +08:00
|
|
|
|
2020-10-25 00:15:18 +08:00
|
|
|
//#define UCI_AUTO_RE_GO
|
|
|
|
//#define UCI_AUTO_RESTART
|
2020-10-25 00:54:01 +08:00
|
|
|
//#define UCI_DO_BEST_MOVE
|
2021-01-23 20:33:13 +08:00
|
|
|
#define ANALYZE_POSITION
|
2020-10-25 00:15:18 +08:00
|
|
|
|
2020-11-14 02:01:12 +08:00
|
|
|
#ifdef FLUTTER_UI
|
|
|
|
#undef QT_GUI_LIB
|
|
|
|
#undef ANALYZE_POSITION
|
|
|
|
#endif
|
|
|
|
|
2020-10-25 00:15:18 +08:00
|
|
|
#ifdef UCI_AUTO_RESTART
|
|
|
|
#define UCI_AUTO_RE_GO
|
|
|
|
#endif
|
2020-10-03 12:11:58 +08:00
|
|
|
|
2020-10-06 22:31:52 +08:00
|
|
|
#define NET_FIGHT_SUPPORT
|
2020-10-06 21:59:10 +08:00
|
|
|
|
2019-08-26 22:33:27 +08:00
|
|
|
//#define MOBILE_APP_UI
|
|
|
|
|
2021-01-30 02:14:28 +08:00
|
|
|
//#define QT_UI_TEST_MODE
|
2019-12-13 22:42:07 +08:00
|
|
|
|
2019-12-15 23:56:56 +08:00
|
|
|
//#define UCT_DEMO
|
|
|
|
|
2020-05-04 19:24:54 +08:00
|
|
|
//#define PVS_AI
|
2020-05-04 18:57:07 +08:00
|
|
|
#define MTDF_AI
|
2020-03-06 00:17:10 +08:00
|
|
|
|
2021-01-24 14:44:46 +08:00
|
|
|
#ifndef DISABLE_PERFECT_AI
|
2021-01-24 14:16:41 +08:00
|
|
|
#ifdef _MSC_VER
|
2021-03-27 09:18:11 +08:00
|
|
|
#ifndef __clang__
|
2021-02-10 20:48:34 +08:00
|
|
|
//#define PERFECT_AI_SUPPORT
|
2021-03-27 09:18:11 +08:00
|
|
|
#endif
|
2021-01-24 23:03:15 +08:00
|
|
|
#ifdef PERFECT_AI_SUPPORT
|
|
|
|
#define MUEHLE_NMM
|
|
|
|
#endif
|
2021-01-24 12:26:23 +08:00
|
|
|
#endif
|
2021-01-24 14:44:46 +08:00
|
|
|
#endif
|
2021-01-24 12:26:23 +08:00
|
|
|
|
2021-01-23 23:38:02 +08:00
|
|
|
//#define PERFECT_AI_TEST
|
|
|
|
|
2019-07-20 18:30:05 +08:00
|
|
|
//#define DEBUG_MODE
|
2019-07-10 01:00:06 +08:00
|
|
|
|
2019-10-26 19:03:18 +08:00
|
|
|
#define DEFAULT_RULE_NUMBER 1
|
|
|
|
|
2019-11-03 17:43:27 +08:00
|
|
|
#define DEPTH_ADJUST (0)
|
2020-03-20 01:10:49 +08:00
|
|
|
//#define FIX_DEPTH (24)
|
2019-11-03 17:43:27 +08:00
|
|
|
|
2020-05-01 01:19:04 +08:00
|
|
|
//#define NULL_MOVE
|
|
|
|
|
2020-10-24 00:21:12 +08:00
|
|
|
//#define TIME_STAT
|
2019-11-10 12:36:31 +08:00
|
|
|
//#define CYCLE_STAT
|
2019-10-07 16:40:52 +08:00
|
|
|
|
2020-09-29 18:21:10 +08:00
|
|
|
//#define SORT_MOVE_WITHOUT_HUMAN_KNOWLEDGES
|
2019-08-04 03:17:53 +08:00
|
|
|
|
2019-09-09 00:19:02 +08:00
|
|
|
#define TRANSPOSITION_TABLE_ENABLE
|
2019-07-04 00:12:05 +08:00
|
|
|
|
2019-09-09 00:19:02 +08:00
|
|
|
#ifdef TRANSPOSITION_TABLE_ENABLE
|
|
|
|
#define CLEAR_TRANSPOSITION_TABLE
|
2019-10-02 12:18:31 +08:00
|
|
|
#define TRANSPOSITION_TABLE_FAKE_CLEAN
|
2020-05-13 00:46:36 +08:00
|
|
|
//#define TRANSPOSITION_TABLE_FAKE_CLEAN_NOT_EXACT_ONLY
|
2020-12-12 01:25:25 +08:00
|
|
|
//#define TRANSPOSITION_TABLE_64BIT_KEY
|
2020-05-03 13:16:30 +08:00
|
|
|
//#define TT_MOVE_ENABLE
|
2019-09-09 00:19:02 +08:00
|
|
|
//#define TRANSPOSITION_TABLE_DEBUG
|
2019-08-18 12:40:06 +08:00
|
|
|
#endif
|
2019-08-13 23:28:18 +08:00
|
|
|
|
2020-09-29 18:39:37 +08:00
|
|
|
//#define DISABLE_PREFETCH
|
2020-04-19 02:53:04 +08:00
|
|
|
|
2020-12-19 13:33:33 +08:00
|
|
|
//#define BITBOARD_DEBUG
|
2021-02-21 11:41:52 +08:00
|
|
|
#ifndef USE_POPCNT
|
2020-12-19 13:33:33 +08:00
|
|
|
#define USE_POPCNT
|
2021-02-21 11:41:52 +08:00
|
|
|
#endif
|
2020-12-19 13:33:33 +08:00
|
|
|
|
2020-12-20 09:18:26 +08:00
|
|
|
#ifndef USE_POPCNT
|
|
|
|
#define DONOT_USE_POPCNT
|
|
|
|
#endif
|
|
|
|
|
2020-05-03 23:49:18 +08:00
|
|
|
// WIP, Debugging only
|
|
|
|
//#define OPENING_BOOK
|
|
|
|
|
2019-10-29 00:30:29 +08:00
|
|
|
//#define ENDGAME_LEARNING
|
2019-12-23 00:26:02 +08:00
|
|
|
//#define ENDGAME_LEARNING_FORCE
|
2019-07-04 00:12:05 +08:00
|
|
|
|
2019-07-27 02:44:24 +08:00
|
|
|
#define THREEFOLD_REPETITION
|
2021-01-14 01:29:25 +08:00
|
|
|
#define RULE_50
|
2019-07-27 02:44:24 +08:00
|
|
|
|
2019-07-29 22:58:40 +08:00
|
|
|
//#define MESSAGEBOX_ENABLE
|
|
|
|
|
2019-07-20 18:30:05 +08:00
|
|
|
#ifdef DEBUG_MODE
|
2019-06-30 11:59:06 +08:00
|
|
|
#define DONOT_PLAY_SOUND
|
2019-06-30 07:40:27 +08:00
|
|
|
#endif
|
|
|
|
|
2019-07-04 00:12:05 +08:00
|
|
|
//#define DONOT_PLAY_SOUND
|
2019-07-03 02:01:22 +08:00
|
|
|
|
2019-07-20 18:30:05 +08:00
|
|
|
#ifdef DEBUG_MODE
|
2019-09-08 15:15:21 +08:00
|
|
|
#define PLAYER_DRAW_SEAT_NUMBER
|
2019-06-30 07:40:27 +08:00
|
|
|
#endif
|
|
|
|
|
2019-08-27 13:52:08 +08:00
|
|
|
#ifndef MOBILE_APP_UI
|
2019-09-08 23:31:38 +08:00
|
|
|
#define SAVE_GAMEBOOK_WHEN_ACTION_NEW_TRIGGERED
|
2019-08-27 13:52:08 +08:00
|
|
|
#endif
|
2019-06-30 09:57:44 +08:00
|
|
|
|
2020-05-09 00:17:27 +08:00
|
|
|
//#define DONOT_PLAY_WIN_SOUND
|
2019-06-30 09:57:44 +08:00
|
|
|
|
2020-05-10 22:58:22 +08:00
|
|
|
//#define GAME_PLACING_SHOW_REMOVED_PIECES
|
2019-06-30 07:40:27 +08:00
|
|
|
|
|
|
|
//#define SHOW_MAXIMIZED_ON_LOAD
|
|
|
|
|
2019-07-14 22:35:45 +08:00
|
|
|
#define DISABLE_HASHBUCKET
|
2020-06-26 22:16:01 +08:00
|
|
|
|
2019-09-14 23:51:41 +08:00
|
|
|
#define HASHMAP_NOLOCK
|
2019-07-14 22:35:45 +08:00
|
|
|
|
2020-12-20 12:50:56 +08:00
|
|
|
//#define ALIGNED_LARGE_PAGES
|
|
|
|
|
2019-08-18 12:33:30 +08:00
|
|
|
#ifdef WIN32
|
2021-02-18 22:05:18 +08:00
|
|
|
#pragma warning(disable: 4996)
|
2019-08-18 12:33:30 +08:00
|
|
|
#endif
|
|
|
|
|
2019-10-11 02:02:45 +08:00
|
|
|
#ifndef __GNUC__
|
|
|
|
#define __builtin_expect(expr, n) (expr)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define likely(expr) (__builtin_expect(!!(expr), 1))
|
|
|
|
#define unlikely(expr) (__builtin_expect(!!(expr), 0))
|
|
|
|
|
2020-11-28 15:22:05 +08:00
|
|
|
#ifdef FLUTTER_UI
|
|
|
|
#include "base.h"
|
|
|
|
#endif // FLUTTER_UI
|
|
|
|
|
2020-05-16 01:35:36 +08:00
|
|
|
#endif // CONFIG_H
|