Skip to content

Shafeli/MiniMax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

🧠 Minimax Bot — TicTacToe & Connect Four AI

A C++ game-playing bot that uses the Minimax algorithm with Alpha-Beta Pruning to efficiently evaluate and play TicTacToe and Connect Four. This project was built to explore decision trees, game theory, and basic AI optimization.


🤖 What It Does

  • Plays TicTacToe and Connect Four against a human
  • Uses a recursive Minimax algorithm to evaluate best moves
  • Implements Alpha-Beta Pruning to skip irrelevant branches and speed up search
  • Evaluates win/loss/tie states and dynamically searches based on board size

🎯 Key Concepts

  • Game Trees: Simulates future moves and outcomes by recursively evaluating board states
  • Minimax: Chooses moves that maximize the AI's chance of winning while minimizing the opponent's
  • Alpha-Beta Pruning: Optimizes Minimax by skipping branches that won’t influence the outcome

🧠 What I Learned

  • Implementing recursive algorithms cleanly in C++
  • Applying pruning logic to dramatically reduce search space
  • Modeling turn-based board games in memory
  • Balancing evaluation depth and runtime (especially in Connect Four)

About

Project for learning search based AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published