question: public int eval ( INode state ) { SmallPuzzle tp = ( SmallPuzzle ) state ; int diff = Math . abs ( target [ 0 ] - tp . s [ 0 ] ) + Math . abs ( target [ 1 ] - tp . s [ 1 ] ) ; if ( tp . s [ 0 ] > target [ 0 ] ) { diff *= 2 ; } if ( tp . s [ 1 ] > target [ 1 ] ) { diff *= 2 ; } return diff ; }
target:  Evaluate how far from the solution state is. 