chesslablab / php-chess

A chess library for PHP offering move validation, common formats, multiple variants, UCI engine support, explanation of chess positions, and image recognition.
https://chesslablab.github.io/php-chess/
MIT License
110 stars 52 forks source link

Fix the connectivity evaluation #665

Closed programarivm closed 2 weeks ago

programarivm commented 2 weeks ago

The chess explanations attached have demonstrated to be not too good when describing the connectivity of the pieces.

figure_01 Figure 1. 8/1p4kp/5np1/p7/5R2/1PQ3P1/P4PKP/3r1q2 w - -

figure_02 Figure 2. 8/5k1p/8/p2Pb3/1p6/3q1P2/PPR4P/5KR1 w - -

With the current connectivity evaluation, the white pieces are totally better connected in Figure 1 while the white pieces are significantly better connected in Figure 2. However, that is not the case. The connectivity of the pieces should be expressed in terms of loosely pieces. Another word for this term is hanging pieces: "Unprotected and exposed to capture. A hanging piece may also be said to be en prise."

See: