chesslablab / php-chess

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

Fix the attack evaluation feature #132

Closed programarivm closed 2 years ago

programarivm commented 2 years ago

It seems as if the attack evaluation is not being calculated properly when a pawn is threatening a minor piece. Attached below is the heuristic picture obtained after playing 1.e4 Nf6 2.e5.

chessboard (1) Figure 1. 1.e4 Nf6 2.e5.

heuristic-fix Figure 2. This is the heuristic picture obtained.

In this particular example, the Attack evaluation should be nearly 1 rather than 0 as it is plotted at this moment.

Keep it up, and happy learning and coding.

programarivm commented 2 years ago

Committed updates to master.