Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DSA
  • Practice Game Theory
  • Game Theory in DSA
  • Nash Equilibrium
  • Normal form games
  • Minimax Algorithm
  • Impartial games
  • Combinatorial Game Theory
  • Nim Game
  • Grundy Numbers
  • Sprague Grundy Theorem
  • Minimax Algo
  • Alpha Beta Pruning
  • Zorbist Hashing
  • Coin Game
  • DP in Game Theory
  • Problems on Game Theory for CP
Open In App
Next Article:
Combinatorial Game Theory | Set 1 (Introduction)
Next article icon

Combinatorial Game Theory | Set 1 (Introduction)

Last Updated : 08 Jun, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

Combinatorial games are two-person games with perfect information and no chance moves (no randomization like coin toss is involved that can effect the game). These games have a win-or-lose or tie outcome and determined by a set of positions, including an initial position, and the player whose turn it is to move. Play moves from one position to another, with the players usually alternating moves, until a terminal position is reached. A terminal position is one from which no moves are possible. Then one of the players is declared the winner and the other the loser. Or there is a tie (Depending on the rules of the combinatorial game, the game could end up in a tie. The only thing that can be stated about the combinatorial game is that the game should end at some point and should not be stuck in a loop. In order to prevent such looping situations in games like chess(consider the case of both the players just moving their queens to-and-fro from one place to the other), there is actually a "50-move rule" according to which the game is considered to be drawn if the last 50 moves by each player have been completed without the movement of any pawn and without any capture. [Source : Stackexchange] 

On the other hand, Game theory in general includes games of chance, games of imperfect knowledge, and games in which players can move simultaneously. 

The specialty of Combinatorial Game Theory (CGT) is that the coding part is relatively very small and easy. The key to the Game Theory problems is that hidden observation, which can be sometimes very hard to find. 

Chess, Game of Nim, Tic-Tac-Toe all comes under the category of Combinatorial Game Theory. 

We can divide these games into two categories as shown below:

 gametheory1-1024x420 

The difference between them is that in Impartial Games all the possible moves from any position of game are the same for the players, whereas in Partisan Games the moves for all the players are not the same. 

Consider a game like below: 

Given a number of piles in which each pile contains some numbers of stones/coins. In each turn, player choose one pile and remove any number of stones (at least one) from that pile. The player who cannot move is considered to lose the game (ie., one who take the last stone is the winner). 

As it can be clearly seen from the rules of the above game that the moves are same for both the players. There is no restriction on one player over the other. Such a game is considered to be impartial. 

The above mentioned game is famous by the name- Game of Nim which will be discussed in next sections. 

In contrast to the above game, let us take an example of chess. In this game, one player can only move the black pieces and the other one can only move the white ones. Thus, there is a restriction on both the players. Their set of moves are different and hence such a game is classified under the category of Partisan Games. 

Partisan Games are much harder to analyze than Impartial Games as in such games Sprague-Grundy Theorem fails. 

In the next sections, we will see mostly about Impartial games, like- Game of Nim and its variations, Sprague-Grundy Theorem and many more. 

Exercise: Readers may try solving below simple combinatorial Game Theory problems. 

Cycle Race 

Game of Chocolates 

Sources: 

http://www.cs.cmu.edu/afs/cs/academic/class/15859-f01/www/notes/comb.pdf 

https://en.wikipedia.org/wiki/Combinatorial_game_theory 

https://en.wikipedia.org/wiki/Impartial_game 

https://en.wikipedia.org/wiki/Partisan_game 

 


Next Article
Combinatorial Game Theory | Set 1 (Introduction)

R

Rachit Belwariar
Improve
Article Tags :
  • Game Theory
  • DSA
Practice Tags :
  • Game Theory

Similar Reads

    Combinatorial Game Theory | Set 2 (Game of Nim)
    We strongly recommend to refer below article as a prerequisite of this. Combinatorial Game Theory | Set 1 (Introduction) In this post, Game of Nim is discussed. The Game of Nim is described by the following rules- “ Given a number of piles in which each pile contains some numbers of stones/coins. In
    15+ min read
    Game Theory (Normal - form game) | Set 1 (Introduction)
    Game theory is a mathematical model used for decision making. It has applications in all fields of social science, as well as in logic and computer science. Game theory has come to play an increasingly important role in logic and in computer science. To be fully defined, a game must specify the foll
    4 min read
    Minimax Algorithm in Game Theory | Set 1 (Introduction)
    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 that your opponent also plays optimally. It is widely used in two player turn-based games such as Tic-Tac-Toe, Backgammon, Mancala, Chess, etc.In Minimax the tw
    9 min read
    Combinatorial Game Theory | Set 4 (Sprague - Grundy Theorem)
    Prerequisites : Grundy Numbers/Numbers and MexWe 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 without actually playing the game.Suppose we change the classic Nim game a bit. This time each player can
    15 min read
    Combinatorial Game Theory | Set 3 (Grundy Numbers/Numbers and Mex)
    We have introduced Combinatorial Game Theory in Set 1 and discussed Game of Nim in Set 2.Grundy Number is a number that defines a state of a game. We can define any impartial game (example : nim game) in terms of Grundy Number.Grundy Numbers or Numbers determine how any Impartial Game (not only the
    15+ min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences