Ludii Forum
Ludii AI from program - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Ludii Features / Services (https://ludii.games/forums/forumdisplay.php?fid=11)
+--- Thread: Ludii AI from program (/showthread.php?tid=686)



Ludii AI from program - Quentin Cohen-Solal - 08-21-2021

Hello,

For the new Olympiad, several members do not wish to use Ludii. At least for some, it is because they want the game to be automated when they do not have a Ludii player. However, it requires some java skills and it takes time.

It might be easier to automate the games with Ludii if there was the next option. In the choice of an AI, the following option should be added: "From program", which would ask for the absolute file path of the program with the possible parameters for its execution (in other words, the command line to execute it). Then, Ludii would uses this program by communicating with it with text messages.

Below, I details the idea of the communication protocol. It would work like a classic AI Ludii player, i.e. with three events: initAI, closeAI, and selectAction.

At the initAI event, the program is executed and the following message is sent to it:
game_name: <value>
player_number: <value> 
board_size: <value> # if game option has been changed
swap_rule: <value> # if game option has been changed
move_format? # Ludii then waits for the response of the move format.

At the selectAction event, the following message is sent:
moves: <list of actions since the start of the game>
move? #Ludii then waits for the response of the action that the program wants to play. It would suffice to use the code of the "Select Move from String" function.

At the closeAI event, the following message is sent:
close.

I suspect that this will be too fair for these Olympiad. However, I have made a similar program for my Ludii Player (but simpler), if I can help you to implement this faster, ask me.


RE: Ludii AI from program - DennisSoemers - 08-23-2021

If you already have something that could help with that, we'd be happy to take a look at any Pull Requests you can send to our github repo for this. But for this year's Olympiad it seems to risky to change anything at this point.