|
1 | 1 | /** |
2 | | - * This package (together with its subpackages) contains base |
3 | | - * classes for search algorithm implementations. Many search algorithms are |
4 | | - * basically queue-based algorithms. They construct a tree of nodes which |
5 | | - * represents the possible sequences of actions and the corresponding resulting |
6 | | - * states. A queue is used to manage and prioritize the current end points of |
7 | | - * already analyzed sequences. |
| 2 | + * This package (together with its subpackages) contains base classes for search |
| 3 | + * algorithm implementations. Common interfaces are defined by |
| 4 | + * {@link SearchForActions} and {@link SearchForStates}. Most of the concrete |
| 5 | + * algorithms implement both of them. Many search algorithms are basically |
| 6 | + * queue-based algorithms. They construct a tree of nodes which represents the |
| 7 | + * possible sequences of actions and the corresponding resulting states. A queue |
| 8 | + * is used to manage and prioritize the current end points of already analyzed |
| 9 | + * sequences. |
8 | 10 | * |
9 | 11 | * <br> |
10 | 12 | * Specializations are possible in two ways: There are different ways to define |
|
18 | 20 | * <br> |
19 | 21 | * To support arbitrary combinations of different strategies for (A) and (B), |
20 | 22 | * the bridge pattern is used here. Different abstractions of search (so called |
21 | | - * search strategies) are provided as specializations of {@link SearchForActions} and |
22 | | - * especially {@link PrioritySearch}. Most of them delegate the work to some |
| 23 | + * search strategies) are provided as specializations of {@link PrioritySearch}. |
| 24 | + * They delegate the work of controlling the actual search to some |
23 | 25 | * {@link aima.core.search.framework.qsearch.QueueSearch} implementation. The |
24 | 26 | * most important concrete implementations are TreeSearch, GraphSearch, and |
25 | 27 | * BidirectionalSearch. |
26 | 28 | * |
| 29 | + * <br> |
| 30 | + * Here, all search strategies explore the search space by expanding nodes. A |
| 31 | + * central {@link NodeExpander} class is used for this purpose. The default |
| 32 | + * implementation should work for most purposes, but it is possible to equip |
| 33 | + * search algorithms with specialized versions (e.g. which modify path cost |
| 34 | + * computation - extra costs for move direction changes). The node structure is |
| 35 | + * needed when searching for sequences of actions (just follow parent links |
| 36 | + * after a goal state node was found). Defining search for states (e.g. in a |
| 37 | + * local search strategy) based on nodes makes sense, too. Nodes do not |
| 38 | + * necessary increase space complexity as long as parent links can be switched |
| 39 | + * off. However, by switching on parent links, those algorithms can be turned |
| 40 | + * into search for actions algorithms. Additionally, the common node expander |
| 41 | + * interface unifies progress tracing for all search algorithms (just add a node |
| 42 | + * listener to get notifications about expanded nodes). |
| 43 | + * |
27 | 44 | * @author Ruediger Lunde |
28 | 45 | */ |
29 | 46 |
|
|
0 commit comments