Add methods preorderIterator() and level Order I terator() to the Binary Node class. Each should return an Iterator which traverses the tree in the specified order. (Hint: Define two new classes, each implementing the Iterator interface. Each class needs a field of type Stack or Queue.)
Modify the Tic Tac Toe program so that it looks ahead only a certain number of moves. This number should be passed in to the constructor as an argument max Depth. Run a tournament between players with max depths of 1, 3, 5, 7, and 9. Explain whether searching deeper produces a better player.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here