Converting engine output from LAN to SAN format

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

arunsoorya1309
Posts: 214
Joined: Tue Nov 03, 2015 4:55 pm

Converting engine output from LAN to SAN format

Post by arunsoorya1309 »

Hi All,

Do you guys know of any utility that can take in a FEN position + list of moves in LAN format and spit out the moves in SAN format?.

Regards,
Arun
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Converting engine output from LAN to SAN format

Post by Ferdy »

arunsoorya1309 wrote:Hi All,

Do you guys know of any utility that can take in a FEN position + list of moves in LAN format and spit out the moves in SAN format?.

Regards,
Arun
I have not known such tool so far. But creating it is not that difficult by using python-chess lib.

Could you post 1 sample fen and your desired output format?, I will create such tool.
arunsoorya1309
Posts: 214
Joined: Tue Nov 03, 2015 4:55 pm

Re: Converting engine output from LAN to SAN format

Post by arunsoorya1309 »

Thanks for helping

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23
f8e8 b1b5 e8e6 b5d5 d8e8 e1b1 e8e7 a4a3 e7d7
Rfe8 Rb5 Re6 Rd5 Rde8 Rb1 R8e7 Qa3 Rd7


FEN + lan = SAN

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23 +
f8e8 b1b5 e8e6 b5d5 d8e8 e1b1 e8e7 a4a3 e7d7

to

Rfe8 Rb5 Re6 Rd5 Rde8 Rb1 R8e7 Qa3 Rd7
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Converting engine output from LAN to SAN format

Post by Ferdy »

arunsoorya1309 wrote:Thanks for helping

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23
f8e8 b1b5 e8e6 b5d5 d8e8 e1b1 e8e7 a4a3 e7d7
Rfe8 Rb5 Re6 Rd5 Rde8 Rb1 R8e7 Qa3 Rd7


FEN + lan = SAN

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23 +
f8e8 b1b5 e8e6 b5d5 d8e8 e1b1 e8e7 a4a3 e7d7

to

Rfe8 Rb5 Re6 Rd5 Rde8 Rb1 R8e7 Qa3 Rd7
I am expecting the following situation.

Input file: input.txt

Code: Select all

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23 
f8e8 b1b5 e8e6 b5d5 d8e8 e1b1 e8e7 a4a3 e7d7

....
....
Program will read the input file and output the following.

Output file: out.txt

Code: Select all

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23
Rfe8 Rb5 Re6 Rd5 Rde8 Rb1 R8e7 Qa3 Rd7

....
....
Is that what you want?
If not could you describe more.
arunsoorya1309
Posts: 214
Joined: Tue Nov 03, 2015 4:55 pm

Re: Converting engine output from LAN to SAN format

Post by arunsoorya1309 »

I just want the output in SAN and not the fen, but that i can work with

eitherways i want the output in SAN
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Converting engine output from LAN to SAN format

Post by Ferdy »

arunsoorya1309 wrote:I just want the output in SAN and not the fen, but that i can work with

eitherways i want the output in SAN
All right then, I will include the fen in the output, this is better since it is easy to verify.
arunsoorya1309
Posts: 214
Joined: Tue Nov 03, 2015 4:55 pm

Re: Converting engine output from LAN to SAN format

Post by arunsoorya1309 »

thanks a lot :)
arunsoorya1309
Posts: 214
Joined: Tue Nov 03, 2015 4:55 pm

Re: Converting engine output from LAN to SAN format

Post by arunsoorya1309 »

also may if not too much to ask

FEn + list of moves and san format for all moves, so that i dnt have to keep calling your script again and again, rather send in 1 fen and list of possible moves for it at different depth
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Converting engine output from LAN to SAN format

Post by Ferdy »

arunsoorya1309 wrote:thanks a lot :)
This is what I have so far.
input.txt

Code: Select all

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23 
f8e8 b1b5 e8e6 b5d5 d8e8 e1b1 e8e7 a4a3 e7d7
r1bqkbnr/pppp1ppp/2n5/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2 3 
f1c4 g8f6 b1c3
rnbqkbnr/pp2pppp/2p5/3p4/2PP4/8/PP2PPPP/RNBQKBNR w KQkq - 0 3 
c4d5 c6d5 g1f3
output.txt

Code: Select all

1kqr1r2/p4pb1/Pp1p2pp/8/Q1PpP3/3P1NP1/5P1P/1R2R1K1 b - - 1 23
Rfe8 Rb5 Re6 Rd5 Rde8 Rb1 R8e7 Qa3 Rd7
r1bqkbnr/pppp1ppp/2n5/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2 3
Bc4 Nf6 Nc3
rnbqkbnr/pp2pppp/2p5/3p4/2PP4/8/PP2PPPP/RNBQKBNR w KQkq - 0 3
cxd5 cxd5 Nf3
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Converting engine output from LAN to SAN format

Post by Ferdy »

arunsoorya1309 wrote:also may if not too much to ask

FEn + list of moves and san format for all moves, so that i dnt have to keep calling your script again and again, rather send in 1 fen and list of possible moves for it at different depth
I need details here.
Show me the input format and output format you desired.