Skip to content

EnesBaserr/Knight-s-Tour-Las-Vegas-Algorithm

Repository files navigation

Knight's Tour Problem Solver

This program solves the Knight's Tour problem using a probabilistic algorithm.

Contributors

Yasin ATLI
Enes BAŞER

Requirements

  • Python 3.x

How to Run

You can run the program using the command line. Navigate to the directory containing the 2020400141.py file, then run one of the following commands:

Command

  • python 2020400141.py partX
  • partX : part1 or part2
  • part2 use backtracing logic to handle more success for given case.
  • part1 focuses on more randomness so it's normal to see lower probabilites compared to part2

Example

  • python 2020400141.py part1

Suggestions

  • One can make changes for size of the input instead of n = 8.
  • Also can configure p and k values.