Answer the question
In order to leave comments, you need to log in
How to determine the sequence of actions?
Suppose there is a certain complex class C containing several fields (A1, A2, A3, etc.), and these fields are not numeric, but something more complex (strings there, or enums), that is, classical algebra for these data not applicable.
There is a finite list of actions that we can perform on this class, for example:
Answer the question
In order to leave comments, you need to log in
This is called state-space search. If you could build a graph - take all possible states of the field A1 x all possible states of the field A2... and draw from each edge corresponding to all possible actions, then it would be a dumb task to find a path in the graph.
The problem is that there are a lot of states. Therefore, the graph is not generated, but built on the fly. And then all the same, some kind of path-finding algorithm is launched in this graph. For example A*. Or dfs with all sorts of heuristic optimizations. The main thing is to wind up enough optimizations so that the algorithm does not touch too many states - because all the viewed states must be stored somehow in memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question