Skip to content

Simulation of a knight in a standard chess game and finding the shortest path possible.

Notifications You must be signed in to change notification settings

elishamutang/knight-travails

Repository files navigation

Knight Travails!

What is it?

  • This project applies the concept of Breadth-First-Search (BFS) algorithm to find the shortest path from a starting point to an end point.

  • In this project, I modelled the concept through a 'knight' in the traditional game of Chess. For a knight, it can face any direction and can move in the following direction:

    1. Two steps forward/backward and one step to the side OR
    2. One step forward/backward and two steps to the side.
  • An example of all the possible moves you can make may look like this:

    all moves

Give it a test drive!

quick-play

  • I've created a simple GUI that will allow you (the user) to set a start and end point and see how the knight will 'move' across the chessboard with respect to the above.
  • Simply visit the live preview here.

Credits

  • Geeks for Geeks
  • The Odin Project