chesslablab / php-chess

A chess library for PHP.
https://chesslablab.github.io/php-chess/
MIT License
102 stars 46 forks source link

Fix the defense evaluation #477

Closed programarivm closed 8 months ago

programarivm commented 8 months ago

The defense evaluation in src/Eval/DefenseEval.php is still perhaps not too clear in its explanation and needs some fine-tuning as described in the following example.

screencapture-ui-chesslablab-org-2024-02-02-11_16_44

If the knight on b5 moved, these pieces may well be exposed to attack: White's queen on a4, the rook on a8, White's queen on a4, the pawn on b2:

Happy learning!