08-14-2023, 09:26 AM
In order to cooperatively test for cycles in a 2 player game, I used:
(rules
(start (set Team 1 {P1 P2}))
....
(end
{
(if
(or
(is Connected at:(last To) Orthogonal Mover)
(is Connected at:(last From) Orthogonal Next)
)
(result Team1 Loss)
)
(if (is Repeat Situational) (result Team1 Win))
}
)
However, the game did not end when the connection was detected even thought it was highlighted on the connecting turn (-- and the AI did not appear to be trying to avoid connecting.)
Instead it continued until no moves were left and declared no winners or losers.
Since you do puzzle solving, in Ludii why doesn't this way of creating a cooperative game work?
(rules
(start (set Team 1 {P1 P2}))
....
(end
{
(if
(or
(is Connected at:(last To) Orthogonal Mover)
(is Connected at:(last From) Orthogonal Next)
)
(result Team1 Loss)
)
(if (is Repeat Situational) (result Team1 Win))
}
)
However, the game did not end when the connection was detected even thought it was highlighted on the connecting turn (-- and the AI did not appear to be trying to avoid connecting.)
Instead it continued until no moves were left and declared no winners or losers.
Since you do puzzle solving, in Ludii why doesn't this way of creating a cooperative game work?