Game search tree, do I need to create a tree first?

There are many algorithms in the game search tree to get the optimal solution, such as the minimax algorithm. I am starting to learn how to solve this problem with a minimax algorithm, the algorithm is clear. but I am confused about the tree itself, in games like tic tac toe the number of node is not very large, but on others, such as chess, there are many nodes. I think this requires a lot of memory space. So are there any algorithms for evaluating and assembling the tree at the same time?

+3
source share
1 answer

The game state tree is usually not built as a complete data structure. Instead, states are evaluated as they are created, and most of them are discarded in the process. Often a linked list is maintained from a state that is evaluated back to the current state of the game. But if one move turns out to be much better than the other, then the entire line for poor movement will be discarded, so it will not take up memory space.

, , - . , , , . , ( ) . , , , . , , .

+3

Source: https://habr.com/ru/post/1770962/


All Articles