Moto Hell - The Motorola Modding Community

General => Off topic => Topic started by: Exploited on October 03, 2007, 01:08:52 am



Title: Are you weaker than a pile of fruits - play the fruits game
Post by: Exploited on October 03, 2007, 01:08:52 am
I bet that you will get a hard time with that crazy fruits game. Check it out: http://www.2020tech.com/fruit/rules.html

P.S. Don't tell me it's impossible - I know how to beat that cruel computer!


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Joka X on October 03, 2007, 01:27:59 am
i win at first try ;D not so hard after all :P i make the fruitmaster really angry ;)


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Exploited on October 03, 2007, 02:18:33 am
So you know the solution of the "NIM problem"?


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Jithin on October 03, 2007, 04:56:33 am
Phew 8)
(http://img505.imageshack.us/img505/6117/fruityx2.jpg)


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Joka X on October 03, 2007, 06:42:28 am
What's the NIM problem?i just click randomly(maybe i'm lucky).....the last fruit i click is the lemon or orange i think....and there's a uncle pop up with the word congratulations....


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Exploited on October 03, 2007, 07:34:56 am
the NIM is a game where you have two (or more) piles of stones. Each player can remove stones from one pile on every turn. Whoever take the last stone wins.

The trick is that depending on the configuration if you have the choise to be first or second - you always have winning strategy. However if you make even a single mistake - the other oponent have a winning strategy immediately. The Fruit game is exactly the same - if you make a single mistake the computer wins (even wrongly choosing to be first or second).

The whole trick to solve it mathematically is to convert the number of piles into binary sum without transfer. For example:

  011    3    Heap A
  011    3    Heap B
  001    1    Heap C
  ---     
  001

* 1+1+1 = (1+1)+1 = 0+1 = 1
   1+1+0 = (1+1)+0 = 0+0 = 0
   0+0+0 = 0

The Theorem is that:
1. Every non-null (not 000) can be converted to full one by removing stones from one of the heaps
2. A null sum cannot remain num sum if you remove stone(s) from any the heaps

And finally - if your oponent is in null sum - it means that you win you win :) For example you have
  011    3    Heap A
  010    2    Heap B
  001    1    Heap C
  ---     
  000

No matter how many stones from which pile he take - he will make it a non-null sum... And on you will immediately convert him to a null one... He will end up in 1 stone in heap A and 1 stone in heap B and he have nothing to do but loose :)


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Joka X on October 03, 2007, 07:37:43 am
hey,then i must be really lucky then?


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Exploited on October 03, 2007, 07:43:48 am
yes, that was a good luck :)

However the Fruit game is with average small number of "fruits"... If you make the numbers much bigger and you do not know how to solve NIM - then you will definetly loose :)


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: 3sixthy on October 03, 2007, 07:46:45 am
ugh I lost..he3


Title: Re: Are you weaker than a pile of fruits - play the fruits game
Post by: Jithin on October 03, 2007, 09:23:58 am
wow,I was damn lucky then :)