react-spring is being used to create animations.
minimax algorithm is being used to support ai's decisions to play.
minimax algorithm iterate the current state of the board and chooses the best move to play by evaluating all possible situations.
Demo