Ludii Forum
How can I get the history moves of the game - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: General (https://ludii.games/forums/forumdisplay.php?fid=1)
+--- Forum: Discussion (https://ludii.games/forums/forumdisplay.php?fid=4)
+--- Thread: How can I get the history moves of the game (/showthread.php?tid=1013)

Pages: 1 2


RE: How can I get the history moves of the game - FirstAI - 06-23-2022

thanks!my mistake. It works now!

There is another problem. If all resources are released every time when closeAI() is called, it must be reloaded when initAI() is called. But the initialization of chess engine takes a long time. Whether the resetAI() function can be provided to enable the engine to perform necessary reset operations without resources released.
In the case of existing interfaces, I try to implement only resetAI() operations in closeAI(), but I find that sometimes resources are not released.
My code is:
@Override
public void closeAI()
{
if(engineInited)
{
waitEngineReady(); // here if we release all the resources, we must load again in initAI()
}
}


RE: How can I get the history moves of the game - DennisSoemers - 06-23-2022

I don't think I understand, what exactly is the question? :)


RE: How can I get the history moves of the game - FirstAI - 06-23-2022

Ludii's current implementation combines AI close and AI reset(such as starting a newgame) into closeAI(). But we want to separate them so that we can keep the loaded resources until the AI exit completely.


RE: How can I get the history moves of the game - DennisSoemers - 06-23-2022

Currently we have no such distinction; we just have initAI and closeAI, there is no reset. In programmatic experiments outside of the GUI, if you write any, you have full control over when you call any of them.

In the GUI, we indeed have to call both of them relatively often.

I suppose you're looking for something like closeAI(), but just called less frequently? When exactly should it be called though? Probably still needs to be called when a different AI gets selected in the dropdown. Also definitely when the app is closed. Actually, probably in most cases, maybe except the case where the current trial is restarted?