The most beautiful experience we can have is the mysterious.

Unbeatable Noughts & Crosses

Deep Blue Algorithm (Minimax)

The AI algorithm Minimax is used to decide the next best move in two player games like chess and go zero-sum games. It goes through all the possible moves between two players, and scores each simulated game result according to the end status: If the AI player wins, it is given a positive score If the opponent player wins, it is given a negative score If it is a draw, it is given score 0 The scores will be rolled up to their upper level nodes:

Estimate Pi

Monte Carlo Method

Area of square: $$S_s = L*L$$ Area of circle: $$S_c = Pi*(L/2)2$$ Draw random dots, with sufficient dots, the probability of dots appearing in the circle approaximately equals the area of the circle within the area of the square: $$N_c ⁄ N_c ≈ S_c ⁄ S_s = (Pi*(L/2)2) ⁄ (L*L)$$ $$=> Pi = N_c ⁄ N_s *4 $$ Play the demo here Code in Github