An open API service indexing awesome lists of open source software.

https://github.com/alirezasaadatmand/knight-tour-problem

Auto solving the famous KNIGHT'S TOUR PROBLEM in chess
https://github.com/alirezasaadatmand/knight-tour-problem

game knight-tour pygame python

Last synced: 2 months ago
JSON representation

Auto solving the famous KNIGHT'S TOUR PROBLEM in chess

Awesome Lists containing this project

README

          

# Knight's tour

This project shows the famous knight's tour in chess .

## What is a knight's tour

A knight's tour is a sequence of moves of a knight on a chessboard such that the knight visits every square exactly once. If the knight ends on a square that is one knight's move from the beginning square (so that it could tour the board again immediately, following the same path), the tour is closed ; otherwise, it is open .

check out https://en.wikipedia.org/wiki/Knight%27s_tour for more information.

### Some variatioins

![Knights-Tour-Animation](https://github.com/user-attachments/assets/c79f1e63-ac35-4415-9405-37bad0972337) ![Knight's_tour_anim_2](https://github.com/user-attachments/assets/81f909aa-1e81-4809-a5c4-245b18c9b8a3)

# This project

visualize the Knight's tour from any square in an chessboard

## dependencies

```
pygame
```

### Installing

After installing python , run the following command in your terminal

```
pip install pygame
```

## Pictures

![Screenshot 2024-05-11 035828](https://github.com/AlirezaSaadatmand/Knight-Problem/assets/157215281/7c0ae124-2ba1-448e-87b9-e8aadbbb8ec6)

it can also be big or small but you have to change the code yourself :)

![Screenshot 2024-05-11 035942](https://github.com/AlirezaSaadatmand/Knight-Problem/assets/157215281/19c1d882-0a4c-4e05-bbe1-f5d1137e7195)