# Category Archives: Game Theory

Algorithms based on Game Theory

## Find probability that a player wins when probabilities of hitting the target are given

Given four integers p, q, r and s. Two players are playing a game where both the players are hitting a target and the first… Read More »

## Predict the winner of the game | Sprague-Grundy

Given a 4×4 binary matrix. Two players A and B are playing a game, at each step a player can select any rectangle with all… Read More »

## Find the winner of the game with N piles of boxes

Given N piles containing White(W) and Black(B) boxes only, two players A and B play a game. Player A may remove any number of boxes… Read More »

## Maximum and minimum isolated vertices in a graph

Given ‘n’ vertices and ‘m’ edges of a graph. Find the minimum number and maximum number of isolated vertices that are possible in the graph.… Read More »

## Coin game of two corners (Greedy Approach)

Consider a two player coin game where each player gets turn one by one. There is a row of even number of coins, and a… Read More »

## Josephus Problem | (Iterative Solution)

There are N Children are seated on N chairs arranged around a circle. The chairs are numbered from 1 to N. The game starts going… Read More »

## 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 »

## Game of Nim with removal of one stone allowed

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 »

## Check if the game is valid or not

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 »

## Variation in Nim Game

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 »

## Game of replacing array elements

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 »

## Game of N stones where each player can remove 1, 3 or 4

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 »

## The prisoner’s dilemma in Game theory

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 »

## Choice of Area

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 »

## Minimax Algorithm in Game Theory | Set 5 (Zobrist Hashing)

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 »