Skip to content

jackzbazuka/a-star-visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

a-star-visualization

Visualisation of A-star pathfinding algorithm

A-star is an algorithm to traverse graph and search a path between two nodes with minimum cost.

Processing is a library for visual arts, built for learning to code visually.

This is a processing sketch made in java edition. So in order to run it you have to download processing from here.

I've maintained a separate file for individual cells of the grid i.e. Cell.pde

Configurations

These are the parameters you can change in the sketch to observe different grid sizes and difficulty levels.

  • Grid size: change the float columns variable.

  • Difficulty: change the number in last conditional in constructor of Cell object.

  • Start point: on line 65 of Astar_pathfinding.pde

  • End point: on line 66 of Astar_pathfinding.pde

Note: The start and end points should remain within the grid, else the program will crash

Anomalies

Since the generation of walls depends on a random function, the risk of start and end block being completely unreachable is directly proportional to the probability of a cell being wall which is managed by the difficulty parameter.

Releases

No releases published

Packages

No packages published