diff --git a/src/eval.c b/src/eval.c index 30aa7c86..97e77e18 100644 --- a/src/eval.c +++ b/src/eval.c @@ -30,13 +30,6 @@ const int PHASE_VALUES[6] = {0, 3, 3, 5, 10, 0}; const int MAX_PHASE = 64; -void SetContempt(int* dest, int stm) { - int contempt = CONTEMPT; - - dest[stm] = contempt; - dest[stm ^ 1] = -contempt; -} - // "Threats" logic to be utilized in search // idea originating in Koivisto void Threats(Threat* threats, Board* board, int stm) { @@ -113,7 +106,6 @@ Score Evaluate(Board* board, ThreadData* thread) { Score knownEval = EvaluateKnownPositions(board); if (knownEval != UNKNOWN) return knownEval; - SearchData* data = &thread->data; int16_t* stm = board->accumulators[board->stm][board->acc]; int16_t* xstm = board->accumulators[board->xstm][board->acc]; @@ -122,9 +114,6 @@ Score Evaluate(Board* board, ThreadData* thread) { // sf cornered bishop in FRC if (CHESS_960) score += FRCCorneredBishop(board); - // static contempt - score += data->contempt[board->stm]; - // scaled based on phase [1, 1.5] score = (128 + board->phase) * score / 128; diff --git a/src/eval.h b/src/eval.h index c884026b..f72242fc 100644 --- a/src/eval.h +++ b/src/eval.h @@ -24,7 +24,6 @@ extern const int PHASE_VALUES[6]; extern const int MAX_PHASE; -void SetContempt(int* dest, int stm); void Threats(Threat* threats, Board* board, int stm); Score Evaluate(Board* board, ThreadData* thread); diff --git a/src/makefile b/src/makefile index 59fea148..60a43399 100644 --- a/src/makefile +++ b/src/makefile @@ -12,7 +12,7 @@ DEFS = -DVERSION=\"$(VERSION)\" -DEVALFILE=\"$(EVALFILE)\" -DNDEBUG # Flags STD = -std=gnu11 LIBS = -pthread -lm -WARN = -Wall -Wextra -Wshadow -Werror +WARN = -Wall -Wextra -Wshadow FLAGS = $(STD) $(WARN) -O3 -flto -g $(DEFS) CFLAGS = $(FLAGS) -march=native diff --git a/src/search.c b/src/search.c index 121e3687..11cb2568 100644 --- a/src/search.c +++ b/src/search.c @@ -137,9 +137,6 @@ void* Search(void* arg) { RefreshAccumulator(board->accumulators[WHITE][board->acc], board, WHITE); RefreshAccumulator(board->accumulators[BLACK][board->acc], board, BLACK); - data->contempt[WHITE] = data->contempt[BLACK] = 0; - SetContempt(data->contempt, board->stm); - // set a hot exit point for this thread if (!setjmp(thread->exit)) { int searchStability = 0; diff --git a/src/types.h b/src/types.h index 4659e1ba..b2994905 100644 --- a/src/types.h +++ b/src/types.h @@ -113,8 +113,6 @@ typedef struct { Move* moves; - int contempt[2]; - int de[MAX_SEARCH_PLY]; // double extensions Move skipMove[MAX_SEARCH_PLY]; // moves to skip during singular search diff --git a/src/uci.c b/src/uci.c index bfb311e4..34d087b9 100644 --- a/src/uci.c +++ b/src/uci.c @@ -42,7 +42,6 @@ int MOVE_OVERHEAD = 300; int MULTI_PV = 1; int PONDER_ENABLED = 0; int CHESS_960 = 0; -int CONTEMPT = 12; volatile int PONDERING = 0; void RootMoves(SimpleMoveList* moves, Board* board) { @@ -228,7 +227,6 @@ void PrintUCIOptions() { printf("option name Ponder type check default false\n"); printf("option name UCI_Chess960 type check default false\n"); printf("option name MoveOverhead type spin default 300 min 100 max 10000\n"); - printf("option name Contempt type spin default 12 min -100 max 100\n"); printf("option name EvalFile type string default \n"); printf("uciok\n"); } @@ -387,8 +385,6 @@ void UCILoop() { ResetThreadPool(threads); } else if (!strncmp(in, "setoption name MoveOverhead value ", 34)) { MOVE_OVERHEAD = min(10000, max(100, GetOptionIntValue(in))); - } else if (!strncmp(in, "setoption name Contempt value ", 30)) { - CONTEMPT = min(100, max(-100, GetOptionIntValue(in))); } else if (!strncmp(in, "setoption name EvalFile value ", 30)) { char* path = in + 30; int success = 0; diff --git a/src/uci.h b/src/uci.h index ab77f994..9d3b5dbe 100644 --- a/src/uci.h +++ b/src/uci.h @@ -20,7 +20,6 @@ #include "types.h" extern int CHESS_960; -extern int CONTEMPT; void RootMoves(SimpleMoveList* moves, Board* board);