Puzzle 26: Four Winds and Special Puzzle 5: Tetro Stack

Two puzzles!

Four Winds. Divide the grid into several regions; each region must contain a number in its “capital”. All other squares in the same region must be either in the same row or in the same column as the center of the capital. Each region must be connected; that is, any cell in a region must be able to be visited from any other cell in the region by moving orthogonally along the squares in the region. Each number tells the number of squares in its region excluding the capital, so a number of 0 means that the region is composed of only the cell with the number itself.

This puzzle has the Unknown and Different variants! The numbers are replaced by question marks; it’s up to you to figure out the numbers. Additionally, all the numbers must be different.

Easy to medium if you have tried Four Winds before. Otherwise, probably medium with a little spice of hard.

Puzzle 26: Four Winds (Unknown, Different)

UPDATE 26-Oct-2012 22:46 UTC+7: Fixed an ambiguity near lower-left. By changing the right part. Yay.

And the second puzzle!

Tetro Stack. Perhaps the hardest puzzle so far in this blog?

Special Puzzle 5: Tetro Stack

Why is the latter a special puzzle? It was really hard (all difficulty are in my opinion) that I think I haven’t managed to discover a logical way, and I think I haven’t tested all possibilities. I’m not even sure that it has a single solution, hence the singled puzzle. This also makes it easy to remove it if it apparently has more than one solution. Yay.

Jahooma’s LogicBox, and Jahooma Puzzle 1

Jahooma’s LogicBox is a fantastic game, if you have the proper skills to play it. As in programming interest and somewhat great problem solving skills.

Roughly, you are given a task to perform by placing “boxes” (which represent functions in programming) in a grid. Different levels allow you to use different boxes, and sometimes it becomes extremely challenging because of the nonexistence of some boxes. When the program is run, an object carrying a string appears from the Start box, following the directions and executing the boxes’ purposes, until the object leaves the grid. You must match the direction where you are told to exit from, and the string in your object must have been modified to match the requirements. You probably can understand better by playing it.

So, what’s the point of this post then? As you can probably expect, I love that game, at least until when it requires payment to play a fuller version (it’s still in “lite” version, and judging from the “premium” release name in 2013, it seems like it’s going to need money to play). Well, I’ll just make some puzzles to post here. Yay.

Puzzles!

In each puzzle, you are given an infinite grid to toy with unless otherwise stated; if your object won’t encounter any more box, you can say that it leaves the grid, in the same direction as the game (up = green, down = red, left = yellow, right = blue). You are also given the boxes available and their effects. Finally, you are also obviously given the task, but not the test cases! It’s up to you to determine. You can submit your solutions to me if you want me to check it, but I will analyze your program and give you either the verdict CORRECT or the verdict INCORRECT along with one test case where your program fails the task. Oh yay that looks like a programming contest or something. But then again it’s a programming game, so yeah. After everything that matters with the puzzle, you might be given a Variants section which will adapt your solution into several other similar boxes.

Reminding you again that square boxes cut the input up to just before the first asterisk, aka if you have “ab*cd”, a square box will only accept the argument “ab” and leaves “*cd” unchanged.

Also, Redirect is always an available box, and because I aim this to be more programmer-style, Redirect (and Start) isn’t counted as a box when counting the total number of boxes and not counted as a step when counting the total number of steps.

Puzzle 1.1: Is It A Star? (Easy)
Is Period: Given an input, determine whether the first character is a period or not. You should exit from the green direction if it is, and red direction if it isn’t. The input should stay unchanged when it is output.

Boxes:
Circular Add period (adds a period in front of the string)
Circular Copy (copies the first character of the string to the end of the string)
Circular Delete (deletes the first character of the string)
Circular Compare (compares the first character and the second character of the string; if they are equal, exit green, otherwise exit red; the input is unchanged)

Sample cases:
– “.a” -> “.a”, exit green
– “a.” -> “a.”, exit red
– “period” -> “period”, exit red
– “…” -> “…”, exit green

Variants:
Is Asterisk: Checks whether the first character is asterisk; if it is, exit green, otherwise exit red. Replaces all mentions of “period” in the previous implementation with “asterisk”.

Puzzle 1.2: Finding Star (Medium)
Find Period: Given an input containing at least one period, splice the string into two parts: before the first period and after the first period. Afterwards, change their position so the part after the period appears first. The period is “consumed” and disappears.

Boxes:
Circular Add period (adds a period in front of the string)
Circular Copy (copies the first character of the string to the end of the string)
Circular Delete (deletes the first character of the string)
Circular Compare (compares the first character and the second character of the string; if they are equal, exit green, otherwise exit red; the input is unchanged)
Circular Rotate (moves the first character of the string to the end of the string)
Circular Is period (implemented from your solution to Puzzle 1.1)

Sample cases:
– “abc.def” -> “defabc”
– “a.b.c” -> “b.ca”
– “…” -> “..”
– “.” -> “”

Variants:
Find Asterisk: Splices the argument into two parts, one before asterisk and one after asterisk. The two parts exchange place so the latter appears first while the former follows. is removed. If doesn’t exist, the program gets to an infinite loop. Replaces all mentions of “period” in the previous implementation with “asterisk”.

Puzzle 1.3: Getting A Clearer View (Hard)
Square Back Rotate: Given an input not containing any asterisk, move the last character of the string to the front of the string.

Boxes:
Circular Add asterisk (adds an asterisk in front of the string)
Circular Copy (copies the first character of the string to the end of the string)
Circular Delete (deletes the first character of the string)
Circular Compare (compares the first character and the second character of the string; if they are equal, exit green, otherwise exit red; the input is unchanged)
Circular Rotate (moves the first character of the string to the end of the string)
Circular Is asterisk (implemented from your solution to Puzzle 1.1, replacing period with asterisk)
Circular Find asterisk (implemented from your solution to Puzzle 1.2, replacing period with asterisk)

Sample cases:
– “abcd” -> “dabc”
– “period.” -> “.period”
– “aaa” -> “aaa”
– “ayayay” -> “yayaya”

Puzzle 1.4: Counting Stars (Insane)
Square Increment Number: Given an input of a valid non-negative integer (starts with a digit other than zero except if it has only one character), increment its value by 1.

Boxes:
Circular Add asterisk (adds an asterisk in front of the string)
Circular Add period (adds an period in front of the string)
Circular Add zero (adds a zero in front of the string)
Circular Copy (copies the first character of the string to the end of the string)
Circular Delete (deletes the first character of the string)
Circular Compare (compares the first character and the second character of the string; if they are equal, exit green, otherwise exit red; the input is unchanged)
Circular Rotate (moves the first character of the string to the end of the string)
Circular Increment (increments the first character of the string (0 -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 0; * -> *; . -> .))
Circular Is asterisk (implemented from your solution to Puzzle 1.1, replacing period with asterisk)
Circular Find asterisk (implemented from your solution to Puzzle 1.2, replacing period with asterisk)
Circular Is period (implemented from your solution to Puzzle 1.1)
Circular Find period (implemented from your solution to Puzzle 1.2)
Square Back rotate (implemented from your solution to Puzzle 1.3)

Sample cases:
– “123” -> “124”
– “999” -> “1000”
– “0” -> “1”
– “499499” -> “499500”

Puzzle 25: Surveyors Heyawake

Surveyors Heyawake, also known as my favorite original genre (as of the time of post). Medium, a little bit toward hard.

Puzzle 25: Surveyors Heyawake

Apparently it’s not a small-grid puzzles batch!

Who says I can’t commemorate my 25th puzzle with something special? Antisymmetry, if you look closer (opposite givens add up to 5). The regions somewhat form a windmill, although that is not really intended. Weird regions, but I believe I don’t need to instate the “white contiguous region may not span over two boundaries” rule because it’s equivalent.

So… I’m running low on ideas. The first three people who e-mail me the correct solution to this puzzle may pick a genre, to be posted before Puzzle 40.

Puzzle 23: Tetro Stack

Tetro Stack, inspired from Friedman’s Pentomino Puzzles. Put the five tetrominoes to the grid such that they don’t overlap or cover any circle. Gravity acts on these objects, so for each tetromino and circle, there is at least one square occupied by the tetromino/circle such that the square directly below it doesn’t exist (it’s on the bottommost row) or is also occupied by a tetromino. Medium?

Puzzle 23: Tetro Stack

I hope you understand my vague rules above 😛 Puzzle 24 to be posted within 10 hours.

Puzzle 22: Slalom

If you know Slalom (or Suraromu) before, this one is a bit different. The gates, as opposed to be connected to black squares, are now connected to borders (you won’t be entering a gate from its side will you). Otherwise, the rules are same: draw a closed loop passing through some of the squares’ centers, passing each gate straightly exactly once each (so it passes exactly one cell of each gate). The path must start and end on the circle. Numbered gates tell the order of when the gate is passed; 1 means that it must be visited first. The circle’s number simply tell you the number of gates to save you some trouble. This one would be rated easy.

Puzzle 22: Slalom

Fun theme combined with a particular style in the closed area in R3-4C6.

I have Puzzle 23-25 prepared, but I must sort out a few things first.

Puzzle 21: Nonconsecutive Fillomino

Nonconsecutive Fillomino. Follow regular Fillomino rules. In addition, no two orthogonally adjacent cells may have consecutive numbers. Meaty and difficult, at least for me.

Puzzle 21: Nonconsecutive Fillomino

Booya. Pretty killer stuffs here. But that also gives less guarantee that it’s unique. Hm…

And so all puzzles I’ve scheduled on Tuesday have been posted. Now for more puzzles…or maybe not. That IMO post series haven’t been completed. Why this blog starts to become an exclusively puzzle blog again while apparently I can’t maintain my previous puzzle blog…

Puzzle 20: Fillomino

Fillomino. Divide the grid into regions. Each region is composed of cells, each cell containing a number equal to the size of the region. No two orthogonally adjacent regions may have equal sizes. Medium to difficult.

Puzzle 20: Fillomino
(click to enlarge)

UPDATE: Fixed ambiguity around middle right.

Fun and not so obvious. Probably. At least my intended opening wasn’t so obvious. EDIT: Apparently not really. Although there are a few unusual deductions, nothing too hard. But still fun for me at least, as progress are made in circles. If you know what I mean.

This is why I don’t really enjoy making large puzzles, much like Para. Too many tricks that clutter the fun tricks, although I can put in a bunch of small tricks. The latter can also be lost if I accidentally made an easier way to do stuffs. Well, let’s see how people respond…

Puzzle 21, which is in 12 hours, is a Fillomino. With a variation.

Puzzle 19: Skyscrapers

Skyscrapers. Put a number between 1 and the length of a side of the grid such that each number appears exactly once in each row and column. If the numbers represent heights of buildings, the numbers outside the grid tell the number of visible buildings from that point looking into the grid, with higher buildings block lower ones in visibility. This one is somewhat easy.

Puzzle 19: Skyscrapers

Easy enough isn’t it? Puzzle 20, the 17×17 puzzle, will be a Fillomino and will be posted in 12 hours from this post.

Puzzle 18: TomTom

TomTom. Put the required numbers in the grid so each number appears exactly once in every row and column. Additionally, for every bold region, the arithmetic operation and target number must be fulfilled; that is, starting from the largest number and applying the designated operation to each of the other number must produce the required target number. (E.g. If you have 9+, you can have 2,3,4 in it since 4+2+3=9, and if you have 2-, you can have 2,2,6 in it since 6-2-2=2.) This one would be easy-medium.

Puzzle 18: TomTom

Yep. If you know what Thomas Synder aka motris did three years ago, I’m using the same phrasing of the rules. But that comes up redundant because I only used addition and multiplication 😛

EDIT (8 March 2013): Yes, I even changed its name from KenKen to TomTom because KenKen has 1-n number range and no modified subtraction/division operations.

A first try in TomTom. Since I hate 5 without the existence of 10 (hence buffing the power of multiplication), I changed it to 6 instead. Maybe if I have a 6×6 TomTom, I’ll use 1,2,3,4,6,9 as the numbers for more confusion over multiplication. But that buffs addition a bit. Oh well, whatever.

12 hours to Puzzle 19. So I’ll tell you…it’s a Skyscrapers.