## Find the winner in nim-game

You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and… Read More »

You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and… Read More »

In Game of Nim, two players take turns removing objects from heaps or the pile of stones. Suppose two players A and B are playing… Read More »

Three players P1, P2 and P3 are playing a game. But at a time only two players can play the game, so they decided, at… Read More »

Prerequisites: Sprague Gruncy theorem Grundy Numbers Nim is a famous game in which two players take turns removing items from distinct piles. During each turn,… Read More »

There are two players A and B who are interested in playing a game of numbers. In each move a player pick two distinct number,… Read More »

Two players are playing a game with n stones where player 1 always plays first. The two players move in alternating turns and plays optimally.… Read More »

Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of communicating with the other. The… Read More »

Consider a game, in which you have two types of powers, A and B and there are 3 types of Areas X, Y and Z.… Read More »

Previous posts on this topic : Minimax Algorithm in Game Theory, Evaluation Function in Game Theory, Tic-Tac-Toe AI – Finding optimal move, Alpha-Beta Pruning. Zobrist… Read More »

Prerequisites: Minimax Algorithm in Game Theory, Evaluation Function in Game Theory Alpha-Beta pruning is not actually a new algorithm, rather an optimization technique for minimax… Read More »

Rules of the Game The game is to be played between two people (in this program between HUMAN and COMPUTER). One of the player chooses… Read More »

Prerequisites: Minimax Algorithm in Game Theory, Evaluation Function in Game Theory Let us combine what we have learnt so far about minimax and evaluation function… Read More »

Prerequisite : Minimax Algorithm in Game Theory As seen in the above article, each leaf node had a value associated with it. We had stored… Read More »

Minimax is a kind of backtracking algorithm that is used in decision making and game theory to find the optimal move for a player, assuming… Read More »

Prerequisites : Grundy Numbers/Nimbers and Mex We have already seen in Set 2 (https://www.geeksforgeeks.org/combinatorial-game-theory-set-2-game-nim/), that we can find who wins in a game of Nim… Read More »