SAN encoding test

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

SAN encoding test

Post by lucasart »

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: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: SAN encoding test

Post by Dann Corbit »

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: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: SAN encoding test

Post by Dann Corbit »

Here is a link to sankit code:
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: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: SAN encoding test

Post by lucasart »

Dann Corbit wrote: Tue May 05, 2020 6: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.
User avatar
Fabio Gobbato
Posts: 217
Joined: Fri Apr 11, 2014 10:45 am
Full name: Fabio Gobbato

Re: SAN encoding test

Post by Fabio Gobbato »

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.