Skip to content

Commit c2a7ff5

Browse files
committed
SearchInfrastructure removed.
1 parent 5da397a commit c2a7ff5

File tree

3 files changed

+32
-25
lines changed

3 files changed

+32
-25
lines changed

aima-core/src/main/java/aima/core/search/framework/SearchForActions.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
import aima.core.search.framework.problem.Problem;
77

88
/**
9-
* Interface for all search algorithms which store at least a part of the
10-
* exploration history as search tree and return a list of actions which lead
11-
* from the initial state to a goal state.
9+
* Interface for all AIMA3e search algorithms which store at least a part of the
10+
* exploration history as search tree and return a list of actions leading from
11+
* the initial state to a goal state. This search framework expects all search
12+
* algorithms to provide some metrics and to actually explore the search space
13+
* by expanding nodes.
1214
*
1315
* @author Ruediger Lunde
1416
*
1517
*/
16-
public interface SearchForActions extends SearchInfrastructure {
18+
public interface SearchForActions {
1719
/**
1820
* Returns a list of actions to the goal if the goal was found, a list
1921
* containing a single NoOp Action if already at the goal, or an empty list
@@ -27,4 +29,15 @@ public interface SearchForActions extends SearchInfrastructure {
2729
* empty list if the goal could not be found.
2830
*/
2931
List<Action> search(Problem p);
32+
33+
/**
34+
* Returns all the metrics of the search.
35+
*/
36+
Metrics getMetrics();
37+
38+
/**
39+
* Returns the node expander used by the search. Useful for progress
40+
* tracing.
41+
*/
42+
NodeExpander getNodeExpander();
3043
}

aima-core/src/main/java/aima/core/search/framework/SearchForStates.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
import aima.core.search.framework.problem.Problem;
44

55
/**
6-
* Interface for all search algorithms which forget the exploration history and
7-
* return just a single state which is hopefully a goal state.
6+
* Interface for all AIMA3e search algorithms which forget the exploration history and
7+
* return just a single state which is hopefully a goal state. This search framework expects
8+
* all search algorithms to provide some metrics and to actually explore the search space
9+
* by expanding nodes.
810
*
911
* @author Ruediger Lunde
1012
*
1113
*/
12-
public interface SearchForStates extends SearchInfrastructure {
14+
public interface SearchForStates {
1315
/**
1416
* Returns a state which is might be but not necessary is a goal state of
1517
* the problem.
@@ -20,4 +22,14 @@ public interface SearchForStates extends SearchInfrastructure {
2022
* @return a state.
2123
*/
2224
Object searchState(Problem p);
25+
26+
/**
27+
* Returns all the metrics of the search.
28+
*/
29+
Metrics getMetrics();
30+
31+
/**
32+
* Returns the node expander used by the search. Useful for progress tracing.
33+
*/
34+
NodeExpander getNodeExpander();
2335
}

aima-core/src/main/java/aima/core/search/framework/SearchInfrastructure.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)