Skip to content

Graphic animation of BFS algorithm for finding shortest path in action. (using WinBGI graphics library in C++ language)

License

Notifications You must be signed in to change notification settings

jatin-47/BFS-Visual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Breadth First Search-Visual 📺

Graphic animation for showing Breadth First Search (BFS) algorithm for finding shortest path from a single source to a single target in action using WinBGIm library in C language for Microsoft Windows users.

Download NOW!

Features: ✨

BFS_visual.exe is the game. User provide input in Grids.txt following the instructions given below. Now, when we run BFS_visual.exe, we see an animation of how exactly the BFS algorithm works and finds the shortest path.

For those who don't know what this is, you can read this article or if you are lazy, watch this video.

Compatibilty:

The BFS_visual.exe is the executable file and can be run in Microsoft Windows only.
If you are a Linux (Ubuntu) user, compile the BFS_visual.cpp source file in your system (after downloading the necesassary library files).

For more info check the SourceCode branch of this repository.

Instructions: 🎮

  1. Only BFS_visual.exe and Grids.txt are of use to run the program and these must be in same folder.
  2. Open Grids.txt and follow the below template.
  3. 0 = blocked, 1 = unblocked, 8 = source , 9 = target
  4. After one grid animation is completed press Enter to start the next animation.
<rows> <cols> <sideLength> 
<grid1>

<grid2>

<grid3>
.
.
.
.

For example:

5 10 60
1811111111
1101111111
1110100100
1111109111
1111101111

1111111111
1101181111
1110100100
1111119111
1111101111

Extra Features: 👨‍💻

  1. If you want that each level of the graph should have different color then uncomment the code at line 234.
  2. If you want to adjust the size of the screen then check initwindow() function at line 328.

Screenshots: 📷

SS1
SS2
SS3

Windows 10 icon by Icons8

About

Graphic animation of BFS algorithm for finding shortest path in action. (using WinBGI graphics library in C++ language)

Topics

Resources

License

Stars

Watchers

Forks

Languages