B C D E G I M P Q S T

B

BreadthFirstSearcher - class BreadthFirstSearcher.
BreadthFirstSearcher.java - a simple implementation of breadth-first search.
BreadthFirstSearcher() - Constructor for class BreadthFirstSearcher
 
bucket1 - Variable in class BucketsNode
variable bucket1 - amount in first bucket
bucket2 - Variable in class BucketsNode
variable bucket2 - amount in second bucket
BucketsNode - class BucketsNode.
BucketsNode.java - Search node for buckets puzzle.
BucketsNode() - Constructor for class BucketsNode
Creates a BucketsNode instance and sets it to an initial search state.

C

childClone() - Method in class SearchNode
childClone - returns a clone of this node that has been made a child of this node and has a depth one greater than this.
clone() - Method in class PegSolitaireNode
clone - return a deep copy of this node.
clone() - Method in class SearchNode
clone - performs a DEEP clone (copy) of this node.

D

depth - Variable in class SearchNode
variable depth - search depth; 0 at the root search node; a child node has its parent node depth + 1.
DepthFirstSearcher - class DepthFirstSearcher.
DepthFirstSearcher.java - a simple iterative implementation of depth-first search.
DepthFirstSearcher() - Constructor for class DepthFirstSearcher
 
dequeue() - Method in class Queue
dequeue - remove and return the head item of the queue.

E

enqueue(Object) - Method in class Queue
enqueue - insert the given item at the queue tail.
equals(Object) - Method in class BucketsNode
equals - whether or not two BucketsNode objects have the same state.
equals(Object) - Method in class PegSolitaireNode
The equals method is especially useful for repeated state detection.
expand() - Method in class BucketsNode
expand - return a Vector of this node's children.
expand() - Method in class PegSolitaireNode
expand - return a (possibly empty) Vector of this node's children
expand() - Method in class SearchNode
expand - return a (possibly empty) Vector of this node's children.

G

getGoalNode() - Method in class Searcher
getGoalNode - Returns a goal node if the previous search was successful, and null otherwise.
getNodeCount() - Method in class Searcher
getNodeCount - Returns the number of nodes examined (goal-checked) in the previous search.

I

isEmpty() - Method in class Queue
isEmpty - return whether or not the queue is empty
isGoal() - Method in class BucketsNode
isGoal - test whether or not the current node is a goal node.
isGoal() - Method in class PegSolitaireNode
isGoal - test whether or not the current node is a goal node.
isGoal() - Method in class SearchNode
isGoal - test whether or not the current node is a goal node.

M

main(String[]) - Static method in class Queue
 
main(String[]) - Static method in class SearchTest
main - apply a search algorithm to a root search node
MAX_AMOUNT1 - Variable in class BucketsNode
variable MAX_AMOUNT1 - max amount in first bucket
MAX_AMOUNT2 - Variable in class BucketsNode
variable MAX_AMOUNT2 - max amount in second bucket

P

parent - Variable in class SearchNode
variable parent - parent search node; null if and only if node is the root of the search tree.
PegSolitaireNode - class PegSolitaireNode.
PegSolitaireNode.java - Traditional 5-on-a-side Triangle Peg Solitaire; Goal: to leave one peg after removal of all others via linear jumps.
PegSolitaireNode() - Constructor for class PegSolitaireNode
Creates a PegSolitaireNode instance and sets it to an initial search state.
printGoalPath() - Method in class Searcher
printGoalPath - If the previous search was successful, print each node along the goal path in sequence starting with the root node.

Q

Queue - class Queue.
Queue.java - a queue of Objects
Queue() - Constructor for class Queue
 

S

search(SearchNode) - Method in class BreadthFirstSearcher
search - given an initial node, perform breadth-first search.
search(SearchNode) - Method in class DepthFirstSearcher
search - given an initial node, perform depth-first search (DFS).
search(SearchNode) - Method in class Searcher
search - Search for a goal node starting at the given "root" SearchNode, and return whether or not a goal node was found.
Searcher - class Searcher.
Searcher.java - a superclass for AI searcher classes.
Searcher() - Constructor for class Searcher
 
SearchNode - class SearchNode.
SearchNode.java - a simple node for uninformed AI search (assuming cost equals depth).
SearchNode() - Constructor for class SearchNode
Creates an SearchNode instance and sets it to an initial search state.
SearchTest - class SearchTest.
SearchTest - apply a search algorithm to a root search node
SearchTest() - Constructor for class SearchTest
 
size() - Method in class Queue
size - return the number of items in the queue

T

test() - Static method in class Queue
test - a random test harness that randomly enqueues/dequeues a sequence of Integer objects, checking the correctness of each dequeue result.
toString() - Method in class BucketsNode
toString - string representation of state
toString() - Method in class PegSolitaireNode
toString - especially useful for debugging, tracing search execution, reporting results, etc.
toString() - Method in class Queue
toString - return a String representation of the queue.

B C D E G I M P Q S T