Moto Hell - The Motorola Modding Community
November 24, 2024, 08:00:44 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The forum is no longer active and registration is disabled; however you can still fetch everything as guest.
 
   Home   Help Facebook Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Are you weaker than a pile of fruits - play the fruits game  (Read 8027 times)
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« 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!
Logged

Joka X
MH Official Spammer
PHD modder
***

Karma: 26
Offline Offline

Posts: 2743



View Profile
« Reply #1 on: October 03, 2007, 01:27:59 am »

i win at first try Grin not so hard after all Tongue i make the fruitmaster really angry Wink
Logged
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« Reply #2 on: October 03, 2007, 02:18:33 am »

So you know the solution of the "NIM problem"?
Logged

Jithin
Inactive :(
Global Moderator
PHD modder
*****

Karma: 90
Offline Offline

Posts: 2065



View Profile
« Reply #3 on: October 03, 2007, 04:56:33 am »

Phew Cool
Logged

Joka X
MH Official Spammer
PHD modder
***

Karma: 26
Offline Offline

Posts: 2743



View Profile
« Reply #4 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....
Logged
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« Reply #5 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 Smiley 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 Smiley
« Last Edit: October 03, 2007, 07:42:44 am by Exploited » Logged

Joka X
MH Official Spammer
PHD modder
***

Karma: 26
Offline Offline

Posts: 2743



View Profile
« Reply #6 on: October 03, 2007, 07:37:43 am »

hey,then i must be really lucky then?
Logged
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« Reply #7 on: October 03, 2007, 07:43:48 am »

yes, that was a good luck Smiley

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 Smiley
Logged

3sixthy
Guest
« Reply #8 on: October 03, 2007, 07:46:45 am »

ugh I lost..he3
Logged
Jithin
Inactive :(
Global Moderator
PHD modder
*****

Karma: 90
Offline Offline

Posts: 2065



View Profile
« Reply #9 on: October 03, 2007, 09:23:58 am »

wow,I was damn lucky then Smiley
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Design By Forum Hosting
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines