Fasmo 2: Fasmo Goes West

Started by , Fri 04/01/2008 21:31:13

Previous topic - Next topic

bicilotti

Ah, I'm getting old...

Spoiler
I've got the fabric and now I must scare the drunkie to get a tent sewed. I used to berries to obtain a red coloured liquid but I still need an appropriate hat or something similar. Any hint?
[close]

Rui 'Trovatore' Pires

Could anyone please tell me a winning formula for the Nim game?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

bicilotti

#2
Quote from: Rui "Trovatore" Pires on Tue 08/01/2008 22:22:40
Could anyone please tell me a winning formula for the Nim game?

Spoiler
Sure! It's nothing difficult really (once you've learnt it :P). However:


edit: the full explanation follows below: if you want just the quick solution do this:

-pick one stick from the third line;
-pick one stick from the first line;
-3 sticks from the 2nd line
-1 from first
-win the game


Let's say we have:

||| (3)
||||| (5)
||||||| (7)

You have to express every group's width with a sum of 4, 2 and 1. An example will explain better what I mean:

Code: ags

3 =   + 2 + 1
5 = 4 +   + 1
7 = 4 + 2 + 1


Spoiler

Simple isn't it?

Now, erase all the pairs (4's, twos, or ones):
[close]
Code: ags

3 = //
5 = //
7 = 1

Spoiler

You should leave your opponent with an empty "board" (so, in this case, just erase one stick from the third line. 

If you play every turn like this you will sonner or later arrive to an easily winnable configuration (eg: your turn with ||/|/|). Turn off the autopilot mode and beat your opponent.

P.S.: I am not sure (read: I don't remember) if the AI plays the same way every game (read: if there is an easier explanation on how to beat it). However, hope that this helps. If my explanation wasn't clear enough PM me or post here again.
[close]

[close]

Rui 'Trovatore' Pires

Thanks for the full explanation, though I had already seen it at wikipedia and decided I wanted nothing to do with it - your was at least easier to comprehend. So, as you can probably imagine, an even bigger thanks for the quick solution!
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk