0
我有一个连接四类型游戏的评估函数。我不明白什么时候评估函数会给出负值。我的评价函数主要用于分配每次移动伪码的值可能会更容易显示minimax算法的评估函数何时应返回负值?
if player has 4 in a row
return 5000;
if player has 3 in a row
return 4000;
if opponent has 3 in a row or 3 in a column
return 4000;
if opponent a disjoint 3 in a row or column //ie xx x
return 4000;
if opponent has in row with spaces on both sides// ie ' 'OO' '
return 100;
if opponent has two in arrow w/o spaces on both sides // ie XOO
return 95;
这是基本的想法,但是由于没有负值,最小函数总是返回0;
我在这里错过了什么?