Puzzle #2

This is an Akari puzzle.



Difficulty: trivial

Theme: Light Up (in celebration of 4/20)

Puz-PRE link.

For those of us who don't know, Akari was originally called "Light Up".

For those of us who don't know, today is 4/20 in the nonsensical American calendar system, a day that people who smoke marijuana tend to celebrate, by lighting up their joints of marijuana and smoking them, as well as doing other things.

For those of us who don't know, mathgrant came up with this pun, and I just couldn't resist seeing it come to fruition.

For those of us who don't know, I've stopped making my puzzles in Paint.NET and started making them instead in Puz-PRE.

Rules of Akari

Place lightbulbs in the white cells according to the following rules:
  1. Lightbulbs light up all cells in the same row and column, including the cell they're in, up to a black cell.
  2. All cells must be lit up.
  3. No lightbulb may light up another lightbulb.
  4. Numbers on black cells represent the number of lightbulbs orthogonally adjacent to that cell.
Below is an example and its answer.


Puzzle #1

This is a Heyawake puzzle.

Difficulty: medium
Theme: 21, for no apparent reason.

Puz-PRE link.

I figured it was time that I started posting puzzles instead of merely reviewing other peoples' puzzle apps or showing how region parity worked.

Because I create these puzzles in Paint.NET instead of using a script to do it like most puzzle authors (I do not have the programming knowledge necessary to write my own script, and I'm really not sure if anyone wants to lend me theirs), these puzzles are of a very low resolution. On the other hand, this means that I don't have to carry around with me a notebook for keeping track of my puzzles; I can instead carry around with me a notebook for keeping track of my puzzles, something which I already do. (Let the meaning of that previous sentence sink in.)

It's a slight shame that it's not my 21st birthday, or that of anyone whom I know. Perhaps I should have waited until it was to post this.

As with pretty much every other puzzle blog on the rest of the internet, DO NOT SPOIL THE ANSWER IN THE COMMENT SECTION. If you absolutely must spoil something regarding the puzzle-solving process, please encode it with ROT13. Should you require assistance with the puzzle, you may email me at the email given in the "About" page.

As with pretty much every other puzzle blog on the rest of the internet, UNIQUENESS LOGIC AND PURE GUESSING ARE FAIR GAME. However, in either case, you will not get as much satisfaction from solving the puzzle, and in the latter, you have not proven uniqueness of the solution, which is something which I somewhat frown upon for most puzzle types.

Finally, should you find multiple solutions to a puzzle, it is best posted as a comment instead of an email.

So in other words, please obey the rules of every other puzzle blog on the internet.

Rules of Heyawake

The grid is subdivided into multiple rectangular regions by thick lines. Shade some cells such that:
  1. No two shaded cells are orthogonally adjacent.
  2. Each numbered region correctly states the number of shaded cells within it.
  3. All unshaded cells are connected.
  4. No unbroken orthogonal line of unshaded cells straddles two region boundaries.
Below is an example and its answer.

In Which I Review Puzzle Apps #2: It Adds Up

While browsing /r/puzzles, I came across this post detailing that the poster had created an app based off of the Setsquare/Math Square puzzle. Needless to say, I felt the need to review it. Though of course, this genre is extremely trial-and-error based, but sometimes logic can still shine through. Keep that in mind throughout this review.

The first thing that struck me was the choice of graphics. Each of the numbers, boxes, and operations look as if they've been drawn by someone who happened to be lacking a tablet, using Paint XP (not that that's a bad thing if you're solving a puzzle, though), and trying to do so on a train. While I appreciate the amount of effort that must have gone into making the symbols look like such, as well as the randomizer code that randomizes all the symbols to make it look more natural, at the end of the day it's just unnecessary work when you could just as easily use a font from your computer. Not only that, it's visually off-putting due to its irregularity.

Also, if you're trying to make a puzzle with boxes in it, the worst background you could possibly use is a squared background. ESPECIALLY if your boxes are transparent.

A puzzle should have as few detractions as possible from the actual solving process. This is why unthemed puzzle games should, in general, have minimalist graphics; there's nothing else that needs to be shown to the player, so why bother writing code to randomize symbols, or to randomize the colours of cells, when the player is just going to turn off those options if possible anyway?

But enough gripes with the graphics, methinks. Let's actually play the game. So I downloaded it (given that it was free), and started playing. To maximize the possibility of a puzzle with non-unique solutions, I went for a 4x4 puzzle with only addition.


Above is the puzzle that was generated. My gripes with the graphics are far from over, then. For one thing, the sizes of numbers are inconsistent here; note the different sizes of the 21 as compared to everything else.

A second annoyance is the fact that the numbers we should enter are scattered about on top of each other. Take the number underneath the 8. Without looking at any other numbers or dragging the 8 away, what is it? It's impossible to tell, unless you see that 4 isn't present among the other numbers. A better design choice would have been to arrange them in a 4x4 square in an ordered pattern.

The words "flip to check" are upside-down, the timer doesn't work, and neither are any hints displayed, even though the Help section specifically says that we get two hints per 4x4 level.

But in any case, let's get on with the puzzle. From here on, I shall instead use plaintext to represent the puzzle, instead of constantly taking up space with screenshots.

__ __ __ __ | 47
__ __ __ __ | 30
__ __ __ __ | 35
__ __ __ __ | 24
------------
27 45 43 21


Already there are a gigantic number of possibilities and no good way to eliminate enough of them. I could write a script to brute-force the solution if I had the required scripting knowledge, but I don't, so it'll have to be done by hand.

Firstly, we know that 16 cannot appear in the right-hand column, or else the total would be at least 22. Similarly, 1 can't appear in the top row, or else the total would be at most 46.

47 can be formed with [16,15,14,2], [16,15,13,3], [16,15,12,4], [16,15,11,5]... yeah, this doesn't look humanly solvable at all. The only possible way to solve this seems to be brute force. Forget "too hard for the average app user to get into", this is "almost impossible for the average app user to get into". Another couple of words of wisdom originally from Grant Fikes, though modified to fit the situation: 
"This is more likely created by someone who solved five Sudoku puzzles and realized that puzzles make money, so he slapped some programming code together as quickly as possible and called it a puzzle. I see no obvious logical way to start any of these puzzles except to list every possible case I find until one of them works. But frankly, I'd rather play an expert grid in Minesweeper in real life while people are constantly throwing durians at me until I either clear the board and win or trigger a landmine and lose. (And that's just the PG version of what I'd rather do.) If anyone out there is willing to punish themselves by solving these puzzles, or to write a computer program to do so, I will gladly edit this review to reflect how many solutions they have."

But even so, maybe I'm being a bit too unfair on this front. After all, I probably selected the hardest puzzle type of the lot. So I guess I'll try something less impossible.


54 is 6x9, and multiplying either of these by anything would result in a number we don't have, so the bottom right corner must be 1, and the final column must contain 6 and 9. If 9 were in the top right cell, we would have two numbers multiplying to make 11, so that's not allowed. So the right-hand column must be 6-9-1 in that order.

_ * _ - 6 = 2
-   +   *
_ + _ - 9 = 3
-   *   /
_ * _ / 1 = 24
=   =   =
-8  44  54

The bottommost row, because it cannot use 6, must contain 3 and 8 in some order. Clearly neither of these fit with the convention that sums ignore BODMAS in most Math Square puzzles (due to the 44 total for the middle column), so props to the creator on actually being logical there. So these puzzles actually do use BODMAS.

If the middle bottom cell were 3, we could only get a total of at most 26. So the bottom middle cell is an 8, the central cell is a 5, and the top middle cell is a 4.

_ * 4 - 6 = 2
-   +   *
_ + 5 - 9 = 3
-   *   /
3 * 8 / 1 = 24
=   =   =
-8  44  54

All that is left are the 2 and 7. These must be placed in the remaining two cells as 2-7 to satisfy the last constraint, and we are done.

2 * 4 - 6 = 2
-   +   *
7 + 5 - 9 = 3
-   *   /
3 * 8 / 1 = 24
=   =   =
-8  44  54

This was very clearly solvable, so the solvability issues seem only to be with the impossible puzzles.

Now let's try something larger.

In the puzzle to the left, the best place to start is clearly the -347. This is formed by a number of possible combinations, unfortunately, but no matter as there aren't that many to check. The top cell in that column can't be a 1, as there would be three numbers multiplying to make 348, which requires a 29. 349 is prime, so it can't be 2 either. 3 would permit the other three to be 5, 7, and 10. 4 would permit 3, 9, and 13. And so on. The combinations we end up with are [3|5,7,10],[4|3,9,13],[5|2,11,16],[5|4,8,11],[13|2,12,15],[13|3,8,15],[13|3,10,12],[13|4,6,15],[13|4,9,10],[13|5,6,12],[13|5,8,9]. From the third column and first row combined, we can eliminate anything with 13 as the first cell, leaving us with [3|5,7,10],[4|3,9,13],[5|2,11,16],[5|4,8,11] for the second column. The possibilities for R1C3 are therefore 2 or 4, meaning that the rest of the column is either [1, 13, 16],[1,14,15],[2,8,13],[3,5,14],[3,7,10],[5,6,7]. The second row has a little over 200 combinations of R2C2 and R2C3 to check validity for, but because R2C4 has to be >6 to satisfy the C4 constraint, and the product in R2 has to range from 51 to 66, we can remove all candidates from R2C2 and R2C3 greater than 11, as well as 11 itself (or else there would be two 1s in that row). From R2C1 we can eliminate 6, 8, 10, 14, and 16 for not allowing the multiplication to be valid...
I've been continuing on for about 9 hours on this thing on-and-off. BlueStacks, OpenOffice Calc, and Chrome are all eating into my computer's resources, so I'll give up here. If this isn't "deceptively impossible", then it must be VERY, VERY difficult. Probably moreso than the Loop Of Death, since that doesn't require tedious elimination just to get a single piece of the solution.

A couple of final bugs that I notice is that clicking "flip to check" when the puzzle is INcorrectly solved results in the app returning you to the puzzle selection menu. This is very annoying and needs to be fixed. Also, restarting the app and re-selecting "New Game" brings up the tutorial AGAIN. I already know how to play this, thank you very much. Finally, quitting the app loses all your progress.

All in all, the app itself is very solid, but needs i
t's way too impossible for humans to solve, filled with bugs, and has bad graphics. Nevertheless, use of BODMAS over "in reading order hurr durr" has redeemed 1 point for this app.


########


Verdict: 2/5. Download this if you like feeling extremely frustrated and having to have your phone on for a single 16-hour sitting.

In Which I Review Puzzle Apps #1: Shirodoko

I was browsing /r/puzzles when I saw a post by someone, stating that en had created a Kurodoko-related app called Shirodoko. For those of us who clicked the link above and are about to complain that I've linked you to an article about Kuromasu instead, they are the same thing.

Now, the first thing that ticked me off was the name. For those of us not in the know, "Kurodoko" is often translated as "Where Is Black Cells?", so Shirodoko would be "Where Is White Cells?". I was rather annoyed, therefore, to notice that in none of the screenshots for the game were there any white shaded cells.

I also saw that in one of the screenshots, there were differently-coloured cells instead of a sea of black (or white) cells. "Oh no," thought I to myself, "Perhaps this is a 12-year-old who firmly believes that en's design choices are brilliant." The reason this is a problem is because it looks annoying, takes up more code, and serves no purpose. You don't need to put it in your code. Take it out so that the game will run faster on slow devices (like BlueStacks App Player).

But still, perhaps the screenshots were merely not representative of the game as a whole. So I downloaded it. After all, it was free.

I opened it up and discovered that it was connected to Google Play Game Services. The authorization screen for Google Play Game Services is extremely annoying. If possible, I would suggest to turn off the requirements of it wanting to know who's in my circles, and turn off the ability to post to my page.

The first thing I looked for when playing it was an option to turn off coloured squares. It was THERE that I found an option to turn the squares white as well. So that mystery's solved then.

The app's page said ""Translated" in over 30 languages. The language option in the app, though, only allows switching between English, French, and Spanish. Celui qui a créé cette application est un sale menteur. Én probablemente debe tomar un momento para pensar en sus palabras.

I wanted to see how well the creator had entered the rules. En had done so very well (besides the use of "coloured" instead of "shaded"). Then I checked the tutorial.

Here is a sample screen from the tutorial. (Did I forget to mention that this app is ad-supported? Because it is.)

The app says that the 9 and 10 at the bottom are both already solved, and that the 11 and 12 are solved because of this.

However, there are no black dots at R6C9, R7C9, R8C5, R8C6, and R8C9, which implies that some of those squares COULD be shaded. Therefore, the tutorial is contradictory and/or inconsistent.

Not only that; there is more than one solution to the tutorial problem.

I can forgive the fact that there were coloured blocks. I can forgive the screenshots not reflecting the title. I can forgive the Google Play Game Services screen, and all of the tiny little bugs, inconsistencies, and bad UI choices (why on earth would you not program the "tap twice to pencil-mark a square" option instead?!) that annoy me.

But this is an abomination. Logic puzzles should only have ONE solution, or else they cannot be solved using logic! It doesn't matter if they can all be accepted as a correct answer, the fact is that there is no longer a fully logical path to the solution, and that one is required to guess somewhere! Puzzlemaster Grant Fikes stated it well (you should probably read the comments, too): "How am I, as a logic puzzle connoisseur who wishes to keep his blog PG-rated, supposed to respond to such an atrocity? There is no appropriate invective-free response to this kind of horror. You simply do not bill something as a logic puzzle with only one solution, and have it actually have multiple solutions."

This is why I have subtracted 10 points from its original rating. Please, take your app back to the drawing board, and don't return until each puzzle has exactly one solution.

########

Verdict: -8/5. Do not get this app until it has updated accordingly.

(Note: if you would like me to review your Android puzzle app, please contact me at the email found in the About page.)

Parity in Alcazar (and other such loop puzzles), Part II

In the previous post, I showed you how checkerboard parity in Alcazar (and other such puzzles) works. I believe it is time for a case study, using the first puzzle from one of the packs in the Alcazar app; namely, the upcoming pack "The Ball Rooms".

A bit of background information here: The puzzles in this pack were computer-generated by a different program to the one which generated the rest of the puzzles in the app. The person who wrote this new program was a certain A. Ball, hence the name "The Ball Rooms". These puzzles are claimed to be even more difficult than the rest of the app; in fact, Mr. Ball himself was completely stumped on the first puzzle! I have therefore written this post to demonstrate checkerboard parity in action, show Mr. Ball that that puzzle is indeed solvable with pure logic, and also show you that checkerboard parity is to Alcazar what the Sledgehammer is to Sudoku.

Let us begin the puzzle. I am running this on BlueStacks Emulator, but that has nothing to do with the puzzle. If you don't have an Android device or an emulator, you can use this weblink instead, to follow along with these deductions.
Firstly, you can fill in all the "trivial" cells. That is, any cell with exactly two walls surrounding it.
Now apply parity on the whole puzzle. Because you can only use two exits, one of which is already known to be black, and there are an equal number of white and black cells, you can remove all the other black exits.

Near the top-righthand corner, there is a small 2x2 region on which you can apply checkerboard parity. Some people would call this "wicking", "weak points", or "loop forcing", but it's really just checkerboard parity in disguise!

Next, consider the 5x4 region in the bottom left. There are an equal number of white and black cells, and one white exit is already used. Since there is only one black exit left, that exit must be used.
Also, any other white exits in that region cannot be used.
Now we're back to trivial cells. Note, of course, that this could be considered as parity on a 1x1 region. So almost all Alcazar strategies are equivalent to checkerboard parity*!
Now, consider the 2x2 region just below the right centre. It has two white exits in use, and can only use two black exits. So it must use those, and can't use any other white exits.
More trivialties.
Note this irregularly-shaped region. It has an equal number of white and black cells, and only has one available black exit, so it must be used. Also, in the bottom right, you can add a white exit, by parity.
Do this next one yourself.
Trivialties.
This should also be pretty obvious.
And now trivial deductions solve the puzzle.

Checkerboard parity is a lot more useful than you might think, considering that most solving strategies are checkerboard parity in disguise. In fact, all of the steps in this puzzle come directly from checkerboard parity, so if you're creating an Alcazar solver, that's all you need to implement**!

I hope you leave this blog a little wiser on this subject than before (and able to complete the whole of "The Ball Rooms"). Especially you, Mr. Ball.

##########

*"No closed loops" is also checkerboard parity in disguise. Consider the region formed by the squares used by the path in consideration. There is an equal number of each colour of cells (as the ends of the path are adjacent), so there is one white exit and one black exit. Therefore, each end of the path must extend out of the region, not into it, and so one can draw a wall between the two ends.

**There are a few advanced strategies, but for the most part, they have not yet been discovered. I believe I have discovered one which is definitely not equivalent to checkerboard parity (which I shall not reveal at this time), and one which may or may not be equivalent (I haven't thoroughly checked it yet).

Parity in Alcazar (and other such loop puzzles)

On the subject of parity:

When we refer to "parity" in Alcazar, we mainly refer to two types:

1. Exit parity. Every closed region must have an even number of used exits.

2. Checkerboard parity. Every time one moves, one must move from a light cell to a dark cell and vice versa.

There is a third type of parity in loop puzzles, which I call "flow parity", but this is not very easily applicable to Alcazar puzzles.

Exit parity shall be covered in a later post. For now, I shall focus only on checkerboard parity.

Take, for example, the following puzzle.
You will notice that there are 6 dark cells and 6 light cells. Now, suppose you drew a valid Alcazar path on the grid. You would find that along your path, you alternate between light and dark cells. Because there are an equal number of each, you must start at a light cell and end on a dark cell, or vice versa.

Now, say you've solved the puzzle to this point.
(Yes, you could use weak points, but for the sake of demonstration, let's not.) You now have a light exit, as you can see. By parity, the other exit must be dark. So you can eliminate all other light exits, and solve the puzzle that way.
Now look at this puzzle:
Here we have an odd number of cells; 7 dark cells and 8 light cells. This means that you must both start and end on a light cell. If you did not, you would miss some cells. Note that this means that you can't use any of the dark exits at all! So you can eliminate those exits and end up with this:
...which is easily solvable.

This logic doesn't just apply to the whole puzzle. It can also be applied to regions as well!
Note the region in the top left, marked in red. You can only enter and exit it once (as there are only three exits), and it has an equal number of each colour square, so you must enter and exit on opposite colours. So you must use the dark exit as shown:
Be careful, however! Regions that can enter more than once will make things more complicated! Look at the region in the top right. There are four exits, so could they not all be used?

Thankfully, they cannot. If they did, then three would be dark and one would be light. However you draw paths in such a configuration, you will end up with one path that starts and ends on dark cells, and one that starts and ends on different-coloured cells. This would mean that you would use one more dark cell than light.

So you can only enter and exit it once. You can now draw in the light exit and solve the puzzle afterwards.

There is a general rule for any number of exits, though, and it goes as such (click to enlarge):

Note that regions don't have to be rectangular. Unfortunately, I find myself unable to construct an example puzzle for this, so I shall have to end on this particular note.