我正在设计一款国际象棋游戏,其背后的人工智能通过 alpha-beta 剪枝实现了搜索树。我在设计游戏的评估函数时遇到了困难。
如何为任何类型的游戏设计评估函数?
最佳答案
构建评估函数的一种流行策略是作为被认为影响职位值(value)的各种因素的加权和。例如,国际象棋的评估函数可能采用以下形式
c1 * material + c2 * mobility + c3 * king safety + c4 * center control + ...
比如
f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + (P-P') - 0.5(D-D'+S-S'+I-I') + 0.1(M-M') + ...
其中:
K, Q, R, B, N, P are the number of white kings, queens, rooks, bishops, knights and pawns on the board.
D, S, I are doubled, backward and isolated white pawns.
M represents white mobility (measured, say, as the number of legal moves available to White).
关于artificial-intelligence - Alpha beta剪枝评价函数设计,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13652718/