0

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.

Community
  • 1
  • 1
Tony
  • 5,972
  • 2
  • 39
  • 58
  • There's no "should". Different strategies **will** yield different results. The right strategy depends on the data and how much variance it contains "a priori" -- how variable it "could" be. – nomen Apr 03 '14 at 14:06
  • It makes some sense to assume that opponent is less capable than you. Otherwise why play, and not just throw the match... – Dialecticus Apr 03 '14 at 14:09
  • 2
    Normally the score is the same regardless of the perspective (human player vs AI player) except that the sign is opposite. This allows for directly comparing scores that originate at different search depths. – 500 - Internal Server Error Apr 03 '14 at 14:39

0 Answers0