Skip to content

Instantly share code, notes, and snippets.

View omar-el-samahy's full-sized avatar

Omar El Samahy omar-el-samahy

View GitHub Profile
@Da9el00
Da9el00 / AdversarialSearchTicTacToe.java
Created March 28, 2022 14:33
Tic-Tac-Toe Minimax search AI
import java.util.ArrayList;
public class AdversarialSearchTicTacToe {
public int minMaxDecision(State state){
ArrayList<State> possibleMoves = successorsOf(state);
ArrayList<Integer> movesList = new ArrayList<>();
for (State states: possibleMoves) {