diff --git a/README.md b/README.md index 12ceeb9..81035d7 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Rice is not a complete chess program and requires a Disservin, author of Smallbrain for his chess library in c++ which is used in Rice. +I would also like to specially thank Shaheryar Sohail, author of StockNemo, for enormous help in implementing NNUE. + Below are some really nice people who has helped me during the development of Rice. * Zuppa, author of Alexandria. * Rak, author of Mess. diff --git a/src/Rice b/src/Rice new file mode 100644 index 0000000..bd8ea51 Binary files /dev/null and b/src/Rice differ diff --git a/src/init.cpp b/src/init.cpp index 9e7ba1b..080bbb9 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -9,5 +9,5 @@ int LMRDivision = 236; void init_all() { InitSearch(); - nnue.Init("so.json"); + nnue.Init("a.json"); } \ No newline at end of file diff --git a/src/nn1.nnue b/src/nn1.nnue new file mode 100644 index 0000000..0ffb15c Binary files /dev/null and b/src/nn1.nnue differ diff --git a/src/nnue.cpp b/src/nnue.cpp index 9e9d949..29a8acc 100644 --- a/src/nnue.cpp +++ b/src/nnue.cpp @@ -5,7 +5,7 @@ #define INCBIN_STYLE INCBIN_STYLE_CAMEL #include "incbin/incbin.h" -INCBIN(EVAL, "nn.nnue"); +INCBIN(EVAL, "nn1.nnue"); bool DEBUG = false; diff --git a/src/search.cpp b/src/search.cpp index 491b491..71d072e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -315,11 +315,11 @@ int AlphaBeta(int alpha, int beta, int depth, Board &board, SearchInfo &info, } } - if (depth <= 3 && - eval - 63 + 182 * depth <= alpha) - { - return Quiescence(alpha, beta, board, info, ss, table); - } + // if (depth <= 3 && + // eval - 63 + 182 * depth <= alpha) + // { + // return Quiescence(alpha, beta, board, info, ss, table); + // } } movesloop: @@ -393,20 +393,20 @@ int AlphaBeta(int alpha, int beta, int depth, Board &board, SearchInfo &info, /* Extensions * Search extra ply if move comes from tt */ - if (!isRoot && depth >= 7 && (move == tte.move) && (tte.flag & HFBETA) && abs(tte.score) < ISMATE && tte.depth >= depth - 3){ - int singularBeta = tte.score - 3 * depth; - int singularDepth = (depth - 1)/2; - - ss->excluded = tte.move; - int singularScore = AlphaBeta(singularBeta - 1, singularBeta, singularDepth, board, info, ss, table); - ss->excluded = NO_MOVE; - - if (singularScore < singularBeta){ - extension = 1; - }else if (singularBeta >= beta){ - return (singularBeta); - } - } + // if (!isRoot && depth >= 7 && (move == tte.move) && (tte.flag & HFBETA) && abs(tte.score) < ISMATE && tte.depth >= depth - 3){ + // int singularBeta = tte.score - 3 * depth; + // int singularDepth = (depth - 1)/2; + + // ss->excluded = tte.move; + // int singularScore = AlphaBeta(singularBeta - 1, singularBeta, singularDepth, board, info, ss, table); + // ss->excluded = NO_MOVE; + + // if (singularScore < singularBeta){ + // extension = 1; + // }else if (singularBeta >= beta){ + // return (singularBeta); + // } + // } /* Initialize new depth based on extension*/ int newDepth = depth + extension; diff --git a/src/sprt.bat b/src/sprt.bat index 8657d88..4ff08c3 100644 --- a/src/sprt.bat +++ b/src/sprt.bat @@ -1 +1 @@ -cutechess-cli -engine cmd="rice.exe" name="dev" proto="uci" -engine cmd="./binaries/rice.exe" name="master" proto="uci" -each tc=inf/6+0.06 -openings file=./pgns/8moves_v3.pgn order=random -games 2 -rounds 2500 -repeat 2 -maxmoves 200 -sprt elo0=0 elo1=5 alpha=0.05 beta=0.05 -concurrency 6 -ratinginterval 10 -pgnout "./pgns/postnnue.pgn" \ No newline at end of file +cutechess-cli -engine cmd="./Rice.exe" name="dev" proto="uci" -engine cmd="./binaries/Rice.exe" name="master" proto="uci" -each tc=inf/6+0.06 -openings file=./pgns/8moves_v3.pgn order=random -games 2 -rounds 2500 -repeat 2 -maxmoves 200 -sprt elo0=0 elo1=5 alpha=0.05 beta=0.05 -concurrency 6 -ratinginterval 10 -pgnout "./pgns/postnnue.pgn" \ No newline at end of file