質問

MINIMAXアルゴリズムについての質問があります。

次のゲームツリーを持っているとしましょう、そして私はそれにランダムなヒューリスティックな値をいくつか追加しました。

ENTER IMENTDESCRUシストの入力

MiniMAXアルゴリズムを理解したときに、それは緑色のパスを選択します。しかし、これは状況で選択するのに最適なものではないかもしれません。トップノードの右の子は、それが得ることができる最も高い値を持っているので、それは最善の動きではありません...

他のプレイヤーが他の人の動きをするならば、私の勝利のチャンスははるかに少ないです...

申し訳ありませんが、この質問に何を意味するのか表現するのに苦労しています。しかし、私はここで何が間違っているのですか?

役に立ちましたか?

解決

The usual way to solve this is to proceed backwards from the lower layers of the tree. Let's check the lowermost four leaves first (the 10-20-15-20 part). Player 2 gets to choose from these if the game ever gets there, so P2 will choose the smaller ones, i.e. 10 and 15. We can then prune the 10-20-15-20 branches of the tree and replace them with 10 (for the leftmost two leaves) and 15 (for the rightmost two). Similarly, we can prune the -100 - 50 pair at the middle and replace them with -100 (not 50 as you did, because at this level it is player 2's turn and he will choose the smaller outcome), the -200 - -100 pair with -200 and so on. So, for me, it seems to be the case that you are taking the maximum at each branching point instead of alternating between the maximum and the minimum.

他のヒント

You should alternate between taking the minimum and maximum. If you want to take 50, which is the maximum of 30 and 50, then you should have chosen -100 one level lower on the right side instead, etc.. That's why the algorithm is called minimax.

the algorithm assumes both you and the 2nd player wants to win, and will always choose the best move. thus, in the question's tree - as I said in the comment, the last move (2nd player makes) is left and not right. this results in making the whole right subtree - unworthy for the first player, and the minmax algorithm will choose the following path (and not as described in the question): left->left->right->left

this is true the algorithm "gives you less chance to win" this is because of the fact that there is a 2nd player, who wants to win as well!

have a look at his example.
in here, the x player wants to avoid defeat so he persues the '0' in the first step. note that if (in the example) he would take first left, the 2nd player then takes left again and wins! the algorithm assures best possibility - asuuming the 2nd player acts the same as well (and assuming it knows the whole game tree)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top