Sanmill/include/config.h

153 lines
3.1 KiB
C
Raw Normal View History

/*
Sanmill, a mill game playing engine derived from NineChess 1.5
Copyright (C) 2015-2018 liuweilhy (NineChess author)
Copyright (C) 2019-2020 Calcitem <calcitem@outlook.com>
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/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "debug.h"
#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif
//#define MOBILE_APP_UI
//#define TRAINING_MODE
//#define TEST_MODE
//#define UCT_DEMO
#define ALPHABETA_AI
//#define MCTS_AI
//#define MCTS_PLD
#ifdef TEST_MODE
#define DONOT_PLAY_SOUND
#endif // TEST_MODE
2019-07-20 18:30:05 +08:00
//#define DEBUG_MODE
2019-08-04 13:12:29 +08:00
//#define DEBUG_MODE_A
2019-08-04 13:12:29 +08:00
#ifdef DEBUG_MODE_A
#define DONOT_PLAY_SOUND
#else
#define RANDOM_MOVE
2019-08-04 13:12:29 +08:00
#endif
2019-10-26 19:03:18 +08:00
#define DEFAULT_RULE_NUMBER 1
#define DEPTH_ADJUST (0)
//#define FIX_DEPTH (24)
//#define NULL_MOVE
//#define FIRST_MOVE_STAR_PREFERRED
//#define TIME_STAT
//#define CYCLE_STAT
//#define EVALUATE_ENABLE
2019-08-04 11:22:49 +08:00
#ifdef EVALUATE_ENABLE
//#define EVALUATE_MATERIAL
//#define EVALUATE_SPACE
2019-08-04 11:22:49 +08:00
#define EVALUATE_MOBILITY
//#define EVALUATE_TEMPO
//#define EVALUATE_THREAT
//#define EVALUATE_SHAPE
//#define EVALUATE_MOTIF
2019-08-04 11:22:49 +08:00
#endif /* EVALUATE_ENABLE */
#define SORT_MOVE_WITH_HUMAN_KNOWLEDGES
2019-08-04 03:17:53 +08:00
//#define IDS_WINDOW
//#define IDS_DEBUG
//#define IDS_ADD_VALUE
2019-07-05 01:17:17 +08:00
//#define DEEPER_IF_ONLY_ONE_LEGAL_MOVE
#define TRANSPOSITION_TABLE_ENABLE
#ifdef TRANSPOSITION_TABLE_ENABLE
#define CLEAR_TRANSPOSITION_TABLE
#define TRANSPOSITION_TABLE_FAKE_CLEAN
//#define TRANSPOSITION_TABLE_CUTDOWN
//#define TT_MOVE_ENABLE
//#define TRANSPOSITION_TABLE_DEBUG
#endif
#define PREFETCH_SUPPORT
//#define USE_STD_STACK
2019-09-08 23:31:38 +08:00
//#define RAPID_GAME
//#define ENDGAME_LEARNING
//#define ENDGAME_LEARNING_FORCE
//#define ENDGAME_LEARNING_DEBUG
#define THREEFOLD_REPETITION
//#define DONOT_DELETE_TREE
//#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
#define DEBUG_AB_TREE
#endif
//#define DONOT_PLAY_SOUND
2019-07-03 02:01:22 +08:00
2019-07-20 18:30:05 +08:00
#ifdef DEBUG_MODE
#define PLAYER_DRAW_SEAT_NUMBER
#endif
#ifndef MOBILE_APP_UI
2019-09-08 23:31:38 +08:00
#define SAVE_GAMEBOOK_WHEN_ACTION_NEW_TRIGGERED
#endif
2019-06-30 09:57:44 +08:00
// #define DONOT_PLAY_WIN_SOUND
// 摆棋阶段在叉下面显示被吃的子
2019-06-30 09:57:44 +08:00
//#define GAME_PLACING_SHOW_CAPTURED_PIECES
// 启动时窗口最大化
//#define SHOW_MAXIMIZED_ON_LOAD
2019-07-14 22:35:45 +08:00
// 不使用哈希桶
#define DISABLE_HASHBUCKET
// 哈希表不加锁
#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
#ifndef __GNUC__
#define __builtin_expect(expr, n) (expr)
#endif
#define likely(expr) (__builtin_expect(!!(expr), 1))
#define unlikely(expr) (__builtin_expect(!!(expr), 0))
#endif // CONFIG_H