
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore takeaway games, nim, graphs, and Sprague-Grundy theory in the game theory algorithms in competitive programming course, with live coding and problem solving using xor and Grundy values.
Learn how to set up Sublime Text for competitive programming, create a project with new.cpp, input.txt, and output.txt, arrange three columns, and configure input/output redirection.
Explore a simple takeaway game with two optimal players, removing 1–3 stones from a pile, solved by backward induction and bottom-up dynamic programming to identify winning and losing positions.
The lecture analyzes the empty and divide game, where one box is emptied and the other split into nonempty parts. It presents parity rules to identify winning and losing positions.
Explore the game of Nim, where players remove chips from a single pile, identify winning and losing positions with two or three piles and equal piles, and introduce Nim generalization.
Explain the name sum concept by modeling game positions as sum of pile sizes, show zero name-sum positions are losing, and outline a winning strategy using the most significant bit.
Analyze how different games like nim and the name game map to nim heaps, with moves that reduce piles by left or downward moves, and learn winning and losing positions.
Analyze the game of stones with moves of two, three, or five, identify winning and losing positions, and derive a repeating pattern for efficient winner determination.
Learn misere nim strategies by analyzing pile states and the name sum, enabling you to force the last-move loss and handle special cases with ones.
Convert nimble into a nim game by treating odd coin counts on squares as heaps and ignoring even counts, then compute the nim-sum of those positions to decide the winner.
Explore zero move nim, a one-time move per player that lets you remove stones from a non-empty pile, and use brute-force patterns to derive winning strategies for competitive games.
Analyze a game on a digits square board by partitioning the board into subgames, selecting moves that create prime-filled boards, and using memoized Grundy-like values to decide winners.
This hands-on course is designed for everyone to learn & implement Game Theory concepts to solve Competitive Programming Challenges. You will learn how approach Game Theory based questions involving - Nim Game, Sprague Grundy Theorem, Subtraction Games, Combinatorial Games, Graph Games, Take-away games! The course involves both breadth and depth of these topics with enough examples and hands-on coding for each problem.
Competitive programming or Sport Programming is a mind sport usually, involving participants trying to program according to provided specifications. Competitive programming is recognised and supported by several multinational software and Internet companies, such as Google and Facebook. Popular Competitive Programming platforms include Codeforces, Codechef, HackerEarth, HackerRank, Spoj and more! This course is designed for both beginners and advanced programmers looking forward to take the next leap in Competitive Programming!
Participation in programming contests can increase student enthusiasm for computer science studies. The skills acquired in ICPC-like programming contests also improve career prospects, which often require candidates to solve complex programming and algorithmic problems on the spot.
This comprehensive course is taught by Apaar Kamal, who is a highly successful competitive coder and popular bootcamp Udemy Instructor and has taught thousands of students in several online and in-person courses over last 2+ years. This is deep-dive course, we not just delve into theory but focus on the practical aspects by solving multiple game theory problems of various difficulty levels.
The course starts with basics of Game Theory and then diving deeper topics! Here are some of the topics that you will learn in this course.
Combinatorial Games
Take-away Games
N/P Positions
Game of Nim
Nim-Sum
Applications of Nim-Sum
Similar Nim-Games
Games as Graphs
Sprague Grundy Function
Sprague Grundy Theorem
20+ Problems with Code
Join me in the course and take the next leap towards becoming a rockstar Competitive Programmer! See you in the course!