This is a chess playing bot written in Swift.
Here is a summary of it's working principle:
- It utilizes the well-known minimax algorithm for constructing decision trees.
- Then it prunes that tree using alpha-beta pruning algorithm.
- After pruning it traverses that tree, evaluates the highest ranked move and plays it.
- The depth of decision tree is 2.
Here's a screenshot of the bot playing itself:
Please see the following files for more information:
Graphical programming is done in Apple's SceneKit framework (used for 3D graphics programming).