SAN encoding test

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
lucasart
Posts: 3096
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

SAN encoding test

Post by lucasart » Tue May 05, 2020 4:09 am

Does anyone have a good test suite for SAN encoding ? I need (FEN, LAN, SAN) triplets to verify my SAN encoding including all the tricky corner cases.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Dann Corbit
Posts: 10756
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: SAN encoding test

Post by Dann Corbit » Tue May 05, 2020 4:51 am

The SAN Toolkit by Steven J. Edwards might be helpful, because it produces SAN conversions for that sort of purpose.
It is a simple C driver, so you could probably just call its functions.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

Dann Corbit
Posts: 10756
Joined: Wed Mar 08, 2006 7:57 pm
Location: Redmond, WA USA
Contact:

Re: SAN encoding test

Post by Dann Corbit » Tue May 05, 2020 4:58 am

Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.

User avatar
lucasart
Posts: 3096
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: SAN encoding test

Post by lucasart » Thu May 14, 2020 12:40 am

Dann Corbit wrote:
Tue May 05, 2020 4:51 am
The SAN Toolkit by Steven J. Edwards might be helpful, because it produces SAN conversions for that sort of purpose.
It is a simple C driver, so you could probably just call its functions.
I just want the unit tests.

Found in cutechess:
https://github.com/cutechess/cutechess/ ... d.cpp#L161
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Fabio Gobbato
Posts: 143
Joined: Fri Apr 11, 2014 8:45 am
Full name: Fabio Gobbato
Contact:

Re: SAN encoding test

Post by Fabio Gobbato » Thu May 14, 2020 8:51 am

You can use python-chess to generate all legal moves in san format for a lot of fen hoping they coverage the most of cases.

Post Reply