Restructuring of the Shortest Path AI Player.

Now the rating of the nodes can also be passed as a template parameter.