Click here for the Binary Puzzle Solver.

The Binary Puzzle Solver is also available as a web service.

Example request:

http://www.magmeister.be/binarypuzzlesolver/solve.php?puzzle=[["-","-","-","0","-","0","1","-","1","-"],["-","1","-","-","-","-","-","-","0","-"],["-","0","0","-","-","-","-","-","-","0"],["0","-","-","-","-","0","-","0","1","-"],["-","0","1","-","-","-","-","-","-","-"],["-","-","-","-","1","-","-","-","-","-"],["0","-","-","-","-","-","-","-","-","0"],["-","1","-","-","0","-","0","1","-","-"],["1","-","-","-","-","-","0","-","1","-"],["1","-","1","-","-","-","-","1","-","-"]]

Example response:

[["0","1","0","0","1","0","1","0","1","1"],["0","1","1","0","0","1","1","0","0","1"],["1","0","0","1","1","0","0","1","1","0"],["0","1","0","1","0","0","1","0","1","1"],["1","0","1","0","0","1","0","1","0","1"],["1","0","1","0","1","1","0","1","0","0"],["0","1","0","1","1","0","1","0","1","0"],["0","1","0","1","0","1","0","1","0","1"],["1","0","1","0","1","1","0","0","1","0"],["1","0","1","1","0","0","1","1","0","0"]]

The solver is doing very well, but

It would be nice when a printcommand could be build in.

with friendly regards

Wim

If you use the source code in Eclipse or an other IDE,

the output (solving sequence) is printed in the console.

Greets

The output is also printed in the GUI since version 3.1 ๐

It would be nice if we could copy text from the output tab.

However, thanks for this nice and useful app !

Your binary puzzle solver is a very handy tool.It is the only one of it's type I was able to find online which is not some kind of app.However on the following puzzle from http://www.binarypuzzle.com it gave me the wrong answer.

May 9

8x8

Very Hard

-0----10

-----0--

-00---11

------0-

-11-----

----1--1

--1----0

10------

the answer it gave me was

10010110

01101001

10010011

01101100

01100110

10011001

01101010

10010101

which is not correct because columns 1 and 4 are duplicates and columns 2 and 3 are duplicates.However when I enter the following

00----10

-----0--

-00---11

------0-

-11-----

----1--1

--1----0

10------

which is virtually identical to the starting puzzle except I have "guessed"

at one of the blanks and put in a "0" for the value at the corner of row 1 and column 1,then it comes up with the correct solution of

00110110

01101001

10010011

11001100

01100110

10011001

01101010

10010101

I guess there's some small bug in the program.I don't even think that it's really necessary to try to correct it.I just wanted to bring it to your attention.

John Manfredi

I am resubmitting my previous post since I had used dashes as blank fields for the binary puzzle and it did not appear properly.I will now substitute "x".

Your binary puzzle solver is a very handy tool.It is the only one of itโs type I was able to find online which is not some kind of app.However on the following puzzle from http://www.binarypuzzle.com it gave me the wrong answer.

May 9

8ร8

Very Hard

x0xxxx1x

xxxxx0xx

x00xxx11

xxxxxx0x

x11xxxxx

xxxx1xx1

xx1xxxx0

10xxxxxx

the answer it gave me was

10010110

01101001

10010011

01101100

01100110

10011001

01101010

10010101

which is not correct because columns 1 and 4 are duplicates and columns 2 and 3 are duplicates.However when I enter the following

00xxxx1x

xxxxx0xx

x00xxx11

xxxxxx0x

x11xxxxx

xxxx1xx1

xx1xxxx0

10xxxxxx

which is virtually identical to the starting puzzle except I have โguessedโ

at one of the blanks and put in a โ0โณ for the value at the corner of row 1 and column 1,then it comes up with the correct solution of

00110110

01101001

10010011

11001100

01100110

10011001

01101010

10010101

I guess thereโs some small bug in the program.I donโt even think that itโs really necessary to try to correct it.I just wanted to bring it to your attention.

John Manfredi

John,

Thank you for your feedback!

I tried the puzzle myself, and you are right. The puzzle isn't solved properly. I will look this into more detail to understand what is going wrong. I can barely live with the fact that my program would not be able to solve all puzzles ๐ ๐

It seems that I didn't update the web-application to my newer 2.2 version.

The online solver will do fine now. Thanks again for your feedback!

I tried entering that same puzzle again which gives the wrong results on your solver and I'm still getting the wrong results.I don't know why.On the bright side,I've entered more difficult puzzles than this and your solver comes up with the right solution.Oh well .......................................

Here's an additional oddity I forgot to mention in my above reply.I tried opening the solver on two different browsers to see if that made a difference.It did,insofar as the solver on the Firefox browser that I always use came up with the wrong solution which I had mentioned in my original reply which is

10010110

01101001

10010011

01101100

01100110

10011001

01101010

10010101

and when I access your solver using Internet Explorer 8,it comes up with a different solution which is also wrong.That solution is

10100110

01011001

10010011

01101100

01100110

10011001

01101010

10010101

now there is one duplicate pair of columns instead of the two in the original solution.Now columns 4 and 8 are illegal duplicates.Sorry to make a big fuss about this.I just find it interesting.

P.S. I have made another discovery.When I entered

00xxxx1x

xxxxx0xx

x00xxx11

xxxxxx0x

x11xxxxx

xxxx1xx1

xx1xxxx0

10xxxxxx

in your solver using Firefox browser it comes up with the correct solution of

00110110

01101001

10010011

11001100

01100110

10011001

01101010

10010101

which is the correct solution but when I enter the same values in your solver but access it through Internet Explorer 8 I get

00110110

11001001

10010011

01011100

10011001

01100110

00101001

which is wrong because row 4 has triple 1's and rows 5 and 7 are illegal duplicates.So STRANGE things are happening.

Java is browser-independent so the program's execution can not be affected by the browser.

This would mean my program generates different "solutions" for one same puzzle. Indeed, I was able to reconstruct your findings in Eclipse: sometimes my solver gave me the right solution, other times it gave me the wrong solution.

There is definitely a bug in my program. I will clear this out and come with an updated version.

Thank you for your contribution!

There was a bug in the validation of the puzzle in the function "guess and validate". I updated the solver to version 2.3. Please try it and let me know if it works for you.

Greets!

I ran a few puzzles through your updated solver and it appears to be working properly.I commend your for being willing to put in extra time and effort without financial remuneration so that your solver would work properly.You obviously take a lot of pride in your work.Thank you so much.

There are two web sites that I visit for binary puzzles.The first one is:

http://www.binarypuzzle.com/

They have 6x6,8x8,10x10,12x12 and 14x14 puzzles of four levels:easy,medium,hard and very hard.Your updated solver seems to come up with the correct solution for different sized grids and different levels.

The other site is:

http://www.sudoku-puzzles.net/en/logic-puzzles/binary

They offer only 9x9 puzzles of three different levels:easy,medium and hard.I have had mixed results on their puzzles.On the easy and medium puzzles,your solver seems to work.On the hard puzzles,especially the first few,your solver encountered several different problems:on the very first one(and possibly others too)it just froze and wouldn't come up with a solution.

On other ones,it would come up with an erroneous solution where one or more of the starting values I had entered had changed to it's opposite value.It also produced wrong solutions where it violated the duplicate row or column rule.

But,on some of the hard puzzles,it did come up with the correct solution.

I am sorry to bother you again.I just don't know why it encountered these problems.If you have a chance,visit the second site and see if you encounter the same problems.Thank you for your patience.

You are right. The solver has troubles with the hard puzzles.

I will look at this when I have the time ๐

If I may ask, why are you so interested in solving all these puzzles?

It's just something I have become fascinated with lately.I have been a sudoku fan for years.It actually doesn't make much difference if your solver doesn't solve the 9x9 ones correctly since that site shows you the solutions if you wish.The other site doesn't.

Thanks again for all your hard work.

John,

A major update was necessary to overcome all the problems with those 9x9 puzzles. More details can be found in my post at http://www.magmeister.be/?p=227.

Thank you again for your feedback. I hope my solver will cover all puzzles now. Feel free to try the new 3.0 version and let me know your findings ๐

Magmeister,

Thank you for having the patience,willingness and determination to again update and improve your solver.Those 9x9 hard puzzles are wicked compared to the ones on the other site.I can only begin to imagine the effort involved.I hope you experienced a great feeling of satisfaction when you finally succeeded.That is the feeling I would get when I successfully completed writing a program in the past.I used to write programs in real old school computer languages(Cobol,Fortran,Basic and Qbasic come to mind).You have to have a certain kind of dedication to do it.

Your new solver appears to be working perfectly.I hope it will be of use to other Binary puzzle fans besides myself.If you ever visit Las Vegas,Nevada(my home for almost 30 years),I would like you to contact me so that I can take you to dinner as a small token of gratitude for the work you have put into this project.Keep up the good work.

John Manfredi

Hehe, if I'm in Vegas some day I will remind you on this ๐ ๐

I wish you a lot of fun solving puzzles!

I fixed another bug in version 3.1 ๐

I just tested your solver on 18 of the 9x9 hard puzzles and it correctly solved ALL of them.It appears to be working perfectly due to your patience and persistence.Your dinner in Las Vegas is still waiting.I hope that the longer it takes for you to get here,the more of an appetite you will have !!!

This is great :p

Could you describe what you do for each screen shot? Example: find pairs. I think I know this one. Eliminate Set Combinations - Rank 0. (don't have a clue). How do you denote when the program has performed a guess? Thanks.

Please first read http://www.binarypuzzle.com/tips.php

The lexis I use:

Set - a possible combination (row / column) of zeros and ones

Rank - the amount zeros (or ones) still to be determined in a row or column

For example: in a row or column with rank 0, all zeros (or ones) are determined. This means that al other remaining values must be ones (or zeros). In fact a rank 0 is just completing the row or column.

A guess and validate will be printed in the console. Remember that guess and validate will only be used for more difficult puzzles.

I hope this helps you.

perfect

Nice Solver.

Lovely solver, I was stuck on a 8x8 Very Hard level and your program solved it perfectly.

Being interested in where I got stuck, I looked at the output, trying to figure out what my next move would've been, but it said "Solve Level 1, Binary Puzzle Solver" inbetween and it put down a 1 and a 0 which made no sense to me whatsoever. Was it just guessing at this point and see if it was the right solution? Or am I missing some kind of obvious move? When I started playing these puzzles I was told you can always deduct the solution with logic, and wouldn't ever need to guess, was that wrong?

I was surprised as well while I was developing the solver. For some hard puzzles the solution can't always be deducted with logic. View my post:

http://www.magmeister.be/?p=192

The solving level is indeed an indication that a guess was made. After the guess the puzzle will be solved further with logic.

Nevertheless there is only 1 solution: if you guessed wrong and you would continue solving the puzzle with logic, it will turn out that the solution is invalid. At this point my solver is implemented to resume at the point where the guess was made, and will take a new guess.

Great solver!

Could you add a feature to determine the number of solutions? I know there is only supposed to be one, but my local paper published a 12x12 puzzle below. Either I've made a mistake somewhere.or the answer is not unique. The rules state each row and column must have six zeros and six ones, no more than two zeros or ones in a row horizontally or vertically, and no identical rows and columns.

I've put the original puzzle into your solver and also tried guessing the first row fifth column as either a 1 or 0. In all three cases your solver found a solution that looks valid to me. So I think this example has at least two solutions and possibly more.

xxxxxxx1xxxx

xx0xxxxx0xx0

xxxxx0x1xx1x

xxxxxxxxxxx1

xxxxxxxxx00x

xx1x1xxxxx0x

xxxx1xxxxxxx

0x1xxx1xxxxx

xxxx1xx0xxx0

xx0xxxxxx0x0

xx0xxxx0x0xx

xxxx00xx1xxx