Having played around with turn-based games using Minimax and Alpha-Beta Pruining, how would one handle games where the same player can have multiple consecutive moves if some condition is met?

有帮助吗?

解决方案

If player A is invoking minimax then:

On Player A's first turn of a run: maximise

On Player A's second turn of a run: maximise again.

This relies of objective evaluations of the board being based from the perspective of A. So regardless of whose turn it is on a state, objective(state) is with reference to A's gain from that state.

You will need a way to determine given a sate X, was there a turn made in the parent state such that the current turn for player Z is the second in a row. However you could also simply evaluate whose turn it is, and if it's A's then perform maximisation as normal.

其他提示

Isn't it most natural to consider a sequence of moves by one player as one action in the game tree?

Consider a game like Chinese Checkers. You would not consider each jump as a full move. You will consider a full move as the sequence of jumps for one pearl from it's start position to it's end position.

You mean like checkers?

Minimax tree should have all the possible moves. If some condition is met, than i has to be also added like other possibilities. And all intermediate states have to be ignored

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top