Skip to content

Commit b1da4eb

Browse files
author
muj-programmer
committed
updated README
added setup and usage instructions
1 parent 4f4544a commit b1da4eb

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,44 @@
44
<img src="./.github/visualizer.gif" alt="visualizer"/>
55
<p align="center"><strong>Fig.1 Algorithm Visualization</strong></p>
66
</div>
7+
8+
## Build
9+
10+
```
11+
$ pip install -r requirements.txt
12+
```
13+
14+
## Intro
15+
16+
A **knight's tour** is a sequence of moves of a knight on a chessboard such that the knight visits every square only 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.
17+
18+
We can solve the **knight's tour** problem using warnsdorff's algorithm, which states that:-
19+
20+
- We can start from any initial position of the knight on the board.
21+
- We can always move to an adjacent, unvisited square with minimal degree(minimum number of unvisited adjacent).
22+
23+
## Sample Run
24+
25+
`Fig.1` demonstrates a sample run of the visualizer when knight is placed at `0, 0`, you can find other samples [here]().
26+
27+
| Symbol | Meaning |
28+
|:----------------------------:|-------------------|
29+
| <font color="black">0</font> | Unvisited Cell |
30+
| <font color="green">1</font> | Visited Cell |
31+
| <font color="red">2</font> | Knight's Position |
32+
33+
## Fun Fact
34+
35+
On an *8 × 8 board*, there are exactly *26,534,728,821,064 directed closed tours* (i.e. two tours along the same path that travel in opposite directions are counted separately, as are rotations and reflections). The number of *undirected closed tours is half this number*, since every tour can be traced in reverse!
36+
37+
## Facing a Issue
38+
39+
If you are in this situation _first and foremost_ Don't panic :cry: I'm here to help you get over it. Simply click [this](https://github.com/muj-programmer/warnsdorff-algorithm-visualizer/issues) and properly state your issue (be as verbose as you can be), After that sit tight and watch :movie_camera: the movie you have been postponing for so long while I :construction_worker: fix the issue.
40+
41+
## Want to Contribute
42+
43+
I will be glad :smiley: to work with you on a new idea or fixing a invisible bug :bug: or if you have already done the work :hammer: just create a pull request and I will merge it asap.
44+
45+
Well that's all for now but before you close this browser tab hit the star :star: button (it motivates me to make new stuff).
46+
47+
Have a great day :sunglasses:.

0 commit comments

Comments
 (0)