Peking Express

A small algorithm based application written in Java based on the reality show Peking Express.

Given:

  • Graph map with locations and connection
  • Destination for all players
  • Different start locations for different players
  • Each move has an associated cost with it
  • Some critical locations can only accommodate one player at a time

For this purpose a modified version of Dijkstra’s algorithm was created.

Step by step examples

The following pictures show some examples of graphs along with the execution output of the algorithm:

Starting at vertex 0, competitors blocking vertex 5:

Advanced example

Output: [8, 30, 16, 24, 34, 9, 88]

Note: The moves from other players occupying critical positions on specific turns is not shown here.