Combining PDNs and FENs

Topics about Checkers programming and other projects.
I hope to keep users informed of the ACF website projects.
Post Reply
Wavuti Uwepo
Posts: 25
Joined: Fri Jul 27, 2012 10:32 pm
What do you like about checkers?: The practically unlimited play of the game.
Location: Queensland, Australia

Combining PDNs and FENs

Post by Wavuti Uwepo »

Hello programmers.

Is there a program that writes a checkers move as well as the associated FEN to the clipboard? If there isn't, would someone like to give it a shot?

For example, something like this-

1. 11-15 W:W32,31,30,29,28,27,26,25,24,23,22,21:B15,12,10,9,8,7,6,5,4,3,2,1.
22-17 B:W32,31,30,29,28,27,26,25,24,23,21,17:B15,12,10,9,8,7,6,5,4,3,2,1.
2. 8-11 W:W32,31,30,29,28,27,26,25,24,23,21,17:B15,12,11,10,9,7,6,5,4,3,2,1.
25-22 B:W32,31,30,29,28,27,26,24,23,22,21,17:B15,12,11,10,9,7,6,5,4,3,2,1.
3. 9-13 W:W32,31,30,29,28,27,26,24,23,22,21,17:B15,13,12,11,10,7,6,5,4,3,2,1.
30-25 B:W32,31,29,28,27,26,25,24,23,22,21,17:B15,13,12,11,10,7,6,5,4,3,2,1.
4. 4-8 W:W32,31,29,28,27,26,25,24,23,22,21,17:B15,13,12,11,10,8,7,6,5,3,2,1.
24-19 B:W32,31,29,28,27,26,25,23,22,21,19,17:B15,13,12,11,10,8,7,6,5,3,2,1.
5. 15x24 W:W32,31,29,28,27,26,25,23,22,21,17:B24,13,12,11,10,8,7,6,5,3,2,1.
28x19 B:W32,31,29,27,26,25,23,22,21,19,17:B13,12,11,10,8,7,6,5,3,2,1.
6. etc.

I think it could be the ultimate tool for finding transpositions once you have a database of games. You would only have to search for duplicate FENs coming off differing PDNs!

(I had the PDN/FEN laid out nicely in column but it didn't post that way...)

Maybe a stand-alone program that converts PDNs to FENs?

Or an add-on to CheckerBoard or other Checkers program that automatically writes the PDN and FENs to the clipboard?
Steven.
Wavuti Uwepo
Posts: 25
Joined: Fri Jul 27, 2012 10:32 pm
What do you like about checkers?: The practically unlimited play of the game.
Location: Queensland, Australia

Re: Combining PDNs and FENs

Post by Wavuti Uwepo »

Here's some code that works! I got some help from the AutoHotKey.com forum. It's still a little dirty but it combines the FEN and PDN as one file that you can copy and paste from the clipboard.

IfWinExist, CheckerBoard: KingsRow 1.16f
WinActivate

StartFEN:

SendInput {Right} ; Right Arrow
Sleep, 100
SendInput !c ; Alt+C (copies FEN to clipboard)
Sleep, 100
SendInput {Space} ; Space (closes FEN box)
Sleep, 100
SendInput {Space} ; Space (opens Comment box)
Sleep, 100
SendInput ^v ; Ctrl+V (pastes FEN to Comment box)
Sleep, 100
SendInput {Enter} ; Enter (closes Comment box)
Sleep, 100

ControlGetText, StatusbarText, msctls_statusbar321
if InStr(StatusbarText, "End of game")
msgbox, Game over

Goto, StartFEN ; Goes to 'StartFEN'
Steven.
Wavuti Uwepo
Posts: 25
Joined: Fri Jul 27, 2012 10:32 pm
What do you like about checkers?: The practically unlimited play of the game.
Location: Queensland, Australia

Re: Combining PDNs and FENs

Post by Wavuti Uwepo »

The following code will let you watch a replay of a game on CheckerBoard from a PDN. It's the same as pressing the right arrow to cycle through a game. Change the '1000' in "Sleep, 1000" to a higher number if you want it to go slower (eg. 1000=1 second, 5000=5 seconds) or a smaller number to make it go faster (eg. 500=0.5 seconds, 100=0.1 seconds). You'll have to change the first line if you are using a different engine or a different version of KingsRow.

Right-click the AutoHotKey icon in your taskbar and select "exit" before changing PDNs or pasting anything into a document or clicking on another window.

IfWinExist, CheckerBoard: KingsRow 1.16f
WinActivate

StartFEN:

SendInput {Right} ; Right Arrow
Sleep, 1000

ControlGetText, StatusbarText, msctls_statusbar321
if InStr(StatusbarText, "End of game")
msgbox, Game over

Goto, StartFEN ; Goes to 'StartFEN'
Steven.
Post Reply