Assignment 4.2, Problem 3 - Evaluation function

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

Assignment 4.2, Problem 3 - Evaluation function
There seems to be no definition to which value X_2, X_1, O_2 and O_1 evaluate. Does that mean that we are supposed to write answers unresolved, e.g. for s=[[X, _, ], [, O, ], [, _, _]], Eval(s)=2X_1(s)-3O_1(s)?

Or are we supposed to assume theses cases evaluate to the same values as X_3 (+1) respectively O_3 (-1)?
In this case the evaluation function would not always valuate a terminal winning state higher than another state:
For s=[[X,,O], [,X, X], [_,O,O]] and (obviously) X’s turn, there are three possible successor states:

  • s_1=[[X,X,O], [,X, X], [,O,O]]
  • s_2=[[X,,O], [X,X, X], [,O,O]]
  • s_3=[[X,,O], [X,X, X], [,O,O]]
    Where s_2 is the best state, because it is a terminal state that wins the game for X.

Eval(s_i) is therefor:

  • i=1: 3X_2(s)+X_1(s)-3O_2(s)=3+1-3=+1
  • i=2: X_3(s)=+1
  • i=3: 6X_2(s)=+6 => This state would be chosen, when maximizing (=X is trying to win).

The followup state of s_3 would be a draw (if O is minimizing), resulting in an worse result, than when choosing the winning terminal state s_2.


With the evaluation function, the idea is just to evaluate the nodes at depth 2. The definition of X_2, X_1, etc is in the first paragraph of the problem:

For example, the state [[X, _, ], [, O, ], [, _, _]] has

  • X_2 = 0 (because there are no rows, columns or diagonals with only two Xs)
  • X_1 = 2 (there is one row and one column with exactly one X, and no diagonals, since the diagonal also includes O)
  • O_2 = 0 (because there are no rows, columns or diagonals with two Os)
  • O_1 = 3 (there is one row and one column with exactly one O, as well as one diagonal)
    Does this help?