I am doing an AI using Minimax for dots and boxes. After the most of the work, I try some different evaluation function to find the most suitable one. But I get confused with the evaluation function one(below), for it make some stupid moves(like the third edge of a box when there are boxes who have all four edges unmade), and use the same evaluation like function two don't make that errors. And that is contradictory with this answer .
And this is function one for dots and boxes:
//System.out.println("in evaluate" );
if (node.ai.isTurn) {
value = 4*node.ai.score - node.man.score * 2 + 0.5 * s2 - 0.75 * s3 ;
}else {
value = 4*node.ai.score - node.man.score * 2 - 0.5 * s2 + 0.75 * s3 ;
}
//System.out.println(value);
return value;
And function two:
value = 4*node.ai.score - node.man.score * 2 + 0.5 * s2 - 0.75 * s3 ;
So could anyone tell me should the evaluation function be different in max turn and min turns. And any suggestions are appreciated.