Git Product home page Git Product logo

nonogram_solver's Introduction

Nonogram Solver

license last commit open issues code size example count used libraries

This Python project is a puzzle solver for the popular japanese Nonograms. They are also known as Hanjie, Paint by Numbers, Picross, Griddlers and Pic-a-Pix. I recommend reading the corresponding Wikipedia article on Nonograms. It explains very well how to solve them by hand.

This program is superior to other nonogram solvers because it can solve way more nonograms. In perticular those, in which you have to make an assumption and prove or disprove it. No other nonogram solver to my knowledge can solve those.

There are plenty of examples in the example_files folder, hand-solved solutions and their transcriptions. Some of them are marked hard which cannot be solved with traditional methods.

Current stage of development

It can currently solve any nonogram without assumptions. But that is not really useful, because you can solve those by hand. I don't know why but it can't solve nonograms with assumptions for the life of it.

Usage

Commandline

$ git clone https://github.com/jonaheinke/nonogram_solver.git
$ pip install numpy
$ python nonogram_solver.py example_files/example2.csv

File input

You should write the row and column numbers into a CSV file delimited by ",", ";" or "|".

First you write the column numbers.

It is followed by a seperator line which contains at least one character that is not a number, space, tab or allowed delimiter.

Last you write the row numbers.

You can leave unused cells out or empty or use spaces so the number clusters look more like a complete matrix.

If it is not clear by now, look at the examples in the example_files folder.

Call the program with the path to the CSV file described under Commandline Usage.

Used strategies

Permutation method

Disproof method


Copyright (c) 2022 Jona Heinke under MIT License, see LICENSE for more information.

nonogram_solver's People

Contributors

jonaheinke avatar

Stargazers

 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.