Skip to content

Commit

Permalink
add material compensation in horde
Browse files Browse the repository at this point in the history
To avoid resigning on Lichess while winning …
  • Loading branch information
PaulJeFi committed Feb 21, 2024
1 parent 85dd31a commit 34d4526
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/JavaScript/reglisse.js
Original file line number Diff line number Diff line change
Expand Up @@ -1730,8 +1730,9 @@ function evaluate(board) {
mgPhase = Math.min(gamePhase, 24),
egPhase = 24 - mgPhase;

return (late_eg_score + ((mgScore * mgPhase + egScore * egPhase) / 24) +
(SKILL != 20 ? skill() : 0))>> 0;
return (late_eg_score + ((mgScore * mgPhase + egScore * egPhase) / 24) +
(variant == 2 ? 1000 : 0) * side2move + // because horde is hard ...
(SKILL != 20 ? skill() : 0))>> 0; // skill level
};

// Add small random value to draw positions to add dynamism to the engine.
Expand Down

0 comments on commit 34d4526

Please sign in to comment.