项目作者: jatin-47

项目描述 :
Graphic animation of BFS algorithm for finding shortest path in action. (using WinBGI graphics library in C language)
高级语言:
项目地址: git://github.com/jatin-47/BFS-Visual.git
创建时间: 2021-01-16T12:35:20Z
项目社区:https://github.com/jatin-47/BFS-Visual

开源协议:MIT License

下载


Breadth First Search-Visual :tv:

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: :sparkles:

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.

" class="reference-link">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: :video_game:

  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.
  1. <rows> <cols> <sideLength>
  2. <grid1>
  3. <grid2>
  4. <grid3>
  5. .
  6. .
  7. .
  8. .

For example:

  1. 5 10 60
  2. 1811111111
  3. 1101111111
  4. 1110100100
  5. 1111109111
  6. 1111101111
  7. 1111111111
  8. 1101181111
  9. 1110100100
  10. 1111119111
  11. 1111101111


Extra Features: :man_technologist:

  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: :camera:

SS1

SS2

SS3

Windows 10 icon by Icons8