Reputation: 33
I want to implement the Minimax algorithm in java. I couldnt find a good tree representation. Is there an existing one or should I make my own?
Upvotes: 0
Views: 615
Reputation: 86391
You don't need one.
The minimax algorithm is frequently illustrated with a tree.
However, that tree represents the steps taken by the algorithm to choose the best move. It is not a data structure held by the algorithm.
Instead, you'll use iteration and recursion. At each interior node of the tree, you'll iterate through the children, and use recursion on each child.
Upvotes: 1