2019-11-03 13:00:45 +08:00
|
|
|
/*
|
|
|
|
Sanmill, a mill game playing engine derived from NineChess 1.5
|
|
|
|
Copyright (C) 2015-2018 liuweilhy (NineChess author)
|
2020-01-29 22:22:51 +08:00
|
|
|
Copyright (C) 2019-2020 Calcitem <calcitem@outlook.com>
|
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
|
|
|
|
|
2020-07-11 23:41:59 +08:00
|
|
|
#define QT_UI
|
|
|
|
|
2019-08-26 22:33:27 +08:00
|
|
|
//#define MOBILE_APP_UI
|
|
|
|
|
2019-10-26 21:40:26 +08:00
|
|
|
//#define TRAINING_MODE
|
|
|
|
|
2019-12-13 22:42:07 +08:00
|
|
|
//#define TEST_MODE
|
|
|
|
|
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
|
|
|
|
2019-12-13 22:42:07 +08:00
|
|
|
#ifdef TEST_MODE
|
|
|
|
#define DONOT_PLAY_SOUND
|
|
|
|
#endif // TEST_MODE
|
|
|
|
|
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-03-20 22:20:57 +08:00
|
|
|
//#define FIRST_MOVE_STAR_PREFERRED
|
|
|
|
|
2019-10-07 16:40:52 +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-04-19 10:43:25 +08:00
|
|
|
//#define TRANSPOSITION_TABLE_CUTDOWN
|
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-05-09 00:17:27 +08:00
|
|
|
//WIP
|
2020-05-03 19:59:39 +08:00
|
|
|
//#define HOSTORY_HEURISTIC
|
|
|
|
|
|
|
|
#ifdef HOSTORY_HEURISTIC
|
|
|
|
#define HOSTORY_HEURISTIC_ACTION_MOVE_ONLY
|
|
|
|
//#define HOSTORY_HEURISTIC_SCORE_HIGH_WHEN_DEEPER
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HOSTORY_HEURISTIC
|
|
|
|
//#define COMPARE_SCORE_ONLY
|
|
|
|
//#define COMPARE_RATING_PREFERRED
|
|
|
|
#define COMPARE_SCORE_PREFERRED
|
|
|
|
#else
|
2020-05-04 02:31:28 +08:00
|
|
|
//#define COMPARE_RATING_1ST_VALUE_2ND
|
|
|
|
//#define COMPARE_VALUE_1ST_RATING_2ND
|
2020-05-03 19:59:39 +08:00
|
|
|
#endif // HOSTORY_HEURISTIC
|
|
|
|
|
2020-09-29 18:39:37 +08:00
|
|
|
//#define DISABLE_PREFETCH
|
2020-04-19 02:53:04 +08:00
|
|
|
|
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
|
|
|
|
//#define ENDGAME_LEARNING_DEBUG
|
2019-07-04 00:12:05 +08:00
|
|
|
|
2019-07-27 02:44:24 +08:00
|
|
|
#define THREEFOLD_REPETITION
|
|
|
|
|
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
|
|
|
|
2019-08-18 12:33:30 +08:00
|
|
|
#ifdef WIN32
|
|
|
|
#define sscanf sscanf_s
|
2019-08-25 19:22:53 +08:00
|
|
|
#define sprintf sprintf_s
|
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-05-16 01:35:36 +08:00
|
|
|
#endif // CONFIG_H
|