07-27-2023, 06:43 AM
Might have to do with who is "Prev" if the last move was a pass?
You could try (addScore (player (- 3 (mover))) 1)
The system supplied passes may skip all execution given that no move is possible, so you may need to allow an explicit pass move. Since this is meant as a forced situation, use (priority) instead of (or) to offer it
Possibly like this: - (move Pass (then ....)) might also work.
(priority
(... the normal move ... ))
(do
(addscore Next 1)
next:(move Pass)
))
Since passing becomes a move in this scenario the end condition cannot be (no Moves ...)
You would need to use (all Passed)
There may be other ways to accomplish this.
However, if you haven't set score as a weighted heuristic I don't think the AI will pay attention anyway, as the score is not part of the winning condition.
If you do set score as a heuristic in the AI definition, you may need to have some other heuristic to balance it, for cases where a player gets blocked and later unblocked for example.
You could try (addScore (player (- 3 (mover))) 1)
The system supplied passes may skip all execution given that no move is possible, so you may need to allow an explicit pass move. Since this is meant as a forced situation, use (priority) instead of (or) to offer it
Possibly like this: - (move Pass (then ....)) might also work.
(priority
(... the normal move ... ))
(do
(addscore Next 1)
next:(move Pass)
))
Since passing becomes a move in this scenario the end condition cannot be (no Moves ...)
You would need to use (all Passed)
There may be other ways to accomplish this.
However, if you haven't set score as a weighted heuristic I don't think the AI will pay attention anyway, as the score is not part of the winning condition.
If you do set score as a heuristic in the AI definition, you may need to have some other heuristic to balance it, for cases where a player gets blocked and later unblocked for example.