glinscott / Garbochess-JS

A strong javascript chess engine using WebWorkers
http://forwardcoding.com/projects/ajaxchess/chess.html
Other
310 stars 100 forks source link

Direct-Mate Inefficiency #14

Closed Chris-Burton closed 11 years ago

Chris-Burton commented 11 years ago

In testing GB with Direct-Mate puzzles, I tested one with an 8-move solution where GB could have very easily extended the forced checkmate by one move, but chose not to. This is not a big deal, but if GB is not searching for ways to extend checkmate, this might produce other yet unforeseen issues.

Black moves first. Notice move 5 in Longest Mating Sequence.

Initial FEN: 1qr3k1/1B1R1ppp/4p3/pQ6/4P3/3nBP2/1n4PP/6K1 b - -

Longest Mating Sequence: 1. .. Rc1+ 2. Bxc1 Qa7+ 3. Qb6 Qxb6 4. Rd4 Qxd4+ 5. Be6 Qxe6+ 6. Kh1 Nf2+ 7. Kg1 Nh3+ 8. Kh1 Qd1#

GB Mating Sequence: 1. .. Rc1+ 2. Bxc1 Qa7+ 3. Qb6 Qxb6 4. Rd4 Qxd4+ 5. Kh1 Nf2+ 6. Kg1 Nh3+ 7. Kh1 Qd1#

glinscott commented 11 years ago

Garbochess is correct. The longest mating sequence you posted is incorrect. 5. Be6 is not a legal move. 5. Be3 Qxe3+ leads to a mate in 1.

Chris-Burton commented 11 years ago

Gary,

You're right!

This puzzle came from a book, so I did not think to question the answer. I'll be more careful in the future.

This is yet another tribute to Garbochess' programming. Well done!

Chris Burton

Hey, where did the name come from?

On Thu, Apr 18, 2013 at 11:17 AM, Gary Linscott notifications@github.comwrote:

Garbochess is correct. The longest mating sequence you posted is incorrect. 5. Be6 is not a legal move. 5. Be3 Qxe3+ leads to a mate in 1.

— Reply to this email directly or view it on GitHubhttps://github.com/glinscott/Garbochess-JS/issues/14#issuecomment-16593951 .