Skip to content

Commit

Permalink
Adapt game specific values to variant duck
Browse files Browse the repository at this point in the history
This adapts piece and endgame values to variant duck. Attention, use this branch only for variant duck. All other variants are weakened with this game specific values!
  • Loading branch information
mtaktikos authored Apr 2, 2023
1 parent 4f223e8 commit bdbf309
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/endgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ Value Endgame<KBNK>::operator()(const Position& pos) const {
template<>
Value Endgame<KPK>::operator()(const Position& pos) const {

assert(verify_material(pos, strongSide, VALUE_ZERO, 1));
assert(verify_material(pos, weakSide, VALUE_ZERO, 0));
assert(verify_material(pos, strongSide, VALUE_VIRTUAL_MATE, 1));
assert(verify_material(pos, weakSide, VALUE_VIRTUAL_LOSS, 0));

// Assume strongSide is white and the pawn is on files A-D
Square strongKing = normalize(pos, strongSide, pos.square<KING>(strongSide));
Expand Down
11 changes: 6 additions & 5 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ enum Value : int {
VALUE_MATE = 32000,
XBOARD_VALUE_MATE = 200000,
VALUE_VIRTUAL_MATE = 3000,
VALUE_VIRTUAL_LOSS = -3000,
VALUE_VIRTUAL_MATE_IN_MAX_PLY = VALUE_VIRTUAL_MATE - MAX_PLY,
VALUE_INFINITE = 32001,
VALUE_NONE = 32002,
Expand All @@ -345,11 +346,11 @@ enum Value : int {
VALUE_MATE_IN_MAX_PLY = VALUE_MATE - MAX_PLY,
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE_IN_MAX_PLY,

PawnValueMg = 126, PawnValueEg = 208,
KnightValueMg = 781, KnightValueEg = 854,
BishopValueMg = 825, BishopValueEg = 915,
RookValueMg = 1276, RookValueEg = 1380,
QueenValueMg = 2538, QueenValueEg = 2682,
PawnValueMg = 116, PawnValueEg = 186,
KnightValueMg = 261, KnightValueEg = 444,
BishopValueMg = 100, BishopValueEg = 100,
RookValueMg = 204, RookValueEg = 244,
QueenValueMg = 427, QueenValueEg = 798,
FersValueMg = 420, FersValueEg = 450,
AlfilValueMg = 350, AlfilValueEg = 330,
FersAlfilValueMg = 700, FersAlfilValueEg = 650,
Expand Down

0 comments on commit bdbf309

Please sign in to comment.