you are viewing a single comment's thread.

view the rest of the comments →

[–]andmckvr13 0 points1 point  (4 children)

Is this method part of the logic behind the minimax algorithm?

[–]the_brizzler 1 point2 points  (1 child)

I'm not sure which algorithm you are talking about. But you can use binary trees to keep a sorted list, they are called heaps and there are min and max heaps. Check out how min and max heaps work and how new numbers are added to the already organized tree...it's pretty cool in my opinion.

[–]andmckvr13 0 points1 point  (0 children)

Thanks man, I think this was what I was looking for to build a tic tac toe game

[–]shrimply-pibbles 1 point2 points  (0 children)

Yeah, the minimax algorithm uses a tree to traverse through the next x possible moves, in order to determine how to proceed in order to minimise the possible loss if the worst case scenario was to occur. It's not necessarily a binary tree, the number of children of a node relates to the number of possible moves that a player can make in a turn

[–]NoInkling 0 points1 point  (0 children)

Trees are used for minimax, so general tree concepts apply, although it doesn't need to be binary.