Created attachment 128 [details] invalid score After update GameBoare.getBoard() function returning a clone of board instead of reference, AiPlayer minmax() gave invalid score causing AiPlayer cannot make the right move. Further investigation shows that it may be caused by the recursion.
After investing, it seems that the recursion in minmax() needs the board reference to make the algorithm work properly. Overriding getBoard() in DefaultGameBoard to return the reference seems to solve the problem