Coder Social home page Coder Social logo

attilaszia / nonogram Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 3.0 264 KB

A C++ implementation for solving the nonogram constraint satisfication problem. Among a few naive ones, the dynamic programming algorithm discussed in K. J. Batenburg , W. A. Kosters Solving Nonograms by combining relaxations - is implemented.

Home Page: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.177.76&rep=rep1&type=pdf

Makefile 1.78% C++ 97.59% QMake 0.62%

nonogram's People

Contributors

attilaszia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nonogram's Issues

Program does not check the input file

When I compile the code with make, everything works like a breeze.

When I run the code with ./solver table.cc my system crashes. I expect that the input is not checked. It would be helpful if it would be checked.

Suggestion: add example input file

Related to #1 : it would be helpful if an example input file would be added, so that a user can deduce how the program works without documentation

Extending to multi-colored nonograms

According to Batenburg and Kosters (2009), the algorithm allows for more than two colors (black and white). I want to modify the implementation to allow for multicolored nonograms.

But looking at the code, it seems like this is NOT easy to implement. Correct me if I'm wrong, but the entirety of the implementation assumes only two possible colors, black and white, and thus adding a new color would require a complete refactoring of the entire code base first.

How long do you think it would take to refactor the code to allow for more than two colors? (Ignoring the extra code to load a new file format and the png generation. Those are easy.)

Thanks!

Segmentation fault when using example sherrif_puzzle

Thanks for adding the examples!

Too bad, it gives a segfault:

In the examples folder:

richel@lubuntu:~/GitHubs/nonogram/examples$ ../solver sheriff_puzzle.txt 
Pic-a-Pix solver 0.1
Initializing solver with: sheriff_puzzle.txt
Initializing a table with sheriff_puzzle.txt
Segmentation fault (core dumped)

In the root folder:

richel@lubuntu:~/GitHubs/nonogram$ ./solver examples/sheriff_puzzle.txt 
Pic-a-Pix solver 0.1
Initializing solver with: examples/sheriff_puzzle.txt
Initializing a table with examples/sheriff_puzzle.txt
Segmentation fault (core dumped)

I volunteer to fix it.

To do so, I will add Travis CI to my fork (I have some experience with it) to test if the examples do work. Feel free to remove the Travis status badge, but all you'll need to do to join in on the Good Practices, is register at https://travis-ci.org (it's free and two clicks if you use your GitHub account). Sure, I volunteer to maintain it.

Additionally, I will add a qmake project file called nonogram.pro. Sure, I volunteer to maintain it.

I hope you agree on the extra goodies I'll give you for free. If not, let me know.

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.