question archive Write the code step by step in Python 1) design a game called Tic-tac-toe by implementing the minimax search algorithm and follow the rules stated below: Initially the board should be blank with two opposed player, MAX and MIN

Write the code step by step in Python 1) design a game called Tic-tac-toe by implementing the minimax search algorithm and follow the rules stated below: Initially the board should be blank with two opposed player, MAX and MIN

Subject:Computer SciencePrice: Bought3

Write the code step by step in Python

1) design a game called Tic-tac-toe by implementing the minimax search algorithm and follow the rules stated below:

  • Initially the board should be blank with two opposed player, MAX and MIN.
  • The program should be the MAX player and the program will choose its action and you will be the MIN player and its actions will be put via keyboard input.
  • Your code should specify the best move and position for the MIN player.
  • It will have 3 values terminal state utilities:

-1 if player that seeks minimum wins

0 if it's a tie

1 if player that seeks maximum wins

  • After each MAX action, you must display the current board configuration and clear directions to the keyboard user (MIN) indicating how to enter an action.
  • You will denote MAX's action as X and MIN's action as O.
  • After the code execution, the output should display:

A case in which MAX wins

A case in which MIN wins (Can be omitted with explanation)

A case in which there is a tie

 

2) Now create the same Tic-tac-toe game and add alpha-beta search algorithm to prune it and follow the rules below:

  • Initially the board should be blank with two opposed player, MAX and MIN.
  • The program should be the MAX player and the program will choose its action and you will be the MIN player and its actions will be put via keyboard input.
  • Your code should specify the best move and position for the MIN player.
  • It will have 3 values terminal state utilities:

-1 if player that seeks minimum wins

0 if it's a tie

1 if player that seeks maximum wins

  • After each MAX action, you must display the current board configuration and clear directions to the keyboard user (MIN) indicating how to enter an action.
  • You will denote MAX's action as X and MIN's action as O.
  • After the code execution, the output should display:

A case in which MAX wins

A case in which MIN wins (Can be omitted with explanation)

A case in which there is a tie

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions