Giter VIP home page Giter VIP logo

knight-tour-neural-network's Introduction

knight-tour-neural-network

This is a python implementation of knight tour problem using neural networks. The algorithm is much slower than common algorithms for solving knight's tour though im my opinion it has an interesting implmentation.

several snapshots of the algorithm has been added.

for more information about the algorithm visit https://dmitrybrant.com/knights-tour.

for the warnsdroff rule solution of knight's tour please visit https://github.com/NiloofarShahbaz/knight-tour-warnsdroff.

Usage

  • With GUI

    • install the requirements in the requirements.txt file.
    • you can change the board size in line 22 of main.py file.
    • run main.py.
  • Without GUI

    • install numpy.
    • uncomment the 2 last lines in knight_tour.py(and you can change the board size).
    • run knight_tour.py.

Output

As Dmitry Brant mentions in his blog.

The set of degree-2 subgraphs naturally includes Hamiltonian circuits (re-entrant Knight’s Tours). However, there are many other solutions that would satisfy the network that are not knight’s tours. For example, the network could discover two or more small independent curcuits within the knight’s graph.

In this implementation the all vertices have degree=2 output indicates that a solution has been found but it may not be a knight's tour. In that case it should reinitialize all states and outputs to find another solution.

knight-tour-neural-network's People

Contributors

niloofarshahbaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.