Monday 28 July 2014

Scattered Terrain: Diffusion vs Dijkstra

Both diffusion and dijkstra have been tested on larger maps with varying terrain. These maps are 256X256 and each has a different percentage of the map covered with terrain. Terrain costs are represented by a random value between 1 and 10 for dijkstra and 0 and 1 for diffusion. In the images bellow terrain is represented by the red areas. Paths are represented by the blue tiles.

0% Terrain

25% Scattered Terrain

50% Scattered Terrain

75% Scattered Terrain

100% Scattered Terrain

25% Centred Terrain

50% Centred Terrain

75% Centred Terrain

100% Centred Terrain

25% Split Terrain

50% Split Terrain

75% Split Terrain

100% Split Terrain







Looking at the graphs above it is interesting to see that for all the maps diffusion performs the same regardless of how much terrain there is in the map and where the terrain is in the map taking 11ms to diffuse the values and find path.

Looking at Dijkstra however for each of the sets of maps we can see that as the amount of terrain in the map increases so does the time it takes to find a path.

Looking at the line graph above we can also see that the position of the terrain in the maps also effects the time taken by dijkstra to find the path. the more scattered the terrain the longer Dijkstra takes to find a path? although this could be due to the fact that there is less terrain? - more likely this?


No comments:

Post a Comment