MiniMax Algorithm

撰写于 2018-08-14 修改于 2018-08-14 分类 Algorithm 标签 Algorithm

The Key idea for MiniMax Algorithm is the best action of a player against the other player’s action.

here is the pesuode code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
def MiniMax(state):
vs = []
for next_state in next_states(state):
vs.append(Max(next_state))
return max(vs)
def Max(state):
if terminal(state):
return utility(state)
vs = []
for next_state in next_states(state):
vs.append(Min(next_state))
return max(vs)
def Min(state):
if terminal(state):
return utility(state)
vs = []
for next_state in next_states(state):
vs.append(Max(next_state))
return min(vs)

Reference

目录

Site by GoingMyWay using Hexo & Random
备案号: 粤ICP备16087705号-1

I am a ML and RL research student

Hide