Skip to main content

6 docs tagged with "Game Theory"

View all tags

Chalkboard XOR Game

Alice and Bob take turns erasing one number from the chalkboard. If removing a number makes the bitwise XOR of all remaining numbers become 0, the player who made that move loses. If at any player's turn, the XOR of all numbers on the chalkboard is already 0, that player wins. Alice starts first, and both play optimally to avoid losing.

Grid Game

This is a solution to the Grid Game problem where two robots play optimally on a 2D grid.

Matchsticks Game

This is a solution to the problem of determining the number of matchsticks the first player should pick to guarantee a win in the matchsticks game.

Stone Game III

This is a solution to the Stone Game III problem on LeetCode.