Skip to content

heyiamuday/Knights-Travails-JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ™ž Knight's Path Finder

Find the shortest path for a Knight on an 8x8 chessboard using an efficient Breadth-First Search (BFS) algorithm. ๐Ÿงฉ This project provides an interactive interface to visualize the knight's moves and calculate the optimal path between two points.


๐ŸŽฎ Live Demo

๐Ÿ‘‰ Knight's Path Finder Live Demo


Resources

Which method is good for this problem DFS or BFS?

BFS (Breadth-First Search) because BFS explores all possible nodes at the present depth level before moving on to nodes at the next depth level. Since we want the minimum number of moves, BFS is suitable here. DFS (Depth-First Search) might get stuck exploring longer paths before finding a shorter one, so BFS is better.

https://www.youtube.com/watch?v=cWNEl4HE2OE

๐Ÿš€ Features

  • ๐Ÿ”„ Real-time visualization of pathfinding process
  • ๐Ÿ“ Shortest path calculation using BFS
  • ๐Ÿ“‹ Dynamic input controls for start and end positions
  • ๐Ÿ“œ Clear, formatted results displayed step by step

๐Ÿ“‹ How to Use

  1. Enter the Start and End positions on the chessboard.
    • X and Y values must be between 0 and 7.
  2. Click the Find Path button to calculate the shortest path.
  3. Check the detailed move log displayed in the results section.

Releases

No releases published

Packages

No packages published