Skip to content

Implementing AI using the minimax algorithm with alpha-beta pruning to play the Chopsticks hand game

Notifications You must be signed in to change notification settings

myiwt/chopsticks-ai

Repository files navigation

The Chopsticks Hand Game with AI

Chopsticks game Source: Wikihow

The game

This program runs this popular kids' game and includes an AI player.

The algorithm

The AI is implemented using the minimax algorithm with alpha-beta pruning. You can select the search depth limit for the AI to control the depth that the AI will search through the game tree to decide its move.

The evaluation function used to calculate the utility scores for this game is:

Eval(s) = hplayer 1 - hplayer 2

where:

hplayer 1 = the sum of points on player 1's left and right hands

hplayer 2 = the sum of points on player 2's left and right hands

The program

This program runs on Windows with C++20. To start the game, run open a Visual Build Tools terminal, navigate to this code's folder and then type the command chopsticks

Demo

demo

About

Implementing AI using the minimax algorithm with alpha-beta pruning to play the Chopsticks hand game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published