kodecocodes / swift-algorithm-club

Algorithms and data structures in Swift, with explanations!
MIT License
28.85k stars 5k forks source link

Minimax with alpha-beta prunning #975

Open michalnowak061 opened 3 years ago

michalnowak061 commented 3 years ago

Brief Intro

Hi there 👋🏻

I would like to add an implementation and an example of using the minimax algorithm. It's an algorithm used in games for example in Tic Tac Toe, and many other games in which we are able to assess the state of the game.

Do you think it will be useful?

More Details

More about algorithm: https://en.wikipedia.org/wiki/Minimax More about alpha-beta prunning: https://en.wikipedia.org/wiki/Alpha–beta_pruning