artificial-intelligence - Alpha beta剪枝评价函数设计

标签 artificial-intelligence heuristics minimax 2d-games alpha-beta-pruning

我正在设计一款国际象棋游戏,其背后的人工智能通过 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/

相关文章:

algorithm - DPLL算法定义

R:sample.int() 中的错误:NMOF 包

algorithm - Minimax:残局中分数相等怎么办?

java - A*算法的问题

javascript - 未捕获( promise )TypeError : t is not a function

machine-learning - fizyr 使用 Retinanet 进行汽车损坏检测的过度拟合(回归和分类)

java - 8 使用 A* 解决难题 : a child node repeating its ancestor's state

heuristics - n 谜题的直线距离启发式

JAVA Tic-Tac-Toe Minimax算法不断抛出异常

python - Minimax 算法只返回特定的一组值