Skip to content

tebatalla/TicTacToeAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-tac-toe AI

Tic-tac-toe super computer that uses binary trees and Depth First Search (DFS) to evaluate outcomes in order to never lose :).

Play the super computer

To play, run

$ ruby lib/super_computer_player.rb

How does it work?

Before it makes a move, the super computer builds child boards that are simply all the moves the computer can make for that turn. The computer recursively builds further child boards of these boards in evaluating whether or not the end outcome of a particular child node could ever lead to victory or a draw if there are no more winning nodes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages