• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

NIM-type Game

  • Kylaila
  • 09/14/2014 02:12 PM
  • 1174 views
Ever heard of these "NIM-games"? If you did, and love them, give this a go and don't read further.
If you didn't, it's basically a game setup where two players take turns drawing a number of things from some sort of heap and whoever gets the last piece (or the one who doesn't) wins. In this case, it's drawing from three cans of water. The one who ends up getting nothing at the end loses.

You aren't playing this mean game for no reason, though! You've died and Lucifer AKA the reaper (never knew those two were the same person, heh!) makes the generous offer to revive you if you win, and devour your soul if you don't.


Why can't I just decline the offer ..?

Now, there is an ominous evil track for the beginning, and this cute reaper floating up and down your screen until you behold a nice wooden table with a red tablecloth, have some jars put on top of 'em, and off you go! All custom-graphics, the entirety of this one room you'll see!
The English has plenty of mistakes in the few sentences you'll read, but I'm glad a translation is available at all.

Now then, the numbers on those jars are randomized .. so you can start off with a disadvantageous setup which will render you defeated right from the start. Practically.(unless I got my maths completely wrong, but I wouldn't know)

If you take this further, there is practically only one exact way to win which you need to keep track of. So .. "tactic" is nothing your mind should fabricate. If you really want to start from scretch you need to be able to properly analyze what your enemy is doing .. which he'll counter if you copy him. Which will be even more difficult to do since you start with different numbers.
Other games had something similar as minigames, and it was possible to figure it out just as well, because the enemy methods were clear and the numbers small enough to keep track of properly.

I don't think I would've been able to do this if I didn't know the basic approach already ... nor would I have wanted to, let's be honest.

You want to end up with him getting two of the same value (read: 2 jars with 1 litre each and one empty, so you will get the last drop), but before that, you basically will need him to get two about the same value. That's what he's doing, and you know what? You can't do it directly like him because then he'd just empty the other and leave you with those two. But there's the more precise method.

So basically, you break these numbers down to binal code.
For example, 30, 29, 17 becomes

11110 (first jar)
11101 (second jar)
10001 (third jar)

the sum of those digits would be

3 2 2 1 2

For all unfamiliar with binary code:

In binary code, you only have two numbers, giving it its name : 1 and 0.
So if you only have those two, you need to move to more digits when you hit the "can't count higher" block. Which makes for longer numbers. On the other hand, if you used a system which had more numbers than we have with our ten (0-9), then you could express higher numbers with fewer digits.

We use the same in green.
We can count to 9 with only one digit just fine .. but ten will need another one. 10. You can go to the maximum of it (9 x 10 + 9x 9 = 99).
Should you want to count higher, you add another digit. 100 it is.
The digit value is multiplied by 10 to the left.
1 -> 10 -> 100 -> 1000. It's the reverse order, though

5 -- 6 -- 7
100- 10 - 1

5x 100 + 6x 10 + 7x1 = 567

If you use this concept for the binary concept, it'll be like this:

1 is 1. Duh. But if you don't have a "2" to express "2", you already need to add a digit.:
10 it is. 11 is 3, but we already have no more options to express "4" with these two numbers, so our four will need to be 100.
The digit value is multiplied by two each digit you move left
1 -> 2 -> 4 -> 8 -> 16

To analyse:

1 - 1 - 1 - 1 - 0
16-8 - 4 - 2 - 1

1x 16 + 1x 8 + 1x 4 + 1x 1 + 1x 0 = 16 + 8 + 4 + 2 = 30


Now what does that help us? You can only change one "heap" at a time. One "jar". You want your enemy to end up with an even number of sums.

We started with

3 2 2 1 2

So to get the advantage, you'd change it so that it would say for him

2 2 2 2 2

Which you could do by subtracting 14 of either the second or third jar. (since the first digit is "16" and needs to be substracted and the second to add is "2" .. and all)

He will then subtract some sloppy mess which leaves you with an uneven number (he can only change one heap, remember? he can't get a 2 down.) - so you can make it even again.
Rinse and repeat. On paper. I find it hard without it.

And tadaa - you win. If you don't, you lose. If you get an even number of sums right away, you lose.

It works for what it's supposed to be. Why writing down numbers to win some minigame is fun is beyond me, though. Substracting numbers isn't my optimum of fun.

Anyway, it's too randomized and dealing with too high numbers to be able to solve it in your head, nevermind thinking up the proper strategy .. which is what the fun part about puzzles should be.
However, it does what it's supposed to do .. it's a NIM game with a cutely sinister frame, alright.

Posts

Pages: 1
Thank you for playing this game. Also, I like your review. :)
Btw, the number is already programmed so that there's no disadvantageous setup appeared, so everyone have the chance to defeat the reaper.

I agree with the number being too high to be solved without the paper. I'll try to put a lower number if I ever make this kind of game again. :)
This might be insultingly blunt but your finding yourself in losing situations since your not using the correct process.

Albeit you are on the right track that you need to convert the values into binary to work out the correct answer.
Pages: 1