(Hub engine) GUI for International Draughts

Discussion about development of draughts in the time of computer and Internet.
Post Reply
gwiesenekker
Posts: 29
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

(Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi,

I guess, like many of you, I regularly use AI while programming in “paste question into web browser and copy answer” mode. However, I noticed that the latest AI coding agents have become really good.
Yesterday I started from scratch with the latest ChatGPT Codex plugin for Visual Studio Code on Linux. I only provided the Draughts Utrecht font and Scan’s protocol.txt files in an otherwise empty directory, and then started building a GUI using Lazarus/Object Pascal, since it also supports Windows and macOS, by simply asking questions.
After one hour I had a GUI that could open a FEN file, generate legal moves — which worked right away for International Draughts — play moves, save and load the game as a PDN file, launch a hub engine, capture, edit and save the supported parameters, and drive the engine, all without writing a single line of code myself. It was hard to believe. It even showed things like “let me briefly launch a Python interpreter to simulate hub-engine output to verify that I am capturing it correctly” while generating, debugging, and verifying the code.
gui.png
I will publish the project on my GitHub repo when it is finished.

Regards,
GW
Rein Halbersma
Posts: 1725
Joined: Wed Apr 14, 2004 16:04
Contact:

Re: (Hub engine) GUI for International Draughts

Post by Rein Halbersma »

That is really awesome. I have been having great experiences with AI tools too. E.g. I have an algorithm to index/de-index kings only endgames with symmetry equivalent positions removed. I just prompted regular ChatGPT and it wrote Python and C++ code! I was planning to try a Qt C++ GUI next, with the Kingsrow look and feel and the Hub protocol next.
gwiesenekker
Posts: 29
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

The GUI is almost done. Codex started to struggle a bit with tracking the actual engine state and the state the GUI thought it was in, but after suggesting 'we' should log the states and the state transitions and copying/pasting the log-output into the chat if an error occurred Codex quickly resolved all issues.
The GUI is almost done: the last played move is shown with a yellow outline, if there is only one legal move the move is shown in blue, if you click on a man/king and if it has only one move, the move is executed right away, otherwise the possible target squares are shown in green and you click on the target square to select the move. If the combination of source/target square is still ambiguous the target squares are shown in red and you should select the move from the move list.
You can play a game with a configured time-control and the clocks are shown. Computer moves are annotated with depth, score and time-used. The state of the clocks is also recorded as annotation, so if you take back a move the clocks are also restored.

GW
Post Reply