|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSciLib.AI.Search.TreeSearch
public class TreeSearch
This class contains some methods to handle the searching problems
| Field Summary | |
|---|---|
protected SearchNode |
goal
|
protected int |
round
|
protected SearchNode |
start
|
protected int |
step
|
| Constructor Summary | |
|---|---|
TreeSearch(SearchNode start,
SearchNode goal)
|
|
| Method Summary | |
|---|---|
SearchNode |
AStar(Application app,
boolean detail)
implements A* search algorithm |
java.util.LinkedList<SearchNode> |
BDS(Application app,
boolean detail)
implements Bidirectional search algorithm |
SearchNode |
BFS(Application app)
implements breadth-first search algorithm |
SearchNode |
BFS(Application app,
boolean detail)
implements breadth-first search algorithm |
int[] |
commonElement(java.util.LinkedList<SearchNode> list1,
java.util.LinkedList<SearchNode> list2,
Application app)
check if two lists are not disjoint |
SearchNode |
DFS(Application app,
boolean detail)
implements depth-first search algorithm |
SearchNode |
DLS(Application app,
int limit,
boolean detail)
implements depth-limited search algorithm |
int |
getRounds()
get rounds |
int |
getSteps()
get steps |
SearchNode |
HillClimbing(Application app)
implements Hill-Climbing algorithm |
SearchNode |
HillClimbing(Application app,
int roundLimit)
implements Hill-Climbing algorithm |
SearchNode |
IDAStar(Application app,
boolean detail)
implements IDA*-search algorithm |
SearchNode |
IDS(Application app,
boolean detail)
implements iterative-deepning search algorithm |
void |
initialState(SearchNode start)
set start node |
boolean |
isElement(java.util.LinkedList<SearchNode> list,
SearchNode n,
Application app)
check if a node belongs to a list of nodes |
Result |
RDFS(Application app)
implements RDFS-search algorithm |
void |
setGoal(SearchNode goal)
set goal node |
SearchNode |
SimulatedAnnealing(Application app,
Scheduler scheduler)
implements Simulated-Annealing algorithm |
SearchNode |
SimulatedAnnealing(Application app,
Scheduler scheduler,
int roundLimit)
implements Simulated-Annealing algorithm |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int step
protected int round
protected SearchNode start
protected SearchNode goal
| Constructor Detail |
|---|
public TreeSearch(SearchNode start,
SearchNode goal)
| Method Detail |
|---|
public int getSteps()
public int getRounds()
public void initialState(SearchNode start)
start - the initial state nodepublic void setGoal(SearchNode goal)
goal - the goal state nodepublic SearchNode BFS(Application app)
app - Application interface
public SearchNode BFS(Application app,
boolean detail)
app - Application interfacedetail - the option to show each step when searching
public boolean isElement(java.util.LinkedList<SearchNode> list,
SearchNode n,
Application app)
list - the list of nodesn - a SearchNode for checkingapp - Application interface
public int[] commonElement(java.util.LinkedList<SearchNode> list1,
java.util.LinkedList<SearchNode> list2,
Application app)
list1 - the list1 of nodeslist2 - the list2 of nodesapp - Application interface
public SearchNode DFS(Application app,
boolean detail)
app - Application interfacedetail - the option to show each step when searching
public SearchNode DLS(Application app,
int limit,
boolean detail)
app - Application interfacelimit - the depth limit for searchingdetail - the option to show each step when searching
public SearchNode IDS(Application app,
boolean detail)
app - Application interfacedetail - the option to show each step when searching
public java.util.LinkedList<SearchNode> BDS(Application app,
boolean detail)
app - Application interfacedetail - the option to show each step when searching
public SearchNode AStar(Application app,
boolean detail)
app - Application interface
public SearchNode IDAStar(Application app,
boolean detail)
app - Application interface
public Result RDFS(Application app)
app - Application interface
public SearchNode HillClimbing(Application app)
app - Application interface
public SearchNode HillClimbing(Application app,
int roundLimit)
app - Application interfaceroundLimit - The maximum number of rounds, an integer
public SearchNode SimulatedAnnealing(Application app,
Scheduler scheduler)
app - Application interfacescheduler - the scheduler for annealing process
public SearchNode SimulatedAnnealing(Application app,
Scheduler scheduler,
int roundLimit)
app - Application interfacescheduler - the scheduler for annealing processroundLimit - The maximum number of rounds, an integer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||