Skip to content

Arthur-Jacobina/tic-tac-toe-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIC TAC TOE Rust

Intro

This is a simple fun project designed to test the minimax algorithm in Rust

Tic Tac Toe

Tic Tac Toe is a popular game and its straightforward rules and manageable complexity make it a good starting point for exploring decision-making algorithms in games.

How to run

  1. Clone the repo
git clone https://github.com/Arthur-Jacobina/tic-tac-toe-rs.git
cd tic-tac-toe-ai
  1. Build the project
cargo build
  1. Run the game
cargo run
  1. Modify main as you want You can either play as a human or make Computer X Computer matches (I do not recommend it though haha)

Minimax algorithm

The minimax algorithm in player.rs evaluates all possible moves recursively to maximize the AI's chances of winning while minimizing the opponent's chances.

About

Minimax Tic Tac Toe AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages