Question: public int [ ] minimax ( char player ) { int [ ] bestMove = { - 1 , - 1 } ; int bestScore
public int minimaxchar player
int bestMove ;
int bestScore player O Integer.MINVALUE : Integer.MAXVALUE;
for int i ; i ; i
for int j ; j ; j
if aijvalue
aijvalue player;
int score minimaxScorefalse;
aijvalue ;
if player O && score bestScoreplayer X && score bestScore
bestScore score;
bestMove i;
bestMove j;
return bestMove;
in this code it doesn't give me the shortest path for win Modify it
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
