08-16-2021, 06:48 PM
I think I understood why you couldn't reproduce the problem. If my program receives a call from initIA when there has not previously been a corresponding call from closeIA, it calls closeIA. However, this does not explain everything, as there is always an initIA that is called during the game, for no apparent reason (after the first move has been made).
I made a reproducible example (use the ludii player in Attachment).
Load Game: Gomoku
Player 1 From jar [choose "ZEmptyPlayer"]
Player 2 Biased MCTS (Uniform Playouts))
Close and relaunch the Ludii application.
The log file contains "" "
nullZEmptyPlayer
"" "
Press "Player / Pause".
The log file contains "" "
supportsGame
initAI
selectAction
supportsGame
initAI
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
"" "
Press "Back to Start".
The log file contains "" "
closeAI
initAI
closeAI
initAI
"" "
Press "Player / Pause".
The log file contains "" "
supportsGame
initAI
selectAction
supportsGame
initAI
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
"" "
We can see here that there is an initIA during the game without any interaction with the ludii interface (with or without pressing "Back to Start"). I do not understand why I did not have a problem without the "Back to Start" with my Ludii Player.
I made a reproducible example (use the ludii player in Attachment).
Load Game: Gomoku
Player 1 From jar [choose "ZEmptyPlayer"]
Player 2 Biased MCTS (Uniform Playouts))
Close and relaunch the Ludii application.
The log file contains "" "
nullZEmptyPlayer
"" "
Press "Player / Pause".
The log file contains "" "
supportsGame
initAI
selectAction
supportsGame
initAI
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
"" "
Press "Back to Start".
The log file contains "" "
closeAI
initAI
closeAI
initAI
"" "
Press "Player / Pause".
The log file contains "" "
supportsGame
initAI
selectAction
supportsGame
initAI
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
supportsGame
supportsGame
selectAction
"" "
We can see here that there is an initIA during the game without any interaction with the ludii interface (with or without pressing "Back to Start"). I do not understand why I did not have a problem without the "Back to Start" with my Ludii Player.