Ludii Forum
AI played to lose on the move folloing a swap - 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: AI played to lose on the move folloing a swap (/showthread.php?tid=1612)



AI played to lose on the move folloing a swap - dale walton - 07-13-2023

The Interface showed them both on the same line as if they were one turn, and the AI seemed to be optimising the following move(s) of the that turn for the player that started the turn (made the swap) instead of for the player that made the decisions for the first move, causing the AI to make a move to lose the game.

-- Try running the ai from the trial position.

This is using a new double-turn version of my game skirt that makes use of the (swap Players 1 2) ludeme - also attached.

Turn 1. 4+Disc1, 11+Disc1, 5+Disc2
Turn 2. Swap P1 P2, 5-3

The Ai says "Alpha-Beta (player 1) found a proven win at depth 1." even though it is a loss that occurs for player one. (player 2 swapped and player one moves as guided by the AI)
If I manually make a different move, the AI works normally. so it is only happening on the decision directly following the swap.

I also tried putting in a Pass move and set NextPlayer pair (and/or moveAgain) for the turn following a swap, but regardless of whether I switched player order directly after the swap or after the pass, the pass move was ignored by the AI in terms of this issue: the move following the pass was still evaluated for the benefit of the pie offerer.
Same issue for trying to work around by usingĀ  (move Pass (then (swap Player 1 2)))
--------------------------
The obvious problem this raises is that the AI may consistently misevaluate whether to accept a pie, 1) I might choose a pie leading to an immediate loss. or 2) might reject the pie because it compares longer term outcomes to an outcome based of the worst (instead of best) initial response to the pie.