Ludii Forum
Experimental game with an AI bug - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: AI Problems (https://ludii.games/forums/forumdisplay.php?fid=7)
+--- Thread: Experimental game with an AI bug (/showthread.php?tid=941)



Experimental game with an AI bug - dale walton - 04-26-2022

The AI is disproving its own proven wins for this experimental game, so the AI is missing something...

Edit: Ok I found an approach to do this by selecting from and to in a single turn, instead of using moveAgain, and the AI seems to be able to handle it properly...  I will upload a revised version when I finish debugging.


RE: Experimental game with an AI bug - dale walton - 04-27-2022

Here is the current version


RE: Experimental game with an AI bug - dale walton - 04-27-2022

It would be nice if there were an option for defining discontinuous large pieces, for locating an off grid reference point, and for splitting largepieces into Constellations of composite pieces upon placement....


RE: Experimental game with an AI bug - dale walton - 04-29-2022

Fixed a bug: Leaps don't work if they cross spaces that are not part of the board (eg holes, or edge gaps)  That is not what I understand by "Leap" but I understand why it is implemented that way, and in this case I can work around it  because I can ensure the path of the leap stays on the board by changing the walk sequence.

Find the revised file attached.


RE: Experimental game with an AI bug - DennisSoemers - 04-29-2022

I've looked into the AI issue with the Cordon3.lud version of your game, where Alpha-Beta was basically incorrectly claiming to have proven various wins or losses (and probably playing poorly based on those incorrect proofs).

This seems to be an issue with its Transposition Table. In that version of your game, the last-to position (i.e., the "to" position of the previous move made) is a very important variable of the game state. The entire point of the Select actions used is basically only to store an important value in that variable, and that then plays a major role in what moves are legal afterwards. But, we currently do not include this variable in our Zobrist hashes. This means that the algorithm incorrectly thinks that lots of different states are identical, due to them having the same Zobrist hash keys, and it leads to the incorrect proofs of wins/losses.

The correct solution would be for us to include the last-to (and also last-from) values in our Zobrist hashes. I'm just... not sure yet if we actually want to do that. Clearly it is the correct thing to do in theory, and necessary for some games. However, for the vast majority of games, this would not be necessary. In that vast majority of games, this would in fact cause us to stop recognising a whole bunch of transpositions, we start thinking they are different just because they have different previous moves leading up to them, which in the vast majority of games does not matter. So, the question that arises is... do we want our AlphaBeta to be stronger in most games, but plain incorrect in a few, or do we want it to be correct in theory, but for many games weaker in practice? Or can we somehow automatically detect whether or not these variables are relevant to a particular game's hash codes and automatically adapt whether or not we include them accordingly?

I do not have the answers to those questions yet, we'll have to think about it. So I can't directly promise a fix yet. Thanks for pointing it out anyway!


RE: Experimental game with an AI bug - dale walton - 05-09-2022

Thanks for that explanation.  Perhaps this information can be added to the documentation once you have decided, and a work-around, such as setting a variable to the last To value, if that would work.

It is not urgent right now, as the game is still experimental, and I placed it here mainly as a way to share it with a small group of testers.

Also please document that a walk cannot leave the playing area and return.


RE: Experimental game with an AI bug - Eric Piette - 05-30-2022

Hi,

I have added the walk part to our Ludii Game Logic Guide (which is going to be updated with the next release). For the other part, I let this to Dennis.

Eric