From 2fd114dee47a8e81050b08f7791202a33d0d1fb9 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 11 Jul 2020 17:33:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=B0=86=20zobrist.h/.c=20?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=E8=BD=AC=E7=A7=BB=E5=88=B0=20positi?= =?UTF-8?q?on.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- millgame.pro | 3 +- millgame.vcxproj | 2 - millgame.vcxproj.filters | 6 -- src/position.cpp | 115 +++++++++++++++++++++++++++++++++++-- src/search.cpp | 4 +- src/search.h | 2 +- src/tt.h | 2 - src/zobrist.cpp | 121 --------------------------------------- src/zobrist.h | 25 -------- 9 files changed, 113 insertions(+), 167 deletions(-) delete mode 100644 src/zobrist.cpp delete mode 100644 src/zobrist.h diff --git a/millgame.pro b/millgame.pro index 8e1e1ee0..7734d6bd 100644 --- a/millgame.pro +++ b/millgame.pro @@ -27,12 +27,12 @@ SOURCES += \ src/movegen.cpp \ src/movepick.cpp \ src/thread.cpp \ + src/timeman.cpp \ src/trainer.cpp \ src/tt.cpp \ src/misc.cpp \ src/uci.cpp \ src/ucioption.cpp \ - src/zobrist.cpp \ src/bitboard.cpp \ src/option.cpp \ src/position.cpp \ @@ -70,7 +70,6 @@ HEADERS += \ src/aithread.h \ src/search.h \ src/uci.h \ - src/zobrist.h \ src/bitboard.h \ src/option.h \ src/position.h \ diff --git a/millgame.vcxproj b/millgame.vcxproj index d4ad1292..78030d9e 100644 --- a/millgame.vcxproj +++ b/millgame.vcxproj @@ -469,7 +469,6 @@ - @@ -723,7 +722,6 @@ - diff --git a/millgame.vcxproj.filters b/millgame.vcxproj.filters index b7e28f59..69453340 100644 --- a/millgame.vcxproj.filters +++ b/millgame.vcxproj.filters @@ -105,9 +105,6 @@ Header Files - - Header Files - Header Files @@ -326,9 +323,6 @@ Source Files - - Source Files - Source Files diff --git a/src/position.cpp b/src/position.cpp index 63767d82..899e0af6 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -33,10 +33,113 @@ #include "uci.h" #include "option.h" -#include "zobrist.h" string tips; +namespace Zobrist +{ +const Key psq[SQUARE_NB][PIECE_TYPE_NB] = { +#ifdef TRANSPOSITION_TABLE_CUTDOWN + {0x4E421A, 0x3962FF, 0x6DB6EE, 0x219AE1}, + {0x1F3DE2, 0xD9AACB, 0xD51733, 0xD3F9EA}, + {0xF5A7BB, 0xDC4109, 0xEE4319, 0x7CDA7A}, + {0xFD7B4D, 0x4138BE, 0xCCBB2D, 0xDA6097}, + {0x06D827, 0xCBC16C, 0x46F125, 0xE29F22}, + {0xCAAB94, 0x5B02DB, 0x877CD6, 0x35E438}, + {0x49FDAE, 0xE68314, 0xBE1664, 0x1F49D3}, + {0x50F5B1, 0x149AAF, 0xF509B9, 0x47AEB5}, + {0x18E993, 0x76BB4F, 0xFE1739, 0xF87B87}, + {0x0A8CD2, 0x630C6B, 0x88F5B4, 0x0A583E}, + {0xA0128E, 0x6F2251, 0x51E99D, 0x6D35BF}, + {0x66D6D9, 0x87D366, 0x75A57A, 0x534FC4}, + {0x1FE34B, 0xAD6FB0, 0xE5679D, 0xF88AFF}, + {0x0462DA, 0x4BDE96, 0xF28912, 0x10537E}, + {0x26D8EA, 0x37E6E7, 0x0871D9, 0xCD5F4F}, + {0xF4AFA1, 0x44A51B, 0x772656, 0x8B7965}, + {0xD8F17D, 0x80F3D7, 0x6B6206, 0x19B8BB}, + {0xFBC229, 0x0FCAB4, 0xFD7374, 0xA647B9}, + {0x296A8D, 0xA3D742, 0x624D6D, 0x459FD4}, + {0xCE8C26, 0x965448, 0x410171, 0x1EDD7A}, + {0x1FCF95, 0xA5634E, 0x21976A, 0x32902D}, + {0x55A27C, 0x49EC5F, 0x0176A1, 0xCAAAEF}, + {0x145886, 0xB4C808, 0x0153EE, 0x7D78DF}, + {0xE9C3C5, 0x66B7A6, 0x3CD930, 0xDBBA23}, + {0xF19841, 0x6BEFDF, 0xB979FE, 0xBA4D06}, + {0x96AECF, 0x33B96E, 0x76A99C, 0x1B8762}, + {0x747B20, 0x0DEC24, 0xA4E632, 0xBA2442}, + {0x59C91B, 0x41482D, 0xF2CD39, 0x30E9C1}, + {0x6B156D, 0xC7F191, 0x012D36, 0xC66B36}, + {0x631560, 0xA891FC, 0xF6C8AC, 0xD80B94}, + {0xF641E9, 0xF164BF, 0x2DBE4C, 0xE2A40C}, + {0x53FA06, 0x4F3117, 0x0ACA70, 0x2C72F5}, + {0xC81047, 0x4B76AE, 0xEB55C8, 0x0DB6EF}, + {0x7F57AB, 0x22D060, 0x390554, 0xDE9A43}, + {0x6583AF, 0x41D141, 0x9CBF92, 0x7E528F}, + {0x2BEFA1, 0x5C5FDC, 0x4DDAFA, 0x7C98A1}, + {0x65A13B, 0x2953BF, 0x8769A8, 0xE6DCA1}, + {0xD01A6E, 0xBCD935, 0x175659, 0xAD5A73}, + {0xB04E7D, 0x815F53, 0x12469A, 0xB2F25C}, + {0x564E4B, 0xD19437, 0xA4F63C, 0x7169E5} +#else + {0x618A9CF24E421A, 0xBA7A364A3962FF, 0xA4306AD06DB6EE, 0xBD592807219AE1}, + {0x83E4F70B1F3DE2, 0x5153D8FCD9AACB, 0x4A996847D51733, 0x2719CCC6D3F9EA}, + {0x7AE39BDEF5A7BB, 0xBCD7D5DEDC4109, 0x5B14285CEE4319, 0x9F721DD87CDA7A}, + {0x5D9ACD64FD7B4D, 0x620F60444138BE, 0x9725301DCCBB2D, 0x9275D47FDA6097}, + {0xF5EC163506D827, 0xDBF647FACBC16C, 0xB520224946F125, 0xB2889032E29F22}, + {0x964C65F0CAAB94, 0x461170C85B02DB, 0xA886E3A7877CD6, 0x26F1B8EF35E438}, + {0xF5B97EF849FDAE, 0xEE7C5D59E68314, 0x32648EFABE1664, 0x6189EDE91F49D3}, + {0x93CBB24B50F5B1, 0xF0F6C79D149AAF, 0x3A993B39F509B9, 0x1E5308DE47AEB5}, + {0x2600EE1A18E993, 0x390B489E76BB4F, 0x6F3B9027FE1739, 0x095BADF5F87B87}, + {0x8BEE19670A8CD2, 0x6CF81326630C6B, 0xADE52B7888F5B4, 0x8D3F6C790A583E}, + {0xCB53C13BA0128E, 0x3F72BC2E6F2251, 0xB42ED55551E99D, 0x4984708B6D35BF}, + {0x9543165266D6D9, 0xAAD0136987D366, 0x97D1867575A57A, 0xB207C471534FC4}, + {0xD2303A381FE34B, 0x93490C78AD6FB0, 0x87113B18E5679D, 0x54391F89F88AFF}, + {0xB6DEDA460462DA, 0x5185B8464BDE96, 0x51C69A99F28912, 0x46774A0A10537E}, + {0xE006203726D8EA, 0xA5474E6237E6E7, 0x39AC6AA70871D9, 0x3DEE0C9FCD5F4F}, + {0xF818EB3AF4AFA1, 0x8F3A441844A51B, 0x8A25D496772656, 0xCE06B0CA8B7965}, + {0x626F5F46D8F17D, 0x944977DB80F3D7, 0x7A227AA66B6206, 0x4DCC135019B8BB}, + {0x711EC2C8FBC229, 0xE7BB68800FCAB4, 0xD3955CDAFD7374, 0xE7534419A647B9}, + {0x9FDCA93E296A8D, 0xFDB2801DA3D742, 0xE3C38E0C624D6D, 0x4D69B7E2459FD4}, + {0x5A3A714CCE8C26, 0x05D969D4965448, 0x34FFB957410171, 0x9B1A08811EDD7A}, + {0xC6F613271FCF95, 0xCD947ECFA5634E, 0x8DB775C121976A, 0xD8E8477932902D}, + {0x1CAD3B5655A27C, 0x8AC13C7C49EC5F, 0xBA076D030176A1, 0xAC96DC58CAAAEF}, + {0xFEEFB931145886, 0x0E5CCD93B4C808, 0x9BDB4F0C0153EE, 0xAEB4F8927D78DF}, + {0x621E3A9EE9C3C5, 0xDE5AA56E66B7A6, 0x030E97EE3CD930, 0xE9A79619DBBA23}, + {0x77B25AEAF19841, 0xB8E4263C6BEFDF, 0xCE932447B979FE, 0xFFEE0A6DBA4D06}, + {0x241CFD8796AECF, 0xFE8A5B9C33B96E, 0xD47296D976A99C, 0x7AB3259A1B8762}, + {0x7977FD45747B20, 0x84C2C36A0DEC24, 0x12CF8CDEA4E632, 0xC02BE51BBA2442}, + {0xBD78281F59C91B, 0x5058264241482D, 0xA79BA355F2CD39, 0x3274B36F30E9C1}, + {0x751C8B5D6B156D, 0xB7C8814FC7F191, 0x11E74CCF012D36, 0xF58E3A35C66B36}, + {0xF92812B1631560, 0x6E98FEA1A891FC, 0x3A00752DF6C8AC, 0xDE4AC1B9D80B94}, + {0x1382738DF641E9, 0xF698FD60F164BF, 0xC1E4F6772DBE4C, 0x80AD23BCE2A40C}, + {0x22AD6ADB53FA06, 0xFB5D2D614F3117, 0x1DDDDF550ACA70, 0x962A4AD92C72F5}, + {0x46EB4A0AC81047, 0x140BB5664B76AE, 0xF5088729EB55C8, 0x148E44E10DB6EF}, + {0x1623D3EB7F57AB, 0x6E826D9722D060, 0x49C27320390554, 0x0C35E2C5DE9A43}, + {0x594468826583AF, 0xE190283B41D141, 0xEA3D0B0A9CBF92, 0x36BDEA707E528F}, + {0x4FE884872BEFA1, 0xE70A0AB95C5FDC, 0xA8EE1E864DDAFA, 0xDD58D6957C98A1}, + {0xFD678C8865A13B, 0xFF15F6332953BF, 0xDCE23A318769A8, 0xDF4C292EE6DCA1}, + {0xFD34EA18D01A6E, 0xFA1300F7BCD935, 0xAAC5CC68175659, 0xE0C64BA5AD5A73}, + {0x5ECF7987B04E7D, 0xAB38FFE6815F53, 0x94EA1A1812469A, 0x20EDFF94B2F25C}, + {0x0B2D4606564E4B, 0x83381E3CD19437, 0xD3DB04A0A4F63C, 0x789C60EF7169E5} +#endif /* TRANSPOSITION_TABLE_CUTDOWN */ +}; +} + +#ifdef ONLY_USED_FOR_CONVERT +int main(void) +{ + for (int i = 0; i < 40; i++) { + printf("{"); + for (int j = 0; j < 3; j++) { + printf("0x%08X, ", (uint32_t)arr[i][j]); + } + printf("0x%08X},\n", (uint32_t)arr[i][3]); + } + + return 0; +} +#endif + Position::Position() { construct_key(); @@ -1104,7 +1207,7 @@ Key Position::update_key(Square square) //Location loc = board[square]; //int pieceType = loc == 0x0f? 3 : loc >> PLAYER_SHIFT; - st.key ^= zobrist[square][pieceType]; + st.key ^= Zobrist::psq[square][pieceType]; return st.key; } @@ -1145,20 +1248,20 @@ Key Position::next_primary_key(Move m) if (mt == MOVETYPE_REMOVE) { int pieceType = ~sideToMove; - npKey ^= zobrist[sq][pieceType]; + npKey ^= Zobrist::psq[sq][pieceType]; if (rule.hasBannedLocations && phase == PHASE_PLACING) { - npKey ^= zobrist[sq][BAN]; + npKey ^= Zobrist::psq[sq][BAN]; } return npKey; } int pieceType = sideToMove; - npKey ^= zobrist[sq][pieceType]; + npKey ^= Zobrist::psq[sq][pieceType]; if (mt == MOVETYPE_MOVE) { - npKey ^= zobrist[from_sq(m)][pieceType]; + npKey ^= Zobrist::psq[from_sq(m)][pieceType]; } return npKey; diff --git a/src/search.cpp b/src/search.cpp index 5c1e0ebb..377aec6d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -527,7 +527,7 @@ Value AIAlgorithm::search(Depth depth, Value alpha, Value beta) } #endif // PVS_AI - undoMove(); + undo_move(); assert(value > -VALUE_INFINITE && value < VALUE_INFINITE); @@ -576,7 +576,7 @@ void AIAlgorithm::do_move(Move move) pos->do_move(move); } -void AIAlgorithm::undoMove() +void AIAlgorithm::undo_move() { memcpy(pos, positionStack.top(), sizeof(Position)); //tmppos = positionStack.top(); diff --git a/src/search.h b/src/search.h index bc12a632..af7b4fee 100644 --- a/src/search.h +++ b/src/search.h @@ -166,7 +166,7 @@ public: void do_move(Move move); - void undoMove(); + void undo_move(); void do_null_move(); void undo_null_move(); diff --git a/src/tt.h b/src/tt.h index c01abb41..8241c339 100644 --- a/src/tt.h +++ b/src/tt.h @@ -30,8 +30,6 @@ using namespace CTSL; #ifdef TRANSPOSITION_TABLE_ENABLE -extern const Key zobrist[SQUARE_NB][PIECE_TYPE_NB]; - struct TTEntry { Value value; diff --git a/src/zobrist.cpp b/src/zobrist.cpp deleted file mode 100644 index bd143b06..00000000 --- a/src/zobrist.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - Sanmill, a mill game playing engine derived from NineChess 1.5 - Copyright (C) 2015-2018 liuweilhy (NineChess author) - Copyright (C) 2019-2020 Calcitem - - 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 . -*/ - -#include "zobrist.h" - -const Key zobrist[SQUARE_NB][PIECE_TYPE_NB] = { -#ifdef TRANSPOSITION_TABLE_CUTDOWN - {0x4E421A, 0x3962FF, 0x6DB6EE, 0x219AE1}, - {0x1F3DE2, 0xD9AACB, 0xD51733, 0xD3F9EA}, - {0xF5A7BB, 0xDC4109, 0xEE4319, 0x7CDA7A}, - {0xFD7B4D, 0x4138BE, 0xCCBB2D, 0xDA6097}, - {0x06D827, 0xCBC16C, 0x46F125, 0xE29F22}, - {0xCAAB94, 0x5B02DB, 0x877CD6, 0x35E438}, - {0x49FDAE, 0xE68314, 0xBE1664, 0x1F49D3}, - {0x50F5B1, 0x149AAF, 0xF509B9, 0x47AEB5}, - {0x18E993, 0x76BB4F, 0xFE1739, 0xF87B87}, - {0x0A8CD2, 0x630C6B, 0x88F5B4, 0x0A583E}, - {0xA0128E, 0x6F2251, 0x51E99D, 0x6D35BF}, - {0x66D6D9, 0x87D366, 0x75A57A, 0x534FC4}, - {0x1FE34B, 0xAD6FB0, 0xE5679D, 0xF88AFF}, - {0x0462DA, 0x4BDE96, 0xF28912, 0x10537E}, - {0x26D8EA, 0x37E6E7, 0x0871D9, 0xCD5F4F}, - {0xF4AFA1, 0x44A51B, 0x772656, 0x8B7965}, - {0xD8F17D, 0x80F3D7, 0x6B6206, 0x19B8BB}, - {0xFBC229, 0x0FCAB4, 0xFD7374, 0xA647B9}, - {0x296A8D, 0xA3D742, 0x624D6D, 0x459FD4}, - {0xCE8C26, 0x965448, 0x410171, 0x1EDD7A}, - {0x1FCF95, 0xA5634E, 0x21976A, 0x32902D}, - {0x55A27C, 0x49EC5F, 0x0176A1, 0xCAAAEF}, - {0x145886, 0xB4C808, 0x0153EE, 0x7D78DF}, - {0xE9C3C5, 0x66B7A6, 0x3CD930, 0xDBBA23}, - {0xF19841, 0x6BEFDF, 0xB979FE, 0xBA4D06}, - {0x96AECF, 0x33B96E, 0x76A99C, 0x1B8762}, - {0x747B20, 0x0DEC24, 0xA4E632, 0xBA2442}, - {0x59C91B, 0x41482D, 0xF2CD39, 0x30E9C1}, - {0x6B156D, 0xC7F191, 0x012D36, 0xC66B36}, - {0x631560, 0xA891FC, 0xF6C8AC, 0xD80B94}, - {0xF641E9, 0xF164BF, 0x2DBE4C, 0xE2A40C}, - {0x53FA06, 0x4F3117, 0x0ACA70, 0x2C72F5}, - {0xC81047, 0x4B76AE, 0xEB55C8, 0x0DB6EF}, - {0x7F57AB, 0x22D060, 0x390554, 0xDE9A43}, - {0x6583AF, 0x41D141, 0x9CBF92, 0x7E528F}, - {0x2BEFA1, 0x5C5FDC, 0x4DDAFA, 0x7C98A1}, - {0x65A13B, 0x2953BF, 0x8769A8, 0xE6DCA1}, - {0xD01A6E, 0xBCD935, 0x175659, 0xAD5A73}, - {0xB04E7D, 0x815F53, 0x12469A, 0xB2F25C}, - {0x564E4B, 0xD19437, 0xA4F63C, 0x7169E5} -#else - {0x618A9CF24E421A, 0xBA7A364A3962FF, 0xA4306AD06DB6EE, 0xBD592807219AE1}, - {0x83E4F70B1F3DE2, 0x5153D8FCD9AACB, 0x4A996847D51733, 0x2719CCC6D3F9EA}, - {0x7AE39BDEF5A7BB, 0xBCD7D5DEDC4109, 0x5B14285CEE4319, 0x9F721DD87CDA7A}, - {0x5D9ACD64FD7B4D, 0x620F60444138BE, 0x9725301DCCBB2D, 0x9275D47FDA6097}, - {0xF5EC163506D827, 0xDBF647FACBC16C, 0xB520224946F125, 0xB2889032E29F22}, - {0x964C65F0CAAB94, 0x461170C85B02DB, 0xA886E3A7877CD6, 0x26F1B8EF35E438}, - {0xF5B97EF849FDAE, 0xEE7C5D59E68314, 0x32648EFABE1664, 0x6189EDE91F49D3}, - {0x93CBB24B50F5B1, 0xF0F6C79D149AAF, 0x3A993B39F509B9, 0x1E5308DE47AEB5}, - {0x2600EE1A18E993, 0x390B489E76BB4F, 0x6F3B9027FE1739, 0x095BADF5F87B87}, - {0x8BEE19670A8CD2, 0x6CF81326630C6B, 0xADE52B7888F5B4, 0x8D3F6C790A583E}, - {0xCB53C13BA0128E, 0x3F72BC2E6F2251, 0xB42ED55551E99D, 0x4984708B6D35BF}, - {0x9543165266D6D9, 0xAAD0136987D366, 0x97D1867575A57A, 0xB207C471534FC4}, - {0xD2303A381FE34B, 0x93490C78AD6FB0, 0x87113B18E5679D, 0x54391F89F88AFF}, - {0xB6DEDA460462DA, 0x5185B8464BDE96, 0x51C69A99F28912, 0x46774A0A10537E}, - {0xE006203726D8EA, 0xA5474E6237E6E7, 0x39AC6AA70871D9, 0x3DEE0C9FCD5F4F}, - {0xF818EB3AF4AFA1, 0x8F3A441844A51B, 0x8A25D496772656, 0xCE06B0CA8B7965}, - {0x626F5F46D8F17D, 0x944977DB80F3D7, 0x7A227AA66B6206, 0x4DCC135019B8BB}, - {0x711EC2C8FBC229, 0xE7BB68800FCAB4, 0xD3955CDAFD7374, 0xE7534419A647B9}, - {0x9FDCA93E296A8D, 0xFDB2801DA3D742, 0xE3C38E0C624D6D, 0x4D69B7E2459FD4}, - {0x5A3A714CCE8C26, 0x05D969D4965448, 0x34FFB957410171, 0x9B1A08811EDD7A}, - {0xC6F613271FCF95, 0xCD947ECFA5634E, 0x8DB775C121976A, 0xD8E8477932902D}, - {0x1CAD3B5655A27C, 0x8AC13C7C49EC5F, 0xBA076D030176A1, 0xAC96DC58CAAAEF}, - {0xFEEFB931145886, 0x0E5CCD93B4C808, 0x9BDB4F0C0153EE, 0xAEB4F8927D78DF}, - {0x621E3A9EE9C3C5, 0xDE5AA56E66B7A6, 0x030E97EE3CD930, 0xE9A79619DBBA23}, - {0x77B25AEAF19841, 0xB8E4263C6BEFDF, 0xCE932447B979FE, 0xFFEE0A6DBA4D06}, - {0x241CFD8796AECF, 0xFE8A5B9C33B96E, 0xD47296D976A99C, 0x7AB3259A1B8762}, - {0x7977FD45747B20, 0x84C2C36A0DEC24, 0x12CF8CDEA4E632, 0xC02BE51BBA2442}, - {0xBD78281F59C91B, 0x5058264241482D, 0xA79BA355F2CD39, 0x3274B36F30E9C1}, - {0x751C8B5D6B156D, 0xB7C8814FC7F191, 0x11E74CCF012D36, 0xF58E3A35C66B36}, - {0xF92812B1631560, 0x6E98FEA1A891FC, 0x3A00752DF6C8AC, 0xDE4AC1B9D80B94}, - {0x1382738DF641E9, 0xF698FD60F164BF, 0xC1E4F6772DBE4C, 0x80AD23BCE2A40C}, - {0x22AD6ADB53FA06, 0xFB5D2D614F3117, 0x1DDDDF550ACA70, 0x962A4AD92C72F5}, - {0x46EB4A0AC81047, 0x140BB5664B76AE, 0xF5088729EB55C8, 0x148E44E10DB6EF}, - {0x1623D3EB7F57AB, 0x6E826D9722D060, 0x49C27320390554, 0x0C35E2C5DE9A43}, - {0x594468826583AF, 0xE190283B41D141, 0xEA3D0B0A9CBF92, 0x36BDEA707E528F}, - {0x4FE884872BEFA1, 0xE70A0AB95C5FDC, 0xA8EE1E864DDAFA, 0xDD58D6957C98A1}, - {0xFD678C8865A13B, 0xFF15F6332953BF, 0xDCE23A318769A8, 0xDF4C292EE6DCA1}, - {0xFD34EA18D01A6E, 0xFA1300F7BCD935, 0xAAC5CC68175659, 0xE0C64BA5AD5A73}, - {0x5ECF7987B04E7D, 0xAB38FFE6815F53, 0x94EA1A1812469A, 0x20EDFF94B2F25C}, - {0x0B2D4606564E4B, 0x83381E3CD19437, 0xD3DB04A0A4F63C, 0x789C60EF7169E5} -#endif /* TRANSPOSITION_TABLE_CUTDOWN */ -}; - -#ifdef ONLY_USED_FOR_CONVERT -int main(void) -{ - for (int i = 0; i < 40; i++) { - printf("{"); - for (int j = 0; j < 3; j++) { - printf("0x%08X, ", (uint32_t)arr[i][j]); - } - printf("0x%08X},\n", (uint32_t)arr[i][3]); - } - - return 0; -} -#endif diff --git a/src/zobrist.h b/src/zobrist.h deleted file mode 100644 index ce39d4c2..00000000 --- a/src/zobrist.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - Sanmill, a mill game playing engine derived from NineChess 1.5 - Copyright (C) 2015-2018 liuweilhy (NineChess author) - Copyright (C) 2019-2020 Calcitem - - 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 . -*/ - -#include - -#include "config.h" -#include "position.h" - -extern const Key zobrist[SQUARE_NB][PIECE_TYPE_NB];