In C++ , you have to implement minimax algorithm with Alpha Beta pruning to play to Othello game in this part of code in the main function . PLZ MAKE SURE TO ADD ALL THE FUNCTIONS NEEDED TO IMPLEMENT THIS CODE : if(moi == player) { auto actionsPossible = listDesCoupsPossible(); // TODO : CHOOSE THE BEST MOVE //////////// std::tie(row, col) = actionsPossible[ rand()%actionsPossible.size() ]; // Choix alatoire std::cout << row << col << '\n' << std::flush; ////////////////////////////////////////////// } Here is the whole code to understand : #include #include #include #include #include std::vector> board; char player = 'X'; void initBoard() { board.resize(8, std::vector(8, '-')); board[3][3] = 'X'; board[3][4] = 'O'; board[4][3] = 'O'; board[4][4] = 'X'; } bool isValidMove(int x, int y, char player) { if (x < 0 || x >= board.size() || y < 0 || y >= board[x].size()) return false; // Vrifier si la case est dans les limites du plateau de jeu if (board[x][y] != '-') return false; // Vrifier si la case est vide // Vrifier les huit directions autour de la case for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { if (i == 0 && j == 0) continue; // On ignore la case actuelle int k = 1; while (true) { int newX = x + i * k; int newY = y + j * k; if (newX < 0 || newX >= board.size() || newY < 0 || newY >= board[newX].size()) break; // Sortir si on est en dehors du plateau if (board[newX][newY] == '-') break; // Sortir si la case est vide if (board[newX][newY] == player) { if (k > 1) { return true; // Si on a trouv une pice du joueur actuel aprs avoir trouv une pice de l'autre joueur, alors le coup est valide } break; } k++; } } } return false; } void playMove(int x, int y) { assert( isValidMove(x, y, player) ); board[x][y] = player; // Placer la pice du joueur actuel sur la case choisie // Vrifier les huit directions autour de la case for (int i = -1; i <= 1; i++) { for (int j = -1; j <= 1; j++) { if (i == 0 && j == 0) continue; // On ignore la case actuelle int k = 1; while (true) { int newX = x + i * k; int newY = y + j * k; if (newX < 0 || newX >= board.size() || newY < 0 || newY >= board[newX].size()) break; if (board[newX][newY] == '-') break; // Sortir si la case est vide if (board[newX][newY] == player) { if (k > 1) { for(int k2 = k-1; k2 > 0; k2--) { int newX = x + i * k2; int newY = y + j * k2; board[newX][newY] = player; } break; } break; } k++; } } } } // Switch players if the other player can play, if not the player keeps the hand. If no one can play, returns false bool switchPlayer() { char newPlayer = (player == 'X') ? 'O' : 'X'; for (int i = 0; i < board.size(); i++) { for (int j = 0; j < board[i].size(); j++) { if (isValidMove(i, j, newPlayer)) { player = newPlayer; return true; } } } for (int i = 0; i < board.size(); i++) { for (int j = 0; j < board[i].size(); j++) { if (isValidMove(i, j, player)) { return true; } } } return false; } int scoreX() { int X = 0; int O = 0; for(auto &line: board) { for(auto c: line) { X += (c == '.