Determining the pattern of a 3x3 grid of hidden black and white tiles by revealing only two

I was playing a game called Space Rangers earlier, and stumbled upon a "text-adventure" mission in it, which required me to find what's supposed to be the only possible solution to this puzzle.

I have a field of 3x3 tiles, numbered 1-9, such as

[1] [2] [3]
[4] [5] [6]
[7] [8] [9]


I can chose TWO numbers, except for the number 9, which is "not working" according to the in-game explanation.

Each number is either white or black, and when I choose a number I find out what color it is. It seems that 5 is always black for some reason.

After choosing two tiles, the game will perform a test and tell you if there are possible "solutions" (as in, possible vertical lines or possible squares of black tiles), while knowing the color of your two chosen numbers.

The possible "solutions" to the puzzle is a vertical line of black tiles, or a square of 2x2 of black tiles.

I must guarantee that there is only one possible solution, as in, only one possible line or square that are all black.

Which two numbers should I choose?

I have thought it over for a long while, and the only idea I could come up with would be 4 and 6, but one of them is ALWAYS black, making my attempt at getting both as whites to mess up both vertical lines and squares in each side...

After countless attempts and even more half-hearted attempts, I gave up, accepting that I failed the mission, and moved on.

But I'm curious, as I assume it is possible one way or another (I just fail to see something that's probably obvious). What would be a working solution to this puzzle?

Revealing the colours of only two tiles only provides four possible outcomes, which you can't map to five possible results (vertical line down the middle or 2x2 square). There just isn't enough information.

However, there is an out. If we assume that square 9 "not working" means that the 2x2 square of black tiles will never contain 9, then we have just the following four configurations:

x x .   . x .   . . .   . x x        x = black
x x .   . x .   x x .   . x x        . = white
. . _   . x _   x x _   . . _        _ = not working


The case where the 2x2 black square is in the bottom-right corner is excluded because the 9 tile isn't working. So you have these four cases, and you need to choose two tiles such that the tiles that show are all different.

In order to do this, you need to produce a binary encoding, so both tiles will need to show black in exactly two out of four cases. The tiles that do so are:

4: x . x .
8: . x x .


Luckily for us, these produce a binary encoding as-is. So the two tiles you want are 4 and 8.

• Upon further inspection, I seem to have duplicated Len Pitre's answer but with rudimentary ASCII graphics. – Joe Z. Dec 25 '14 at 5:37
• Different means of explanation can be valuable even if the conclusions are the same. I find your answer easier to follow because of the graphics. It makes clearer, for example, why tile 5 seems always to be black. – Josh Caswell Dec 25 '14 at 5:38
• @JoshCaswell True, I guess. – Joe Z. Dec 25 '14 at 5:39
• I agree, this site is about good answers, not about being first and winning anything. In this case both given answers so far are good, but yours is easier to follow. However, didn't you miss the vertical line in column 1 as an valid option? – BmyGuest Dec 25 '14 at 8:07
• The ASCII graphics are a definite improvement; wish I'd thought of it! – Len Pitre Dec 25 '14 at 8:32

It sounds impossible to me, the way you describe it. Let me try rephrasing it. Please let me know if I'm making erroneous assumptions:

You have a grid of numbers 1-9. Each has a hidden color, either white or black. You can choose any two to reveal, and from those you need to determine the pattern of the grid. You need to pick the two numbers that will provide you with information to guess the right answer every single time.

The grid can either have one vertical black bar (all others white) or a 2x2 grid of black (all others white). That means there's 7 answers, 4 squares and 3 lines:

1245 4578 2356 5689 147 258 369

In this state the puzzle is impossible. Finding out the states of two numbers only gives four different possible states of the 7 needed. So I'm going to make two assumptions:

1) Assuming the 9 is a complete dud and not part of the answer. This removes 369 and 5689. So there's 5 different solutions, 3 squares and 2 lines:

1245 4578 2356 147 258

Still one too many. So on to assumption 2:

2) Assuming the 5 is always black because of some rule and not just your personal experience. That wipes out one of the options (147).

1245 4578 2356 258

Four options, four possible button results. Now it's a matter of finding the two that are black in exactly two answers (and if there's more than two buttons, throwing out any 'dupes' where one is black whenever another is). There's only two: 4 and 8.

4 black, 8 black: Answer is 4578

4 white, 8 black: Answer is 258

4 black, 8 white: Answer is 1245

4 white, 8 white: Answer is 2356

No idea if this is the right answer, but hope it helps. Best of luck tracking down a walkthrough if it's not.

• Sadly the 9 is not a dud, it is a part of a possible "solution". :/ – Ronin Dec 25 '14 at 2:06
• Other than that, your explanation seems spot on, although, I can't do an actual test right now, as I have no save around the time of the mission. As for a walkthrough, yes luck is what I need, as its a Russian game, most info is non-existent or at best, lacking in usefulness. – Ronin Dec 25 '14 at 2:14
• Then I'm unfortunately stuck. 5 always black as a rule by itself only eliminates 2 answers, leaving us with 5 (the 4 squares + 258), and that's too many to determine the answer. Best you can do is pick two evens on the same diagonal (24, 48, 68, 26) and pray the answer isn't 258. – Len Pitre Dec 25 '14 at 2:18
• Sadly, if there are more than one possible solution, the game wont accept it =P, as its an "invaluable artifact" and it will break if done wrong, so it wont let you chance it, But thanks for trying, maybe its just the game that is messed up, or my understanding of the puzzle. I will review it closer if I get the same mission again at some point, as I'm curious now ^_^ – Ronin Dec 25 '14 at 2:23
• Well, is there the option of brute forcing it? Inelegant I admit, but at least you'd get an answer. If 5 is always black and 9 doesn't work there's 7 possible keys. 7*6 = 42 different answers, actually 21 since order doesn't matter. How tedious is save/reload? – Len Pitre Dec 25 '14 at 3:43