Nilsson's sequence score for 8-puzzle problem in A* algorithm
See if this explanation can help you:

Current pos:   Goal:
*AC            ABC
HBD            H*D
GFE            GFE


How to calculate the score:

Center

B in the center -&gt; 1


Distances (manhattan distance)

A must move LEFT -&gt; 1
B must move UP   -&gt; 1
sum of distances = 2


Successors (clockwise)

current: ACDEFGH*  (skip B because it is in the center)
goal:    ABCDEFGH

the [tile,tile clockwise to it] pairs  are:
[A,C], [C,D], [D,E], [E,F], [F,G], [G,H], [H,*]
([*,A] is not considered)

the "goal" pairs are:
[A,B], [B,C], [C,D], [D,E], [E,F], [F,G], [G,H], [H,A]


There are 2 pairs that do not match the goal pairs:

[A,C], [H,*]


So the final score is: $distances + 3*(center + 2*successors) = 2 + 3 * (1 + 2*2) = 17$