Git Product home page Git Product logo

suguru-solver's Introduction

Suguru solver

Solver

This is a small no-dependency suguru-solver that solves a m x n suguru puzzle using a recursive backtracking algorithm.
An arbitrary board of size n x m can be fed to the algorithm using two 2-dimensional lists, representing the board and the grouping. See sample_board.py for an example. The game can be played at puzzlemadness. The site also has an archive of hundreds of suguru puzzles which can be exported to this solver.

The game

Surugu is a puzzle game much like sudoku. The game is played on a grid split up in to irregular shaped regions. The number of cells in each region will vary from one cell, up to six cells for the bigger puzzles.

The aim of Suguru is to fill each n-sized region with the numbers 1-n. For example, if a region has 3 cells, you need to insert the numbers 1, 2 and 3 in to those cells. If a region has 4 cells, you need to insert the numbers 1, 2, 3, and 4 in to those cells.

Each number can't be next to the same number in an adjacent cell, this includes horizontally, vertically, and diagonally.

Animation

Animation of the algorithm solving a 6 x 6 suguru puzzle, the animation is created with matplotlib.
Areas of different colors represent regions that must include unique numbers as described above.

suguru-kopi

suguru-solver's People

Contributors

sebastianbitsch avatar

Watchers

 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.