Game of Nim : Game Theory

1. A simple Game of Nim – We are given N piles has N[me] coins in each Piles No we has to calculate xor of array if it come out to be zero then teh current position is lossing position and teh position after it would be winning.
2. Above game is Finder winner/ Normal game another one is miser
which the person who is not able to pick any coin wins so the concept is all same but the only difference is data suppose we have 5 piles and each having one coin so now a player
bounded to choose a single coin so if piles are odd 2 will win either first will win.
A slightly more complex take-away game involving several piles of objects. Two players take turns removing any amount of objects from one of the piles. The winner is the person who removes the last object from the last remaining pile.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: