(Hub engine) GUI for International Draughts

Discussion about development of draughts in the time of computer and Internet.
Joost Buijs
Posts: 502
Joined: Wed May 04, 2016 11:45
Real name: Joost Buijs

Re: (Hub engine) GUI for International Draughts

Post by Joost Buijs »

gwiesenekker wrote: Sun May 31, 2026 12:25 I am running Codex locally but I did not expect it to search my entire drive if needed:
It's also searching your harddrive if not needed. All these 'Big Tech' companies are spying on you, this is something you have to live with. I've blocked most of the URL's in my firewall where telemetry is sent to, unfortunately I can't block them all because it will break things.
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi,

First hybrid match between GWD in hub mode and GWD in DXP mode is running!

GW
BertTuyt
Posts: 1623
Joined: Wed Sep 01, 2004 19:42

Re: (Hub engine) GUI for International Draughts

Post by BertTuyt »

Gijsbert, do you also plan to write an application (in the same way) for databases?
Like Turbo Dambase for example?
I know that Klaas Bor worked really hard to create the perfect GUI for this purpose.
I'm sure he spent zillions of hours, and now all is possible with multiple prompts.
And next, I'm also curious who will be the first person who creates an engine only based upon prompts, and not writing a single line of code.

Bert
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi,

It should not be too hard adding database support. The first full DXP-only tournament is running now. Hub vs DXP was easy, but DXP vs DXP was much harder. You got the feeling that 'we' were patching patches with patches. 'We' got it working, but I thought it was flaky. If you then ask to review the code it suggests a refactor using a state-machine and that worked much better. Looking back you should have mentioned that in the beginning as in 'Lets now add an engine. We should keep track of the states of the GUI and the engine using finite state machines. Could you log the state of the GUI and the engine(s) when states change?' That would have prevented a lot of these 'unexpected state' bugs.

GW
Last edited by gwiesenekker on Wed Jun 03, 2026 05:23, edited 1 time in total.
BertTuyt
Posts: 1623
Joined: Wed Sep 01, 2004 19:42

Re: (Hub engine) GUI for International Draughts

Post by BertTuyt »

Gijsbert, think we all need to learn how to use these new AI-tools.And the good news while we learn they continue to improve.
When do plan the next release of your GUI?

Bert
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi,

I have published version 1.6.

It shows the PV in a (browsable) mini-board. The mini-board can be popped out.
It also shows score-history.
It supports DXP engines for game play. When registering an engine you can configure it for Hub or DXP mode (or both, GWD supports both). You can use {ip} and {port} as launch parameters, so you can specify an argument list such as: --dxp_server_ip={ip} --dxp_port={port} dxp_client. You can edit an .ini configuration file (default, but you can select a file with another extension) that the engine needs, but you can not (yet) use {ip} and {port} in those have only tested 'GUI listens' BTW.
You can run single or double round-robin tournaments between a mix of HUB and DXP engines. You can stop a tournament and resume it at a later time, it will resume at the first unknown result (but the game will not be resumed, it will be restarted).
ksnip_20260601-070456.png
Could you run tournaments with other HUB and DXP engines than GWD or Kingsrow and let me know what works (and what not)?

GW
Last edited by gwiesenekker on Mon Jun 01, 2026 08:23, edited 1 time in total.
Krzysztof Grzelak
Posts: 1410
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: (Hub engine) GUI for International Draughts

Post by Krzysztof Grzelak »

Add Swiss tournament.
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi Krzysztof,

I will explore that option. As a temporary workaround I could also add manual pairing, so you could add the pairing for the next round to the pairing table with result unknown. If you then hit 'Start' the next round will be automatically played.

GW
Krzysztof Grzelak
Posts: 1410
Joined: Thu Jun 20, 2013 17:16
Real name: Krzysztof Grzelak

Re: (Hub engine) GUI for International Draughts

Post by Krzysztof Grzelak »

At least it should be possible to play two tournaments - Swiss tournament, round-robin. Give many more options in the GUI, those I wrote about earlier.
Ed Gilbert
Posts: 869
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: (Hub engine) GUI for International Draughts

Post by Ed Gilbert »

Version 1.4 is published on github. You should be able to play a match between Kingsrow and Mobydam with this version.
I have downloaded GWGUI version 1.6 and started to play with it. I am trying to run a hub tournament between kingsrow and the latest version of moby dam, Moby Dam_May 15 2026. The first game stops as soon as kingsrow makes a capture move with moby dam complaining that the move is not a legal move. I have tried both TRUE and FALSE for the gui-single-captures-include-captured-square engine setting of moby dam, but I get the same error either way.

-- Ed
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi Ed,

That issue has been fixed in version 1.6, but meanwhile I also found a couple of stability issues on Windows (synchronization issues, processes not always being cleaned up). Version 1.7 with a lot of fixes and Swiss tournament support coming up:
2026-06-02 23_42_45-NVIDIA GeForce Overlay DT.png
GW
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi Ed,

I forgot to mention that for Moby Dam you have to set 'gui-send-starting-position' to 'false'. If 'false' the position after the last non-reversible move will be sent which is what Moby Dam expects.

GW
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi,

@all programmers whose engine supports DXP mode only: currently the GUI will launch your executable locally so can pickup stdout. If you write your PV to stdout also in 'Hub mode' using info=, the GUI will pick that up and show the PV in the GUI, score-history will be shown and the evaluation-bar will be updated!

Regards,
GW
gwiesenekker
Posts: 61
Joined: Sun Feb 20, 2011 21:04
Real name: Gijsbert Wiesenekker

Re: (Hub engine) GUI for International Draughts

Post by gwiesenekker »

Hi,

Version 1.7 has been released. It fixes a lot of (small) bugs and stability issues also on Windows (DXP message processing, engine proces management etc.). This version completed a 1 minute per engine round-robin tournament between six engines (2x Ares in DXP server mode, GWD in hub mode, GWD in DXP client mode, GWD in DXP server mode and 1x Moby Dam in hub mode) on Windows without errors:
2026-06-03 07_23_38-Screenshots - File Explorer.png
The screenshot shows the incremental refinement: 'we' added the reason, and then changed the generic 'DXP Game End' to 'DXP white/black wins'. Stopping, saving and resuming a tournament also worked. Swiss tournament pairing is also supported, including engines perhaps withdrawing during the tournament. You can manually set the result of a game which is very handy when testing tournament functionality. Suppose an engine errors out for some reason always save the engine log files first (see below). You can then put the result to unknown and resume the round to retry the game, but you can then also declare the game a loss for the engine that errored out.

Here are the quick instructions:

I would remove any existing engines.json and *.params.json files from the engine directories. There have been many small changes that could conflict.
Before you start a tournament you have to register each engine as a hub engine (preferred because of the PV that is being sent causing the score history and the evaluation bar to be updated) or DXP engine by right-clicking in the engine log memo below the board, choose 'Open engine..' and locate the executable. You have to specify Hub or DXP mode, a hub ID for the engine (that will be overwritten when the hub engine sends its hub-id) or the DXP ID. The DXP ID is currently fixed and is not yet updated by the name the DXP engine sends.

When your register an engine for the first time it often errors out (or hangs), perhaps it needs a command-line argument such as 'hub' that you forgot or something else is wrong. GWD in hub mode for example will not be able to find the directory with the EGTBs. For hub engines you can often fix that by right-clicking on the engine memo, choose 'Edit parameters...' and change them acoordingly. The parameters include a set of gui-* parameters managed by the GUI. After saving the parameters the engine will (try to) relaunch. Repeat this process until the engine is ready to play a game. This would not work for GWD in DXP mode as DXP mode does not support parameters: GWD will error out because the EGTB dir parameter in gwd.json and/or overrides.json is wrong. This can only be fixed by editing the gwd.json and/or overrides.json file outside of the GUI. Once you have done that you can try to open GWD in DXP mode again. It is possible to edit a .ini file that an engine uses for configuration when you register the engine, you can use the parameters {ip} and {port} in the .ini file. When the .ini file is written these parameters will be expanded into the configured DXP server IP and port. Every registered DXP engine must use a different port either in DXP listener or client mode. If an engine only supports DXP listener mode you must configure the GUI as a DXP client, if an engine supports DXP client mode you must configure the GUI as a DXP listener. There is a specific engine parameter for DXP engines: if the DXP engine expects the position after the last non-reversible move (like Moby Dam) you have to set gui-send-initial-position to false.

Once the engine seems to be running try to play a game against it using Play Game. The engine will be shown in the drop-down menu once it is fully loaded and ready to play so you might have to wait a bit if it does not show up yet. If playing a game works you can register the next engine.
Once you have two engines registered you can try to play a game between these two engines. If that works you can try to play a round-robin tournament between these two engines.

GWD supports hub mode, dxp client and dxp server mode. If you want to test with these three flavours you just make two additional copies of the GWD directory and register each as another engine. You can launch GWD in client mode by using the command-line parameters --dxp_server_ip={ip} --dxp_port={port} dxp_client and in DXP server mode by using the command-line arguments --dxp_server_ip={ip} --dxp_port={port} dxp_server.

If you get an error (engine stops, game does not start) please save the engine logs by right-clicking in the engine memo, saving the logs and email them to me. Codex will normally quickly find out what the issue was.

Because of the many small bugs on Windows (mainly around GUI and engine status synchronization) bug fixes often led to multiple patches 'all over the place'. Often the patches just worked but if not, you would get another set of multiple patches to fix the patch. Because of this I decided to have Codex refactor the code incrementally into smaller units. I don't think I had a single bug during the refactor, but you start to burn credits very quickly. Looking back you could have mentioned that in the beginning as in: 'New functionality should not be added to the main form but in separate units and encapsulated in classes if possible. Warn me if in case of code duplication as that is a strong indication we should introduce a new unit/class'.

Perhaps I will do this exercise from scratch using Codex or Claude with these guidelines in place from the beginning.

GW
Post Reply