Index
A B C D E F G H I K L M N O P Q R S T U V
All Classes|All Packages
All Classes|All Packages
All Classes|All Packages
A
- AbstractSolution - Class in rushhour
-
Wrapper for the heuristic homework solution.
- AbstractSolution(MovesFinder...) - Constructor for class rushhour.AbstractSolution
-
The constructor takes the implementations of A* with various heuristics as arguments.
- add(N) - Method in class search.Frontiers.DebuggablePriorityQueue
- add(N) - Method in class search.Frontiers.StateKeyedPriorityQueue
- add(Node) - Method in class search.Frontiers.PriorityQueue
- add(Node) - Method in class search.Frontiers.Queue
- add(Node) - Method in interface search.FrontierStructure
-
Adds a (usually newly-generated) tree node to the frontier.
- addCarsWhileSolvable() - Method in class rushhour.model.BoardStateBuilder
- addHorizontal(int, int, int) - Method in class rushhour.model.BoardStateBuilder
- addHorizontal(String, int, int, int) - Method in class rushhour.model.BoardStateBuilder
- addRandomCar() - Method in class rushhour.model.BoardStateBuilder
-
Add a car to a random open spots on this builder
- addVertical(int, int, int) - Method in class rushhour.model.BoardStateBuilder
- addVertical(String, int, int, int) - Method in class rushhour.model.BoardStateBuilder
- ANSI_BLUE_BACKGROUND - Static variable in class rushhour.AbstractSolution
- ANSI_CYAN_BACKGROUND - Static variable in class rushhour.AbstractSolution
- ANSI_GREEN_BACKGROUND - Static variable in class rushhour.AbstractSolution
- ANSI_PURPLE_BACKGROUND - Static variable in class rushhour.AbstractSolution
- ANSI_RED_BACKGROUND - Static variable in class rushhour.AbstractSolution
- ANSI_RESET - Static variable in class rushhour.AbstractSolution
- ANSI_WHITE_BACKGROUND - Static variable in class rushhour.AbstractSolution
- ANSI_YELLOW_BACKGROUND - Static variable in class rushhour.AbstractSolution
- apply(BoardState) - Method in class rushhour.model.Move
- apply(PlacedCar, BoardState) - Method in enum rushhour.model.Move.Direction
- assertFreeInCol(String, int, int, int) - Method in class rushhour.model.BoardStateBuilder
- assertFreeInRow(String, int, int, int) - Method in class rushhour.model.BoardStateBuilder
- AStarFrontierSearcher<State,Node extends SearchTreeNode<Node,State> & KnowsOwnCost,Frontier extends Frontiers.PriorityQueue<Node>> - Class in search
-
Extension of
PriorityQueueSearcher
with A*'s prioritization formula f(n) = g(n)+h(n), still leaving the exact structure of the frontier as a configurable option. - AStarFrontierSearcher(Predicate<Node>, Function<Node, Double>, Function<Comparator<Node>, Supplier<? extends Frontier>>, Function<Frontier, ExploredSet<Node>>, Function<State, Node>) - Constructor for class search.AStarFrontierSearcher
-
Primary constructor for this class; other constructor relay to this one.
- AStarFrontierSearcher(Predicate<Node>, Function<Node, Double>, Function<Comparator<Node>, Supplier<? extends Frontier>>, Function<State, Node>) - Constructor for class search.AStarFrontierSearcher
-
Constructor for this class which does not maintain an explored set.
- AStarFrontierSearcher.PathNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreePathCostNode<State>>> - Class in search
-
A specialization of
AStarFrontierSearcher
to use a minimal implementation of hierarchical search tree nodes (with a state, accumulated cost, and pointer to a parent tree node), with the frontier implementation still exposed as a type parameter. - AStarFrontierSearcher.SimpleNodes<State,Frontier extends Frontiers.PriorityQueue<Nodes.SimpleTreeCostNode<State>>> - Class in search
-
A specialization of
AStarFrontierSearcher
to use a minimal implementation of unrelated search tree nodes (with a state and accumulated cost only), with the frontier implementation still exposed as a type parameter. - AStarSearcher<State,Node extends SearchTreeNode<Node,State> & KnowsOwnCost> - Class in search
-
Extension of
AStarFrontierSearcher
to fix the frontier structure with a minimal priority queue implementation. - AStarSearcher(Predicate<Node>, Function<Node, Double>, Function<Frontiers.PriorityQueue<Node>, ExploredSet<Node>>, Function<State, Node>) - Constructor for class search.AStarSearcher
-
Primary constructor for this class; other constructor relay to this one.
- AStarSearcher(Predicate<Node>, Function<Node, Double>, Function<State, Node>) - Constructor for class search.AStarSearcher
-
Constructor for this class which does not maintain an explored set.
- AStarSearcher.PathNodes<State> - Class in search
-
A specialization of
AStarSearcher
to use a minimal implementation of hierarchical search tree nodes (with a state, accumulated cost, and pointer to a parent tree node), with the frontier implementation still exposed as a type parameter. - AStarSearcher.SimpleNodes<State> - Class in search
-
A specialization of
AStarSearcher
to use a minimal implementation of unrelated search tree nodes (with a state and accumulated cost only), with the frontier implementation still exposed as a type parameter. - AT_GOAL - Static variable in class rushhour.model.Boards
-
A degenerate case which starts at the goal, suggested by Laik Ruetten.
- atGoal() - Method in class rushhour.model.PlacedCar
B
- board() - Method in class rushhour.model.BoardStateBuilder
-
Returns the (immutable) board described in this builder.
- BoardNode - Class in rushhour
-
Search tree node for building RushHour solution move sequences.
- BoardNode(double, BoardState, Move, BoardNode) - Constructor for class rushhour.BoardNode
-
Primary constructor.
- BoardNode(BoardState) - Constructor for class rushhour.BoardNode
-
Convenience constructor for a root tree node.
- Boards - Class in rushhour.model
-
Sample Rushhour boards.
- Boards() - Constructor for class rushhour.model.Boards
- BOARDS - Static variable in class rushhour.model.Boards
-
An immutable map from board names to initial states.
- BoardState - Class in rushhour.model
-
Model of one state of the Rushhour board.
- BoardStateBuilder - Class in rushhour.model
- BoardStateBuilder(int) - Constructor for class rushhour.model.BoardStateBuilder
- BoardStateBuilder(int, int, int, int) - Constructor for class rushhour.model.BoardStateBuilder
- boardString() - Method in class rushhour.model.BoardState
-
Return a string with the states of the board squares, for lazy hashing of boards.
- BreadthFirstFinder - Class in rushhour
-
Model solution finder for RushHour boards using breadth-first search.
- BreadthFirstFinder() - Constructor for class rushhour.BreadthFirstFinder
- BreadthFirstSearcher<State,Node extends SearchTreeNode<Node,State>> - Class in search
-
Specialization of the generic
GraphSearcher
to use a queue for its frontier, and thus erform breadth-first search. - BreadthFirstSearcher(Predicate<State>, Function<State, Node>) - Constructor for class search.BreadthFirstSearcher
- BreadthFirstSearcher(Supplier<GoalChecker<Node>>, Function<Frontiers.Queue<Node>, ExploredSet<Node>>, Function<State, Node>) - Constructor for class search.BreadthFirstSearcher
-
Primary constructor for this class.
- BreadthFirstSearcher(Supplier<GoalChecker<Node>>, Function<State, Node>) - Constructor for class search.BreadthFirstSearcher
-
Constructor which defaults to a
HashSet
on state elements for detecting previously-explored nodes. - build(Predicate<S>, Function<S, Iterable<S>>) - Static method in class search.BreadthFirstSearcher
C
- checkSolution(ArrayList<Move>) - Method in class rushhour.model.BoardState
-
Check whether a particular series of moves is a correct solution from this position.
- contains(Node) - Method in interface search.FrontierCheckingStructure
- contains(Node) - Method in class search.Frontiers.Queue
- CostAndStep(double, S) - Constructor for class search.Nodes.CostAndStep
- countOpen() - Method in class search.Frontiers.DebuggablePriorityQueue
- countOpen() - Method in class search.Frontiers.PriorityQueue
- countOpen() - Method in class search.Frontiers.Queue
- countOpen() - Method in interface search.FrontierStructure
-
Returns the number of open nodes sitting unexpanded in the frontier.
D
- D2_C1 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 1
- D2_C10 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 10, contributed by Nathan Diedrick
- D2_C11 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 11, contributed by Alec Phelps
- D2_C12 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 12, contributed by Wai Kit Khong
- D2_C13 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 13, contributed by Tristan Rooney
- D2_C14 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 14, contributed by Joey Fedor
- D2_C16 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 16, contributed by Benjamin Krueger
- D2_C18 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 18, contributed by Tyler Landowski
- D2_C19 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 19, contributed by Adam Yakes
- D2_C2 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 2, contributed by Laik Ruetten
- D2_C20 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 20, contributed by Zhenhao Zhou
- D2_C21 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 21, contributed by Zhenhao Zhou
- D2_C22 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 22, contributed by Adam Yakes
- D2_C23 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 23, contributed by Tyler Landowski
- D2_C25 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 25, contributed by Benjamin Krueger
- D2_C27 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 27, contributed by Joey Fedor
- D2_C28 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 28, contributed by Tristan Rooney
- D2_C29 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 29, contributed by Wai Kit Khong
- D2_C30 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 30, contributed by Alec Phelps
- D2_C31 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 31, contributed by Nathan Diedrick
- D2_C33 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 33, contributed by Josh Chianelli
- D2_C34 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 34, contributed by Danny Pierce
- D2_C35 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 35, contributed by Jackson Lee
- D2_C36 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 36, contributed by Sean Martens
- D2_C37 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 37, contributed by Connor Langley.
- D2_C39 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 39, contributed by Laik Ruetten
- D2_C4 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 4, contributed by Connor Langley
- D2_C40 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 40
- D2_C5 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 5, contributed by Sean Martens
- D2_C6 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 6, contributed by Jackson Lee
- D2_C7 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 7, contributed by Danny Pierce
- D2_C8 - Static variable in class rushhour.model.Boards
-
Deck 2, Card 8, contributed by Josh Chianelli
- debugDisplayFrontier() - Method in class search.Frontiers.DebuggablePriorityQueue
- debugDisplayFrontier() - Method in class search.Frontiers.DebuggingFrontier
- debugDisplayFrontier() - Method in class search.Frontiers.PriorityQueue
- debugDisplayFrontier() - Method in interface search.FrontierStructure
-
Print debugging information about the frontier.
- debugExpansion(Node) - Method in class search.GraphSearcher
-
This method prints a debugging message when a tree node is generated from another node extracted from the frontier for expansion.
- debugFrontier(Frontier) - Method in class search.GraphSearcher
-
Print debugging information about the frontier.
- debugFrontierAddition(Node) - Method in class search.AStarFrontierSearcher
-
This method prints a debugging message when a tree node is added to the frontier.
- debugFrontierAddition(Node) - Method in class search.GraphSearcher
-
This method prints a debugging message when a tree node is added to the frontier.
- debugFrontierExhausted(GoalChecker<Node>) - Method in class search.GraphSearcher
-
This method prints a debugging message when the frontier is emptied (which is usually an error situation).
- debugFrontierNonaddition(Node) - Method in class search.GraphSearcher
-
This method prints a debugging message when a tree node is not added to the frontier.
- debugFrontierRemoval(Node) - Method in class search.AStarFrontierSearcher
-
This method prints a debugging message when a tree node is removed from the frontier for expansion.
- debugFrontierRemoval(Node) - Method in class search.GraphSearcher
-
This method prints a debugging message when a tree node is removed from the frontier for expansion.
- debugFrontierRemoval(BoardNode) - Method in class rushhour.BreadthFirstFinder
- DebuggablePriorityQueue(Comparator<N>) - Constructor for class search.Frontiers.DebuggablePriorityQueue
- debuggablePriorityQueueFactory(Comparator<Node>) - Static method in class search.Frontiers
- DebuggingFrontier() - Constructor for class search.Frontiers.DebuggingFrontier
- debugGoalFound(Node) - Method in class search.GraphSearcher
- debugInitialNode(Node) - Method in class search.GraphSearcher
-
This method prints a debugging message about the initial tree node of a search.
- DEFAULT_BOARD_SIZE - Static variable in class rushhour.model.BoardState
-
The default size of the board, for when we do not specify it otherwise.
- DEFAULT_OUR_DEFAULT_LENGTH - Static variable in class rushhour.model.BoardState
-
The default length of the family car.
- DEFAULT_OUR_ROW - Static variable in class rushhour.model.BoardState
-
The default row one which the family car should live.
- doNotTrack() - Static method in class search.ExploredSets
-
Implementation which does not actually track anything.
- DOWN - rushhour.model.Move.Direction
E
- EMPTY_ARRAY - Static variable in class rushhour.model.PlacedCar
- equals(Object) - Method in class rushhour.BoardNode
- equals(Object) - Method in class rushhour.model.BoardState
-
Checks that two boards have the same cars in the same places.
- equals(Object) - Method in class rushhour.model.PlacedCar
- expand() - Method in class rushhour.BoardNode
- expand() - Method in class search.Nodes.SimpleTreeCostNode
-
Expands the search node into successor nodes.
- expand() - Method in class search.Nodes.SimpleTreeNode
-
Expands the search node into successor nodes.
- expand() - Method in class search.Nodes.SimpleTreePathCostNode
-
Expands the search node into successor nodes.
- expand() - Method in class search.Nodes.SimpleTreePathNode
-
Expands the search node into successor nodes.
- expand() - Method in interface search.SearchTreeNode
-
Expands the search node into successor nodes.
- ExploredSet<Node> - Interface in search
-
Methods required to track the nodes which we have already either added to the frontier, or removed from the frontier for exploration.
- ExploredSets - Class in search
-
Three sample implementations of ways to track nodes which we have already either added to the frontier, or removed from the frontier for exploration.
- ExploredSets() - Constructor for class search.ExploredSets
F
- filledAt(int, int) - Method in class rushhour.model.BoardState
-
Returns whether the board has a filled space at a particular row or column
- fillPath() - Method in class rushhour.BoardNode
- firstGoal(Predicate<Node>) - Static method in class search.GoalCheckers
-
Implementation that checks whether a tree node corresponds to a search goal, built on a predicate on search tree nodes.
- formatMoves(List<Move>) - Static method in class rushhour.model.Move
- FrontierCheckingStructure<Node> - Interface in search
-
Subclass of frontier representations which support checking membership of a node in the frontier.
- FrontierEmptyException - Exception in search
-
Thrown when a frontier structure is empty.
- FrontierEmptyException() - Constructor for exception search.FrontierEmptyException
- FrontierEmptyException(Throwable) - Constructor for exception search.FrontierEmptyException
-
Used when the underlying data structure of the frontier throws an exception.
- Frontiers - Class in search
-
Standard implementations of structures representing a frontier.
- Frontiers() - Constructor for class search.Frontiers
- Frontiers.DebuggablePriorityQueue<S,N extends SearchTreeNode<N,S>> - Class in search
- Frontiers.DebuggingFrontier<Node> - Class in search
-
Abstract class adding debugging hooks to the basic frontier.
- Frontiers.PriorityQueue<Node> - Class in search
-
A frontier as a priority queue, for e.g.
- Frontiers.Queue<Node> - Class in search
-
A queue as a priority queue, for e.g.
- Frontiers.StateKeyedPriorityQueue<S,N extends SearchTreeNode<N,S>> - Class in search
- FrontierStructure<Node> - Interface in search
-
Methods required of a representation of a search tree frontier.
G
- GameException - Exception in rushhour.model
- GameException(Move.Direction, PlacedCar) - Constructor for exception rushhour.model.GameException
- get() - Method in interface search.GoalChecker
-
When a search exhausts the frontier, this method can return the result, or else should throw a
SearchFailureException
. - getBoard() - Method in exception rushhour.model.MoveCollisionException
- getBoardSize() - Method in class rushhour.model.BoardState
-
Returns the size of this (square) board.
- getBuilder() - Method in exception rushhour.model.PlacementCollisionException
- getCar() - Method in class rushhour.model.Move
- getCol() - Method in class rushhour.model.PlacedCar
- getColChange() - Method in enum rushhour.model.Move.Direction
- getColumn() - Method in exception rushhour.model.PlacementCollisionException
- getCost() - Method in class rushhour.BoardNode
- getCost() - Method in interface search.KnowsOwnCost
- getCost() - Method in class search.Nodes.CostAndStep
- getDebug() - Method in class search.GraphSearcher
-
Returns whether execution of the
GraphSearcher.search(State)
method is printing debugging messages. - getDir() - Method in exception rushhour.model.GameException
- getDirection() - Method in class rushhour.model.Move
- getDirection() - Method in exception rushhour.model.MoveException
- getId() - Method in class rushhour.model.PlacedCar
- getLastAddedToFrontier() - Method in interface rushhour.Runners
-
Capture the total number of nodes added to the frontier after a call to
Runners.search(rushhour.model.BoardState)
. - getLastAddedToFrontier() - Method in class search.GraphSearcher
-
Returns the number of frontier nodes which were added to the last search.
- getLastExpandedFromFrontier() - Method in interface rushhour.Runners
-
Capture the total number of nodes expanded from the frontier after a call to
Runners.search(rushhour.model.BoardState)
. - getLastExpandedFromFrontier() - Method in class search.GraphSearcher
-
Returns the number of frontier nodes which were expanded in the last search.
- getLastNotAddedToFrontier() - Method in class search.GraphSearcher
-
Returns the number of frontier nodes which were generated from an expanded node, but not added to the last search.
- getLastUnexpandedInFrontier() - Method in class search.GraphSearcher
-
Returns the number of frontier nodes which were expanded in the last search.
- getLength() - Method in class rushhour.model.PlacedCar
- getMove() - Method in class rushhour.BoardNode
- getName() - Method in class rushhour.model.PlacedCar
- getName() - Method in exception rushhour.model.PlacementCollisionException
- getParent() - Method in class rushhour.BoardNode
- getParent() - Method in interface search.SearchTreePathNode
-
Returns the node from which this node was expanded.
- getPlacedCar() - Method in exception rushhour.model.GameException
- getPlacedCar() - Method in exception rushhour.model.MoveException
- getRow() - Method in class rushhour.model.PlacedCar
- getRow() - Method in exception rushhour.model.PlacementCollisionException
- getRowChange() - Method in enum rushhour.model.Move.Direction
- getState() - Method in class rushhour.BoardNode
- getState() - Method in class search.Nodes.CostAndStep
- getState() - Method in interface search.SearchTreeNode
-
Returns the search state underlying this node.
- getValidMoves() - Method in class rushhour.model.BoardState
-
Returns a container from which the valid moves at this position may be iterated.
- GoalChecker<Node> - Interface in search
-
Methods required of objects which check that a tree node corresponds to a search goal.
- goalCheckerFactory(Predicate<S>) - Static method in class search.GoalCheckers
-
Implementation that checks whether a tree node corresponds to a search goal, built on a predicate on search states.
- GoalCheckers - Class in search
-
Sample implementations of checkers that a tree node corresponds to a search goal.
- GoalCheckers() - Constructor for class search.GoalCheckers
- GraphSearcher<State,Node extends SearchTreeNode<Node,State>,Frontier extends FrontierStructure<Node>> - Class in search
-
Topmost class encapsulating graph search.
- GraphSearcher(Supplier<GoalChecker<Node>>, Supplier<? extends Frontier>, Function<Frontier, ExploredSet<Node>>, Function<State, Node>) - Constructor for class search.GraphSearcher
-
The constructor parameters encode the particlar behavior which distinguishes different search algorithms.
H
- hasGoalState() - Method in class rushhour.BoardNode
- hashCode() - Method in class rushhour.BoardNode
- hashCode() - Method in class rushhour.model.BoardState
-
Output representations are unique enough, so just build and return its hash code.
- hashCode() - Method in class rushhour.model.PlacedCar
- hCar(String, int, int) - Method in class rushhour.model.BoardStateBuilder
- hTruck(String, int, int) - Method in class rushhour.model.BoardStateBuilder
I
- IllegalMoveException - Exception in rushhour.model
- IllegalMoveException(Move.Direction, PlacedCar) - Constructor for exception rushhour.model.IllegalMoveException
- impactFor(int, int, PlacedCar) - Static method in enum rushhour.model.Move.Direction
- initializer(Function<S, Iterable<S>>) - Static method in class search.Nodes.SimpleTreeNode
-
Returns a factory for tree nodes given an expander from a state to the states underlying expanded nodes.
- initializer(Function<S, Iterable<S>>) - Static method in class search.Nodes.SimpleTreePathNode
-
Returns a factory for parent-tracking tree nodes, given an expander from a state to the states underlying expanded nodes.
- initializer(Function<S, Iterable<Nodes.CostAndStep<S>>>) - Static method in class search.Nodes.SimpleTreeCostNode
-
Returns a factory for tree nodes with costs, given an expander from a state to the states underlying its expanded nodes.
- initializer(Function<S, Iterable<Nodes.CostAndStep<S>>>) - Static method in class search.Nodes.SimpleTreePathCostNode
-
Returns a factory for tree nodes with track both their parent and their own cost, given an expander from a state to the states underlying expanded nodes.
- isEmpty() - Method in class search.Frontiers.DebuggablePriorityQueue
- isEmpty() - Method in class search.Frontiers.PriorityQueue
- isEmpty() - Method in class search.Frontiers.Queue
- isEmpty() - Method in interface search.FrontierStructure
-
Checks whether any tree nodes remain in the frontier
- isGoalState() - Method in class rushhour.model.BoardState
-
Checks whether this state solves the puzzle by allowing the family car to escape.
- isTargetCar() - Method in class rushhour.model.PlacedCar
- isVertical() - Method in class rushhour.model.PlacedCar
K
- KnowsOwnCost - Interface in search
-
Additional interface implemented by search tree nodes which are aware of their own cost.
L
- LEFT - rushhour.model.Move.Direction
- liftHeuristic(Function<S, Double>) - Static method in class search.Nodes
- liftPredicate(Predicate<S>) - Static method in class search.GoalCheckers
-
Converts a predicate on search states into a predicate on search tree nodes.
M
- main(String[]) - Static method in class rushhour.BreadthFirstFinder
-
Tests the given sample boards using BFS.
- main(String[]) - Static method in class rushhour.model.Boards
-
Main routine shows a little catalog of the boards.
- main(String[]) - Static method in class rushhour.model.BoardStateBuilder
- Move - Class in rushhour.model
- Move(Move.Direction, PlacedCar) - Constructor for class rushhour.model.Move
- Move.Direction - Enum in rushhour.model
- MoveCollisionException - Exception in rushhour.model
- MoveCollisionException(Move.Direction, PlacedCar, BoardState) - Constructor for exception rushhour.model.MoveCollisionException
- MoveException - Exception in rushhour.model
- MoveException(Move.Direction, PlacedCar) - Constructor for exception rushhour.model.MoveException
- MovesFinder - Class in rushhour
-
Superclass for the various A* approaches to be tested in this homework.
- MovesFinder(Function<BoardState, Double>) - Constructor for class rushhour.MovesFinder
N
- Nodes - Class in search
-
Sample implementations of search tree nodes.
- Nodes() - Constructor for class search.Nodes
- Nodes.CostAndStep<S> - Class in search
-
Helper class for search tree node expansion bundling a node and its associated cost.
- Nodes.SimpleTreeCostNode<S> - Class in search
-
Implementation of search tree nodes with a notion of cost.
- Nodes.SimpleTreeNode<S> - Class in search
-
Simple implementation of search tree nodes, expecting that the
Exp
type argument of theNodes.SimpleCoreTreeNode
will be just the search state type. - Nodes.SimpleTreePathCostNode<S> - Class in search
-
Implementation of search tree nodes which have a notion of cost, and which contain links to their parent node.
- Nodes.SimpleTreePathNode<S> - Class in search
-
Implementation of search tree nodes which retain a link to their parent.
- nodesFrom(long, double) - Method in class rushhour.AbstractSolution
- NONE - rushhour.model.Move.Direction
- NONE - Static variable in class rushhour.model.Move
- noteExplored(Node) - Method in interface search.ExploredSet
-
Called by the
search
method with a node when it is removed from the frontier for exploration. - noteInitial(Node) - Method in interface search.ExploredSet
-
Called by the
search
method with the initial tree node.
O
- ONLY_GOAL - Static variable in class rushhour.model.Boards
-
A "sanity check" example with only the goal car on the board.
- openSpots() - Method in class rushhour.model.BoardStateBuilder
-
Pull a list of spots where a another vehicle could go
P
- PathNodes(Predicate<State>, Function<State, Double>, Function<Comparator<Nodes.SimpleTreePathCostNode<State>>, Supplier<? extends Frontier>>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarFrontierSearcher.PathNodes
-
Constructor for this class which does not maintain an explored set.
- PathNodes(Predicate<State>, Function<State, Double>, Function<Comparator<Nodes.SimpleTreePathCostNode<State>>, Supplier<? extends Frontier>>, Function<State, Object>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarFrontierSearcher.PathNodes
-
Constructor for this class which maintains an explored set using a hashing of the state representations.
- PathNodes(Predicate<State>, Function<State, Double>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarSearcher.PathNodes
-
Constructor for this class which does not maintain an explored set.
- PathNodes(Predicate<State>, Function<State, Double>, Function<State, Object>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarSearcher.PathNodes
-
Constructor for this class which maintains an explored set using a hashing of the state representations.
- pathToString() - Method in interface search.SearchTreePathNode
- placed() - Method in class rushhour.model.BoardState
-
Returns the number of cars placed on the board.
- PlacedCar - Class in rushhour.model
- PlacedCar(int, boolean, int, int, int, int) - Constructor for class rushhour.model.PlacedCar
- PlacedCar(int, String, boolean, int, int, int, int) - Constructor for class rushhour.model.PlacedCar
- placement(int) - Method in class rushhour.model.BoardState
-
Returns the placement of a particular car.
- PlacementCollisionException - Exception in rushhour.model
- PlacementCollisionException(String, int, int, BoardStateBuilder) - Constructor for exception rushhour.model.PlacementCollisionException
- pop() - Method in class search.Frontiers.DebuggablePriorityQueue
- pop() - Method in class search.Frontiers.PriorityQueue
- pop() - Method in class search.Frontiers.Queue
- pop() - Method in interface search.FrontierStructure
-
Removes one tree node from the frontier, and returns it.
- PriorityQueue(Comparator<Node>) - Constructor for class search.Frontiers.PriorityQueue
- priorityQueueFactory(Comparator<Node>) - Static method in class search.Frontiers
-
Factory for priority queue-based frontier implementations.
- PriorityQueueSearcher<State,Node extends SearchTreeNode<Node,State>,Frontier extends Frontiers.PriorityQueue<Node>> - Class in search
-
Specialization of the generic
GraphSearcher
to use a priority queue structure for its frontier. - PriorityQueueSearcher(Supplier<GoalChecker<Node>>, Comparator<Node>, Function<Comparator<Node>, Supplier<? extends Frontier>>, Function<Frontier, ExploredSet<Node>>, Function<State, Node>) - Constructor for class search.PriorityQueueSearcher
-
This constructor allows the comparison function to be specified separately from the frontier-creation process.
- PriorityQueueSearcher(Supplier<GoalChecker<Node>>, Supplier<? extends Frontier>, Function<Frontier, ExploredSet<Node>>, Function<State, Node>) - Constructor for class search.PriorityQueueSearcher
-
Primary constructor for this class.
Q
- Queue() - Constructor for class search.Frontiers.Queue
- queueFactory() - Static method in class search.Frontiers
R
- reify() - Method in class rushhour.model.BoardStateBuilder
-
Write down a Java expression for this builder state.
- reserveInCol(int, int, int, int) - Method in class rushhour.model.BoardStateBuilder
- reserveInRow(int, int, int, int) - Method in class rushhour.model.BoardStateBuilder
- RIGHT - rushhour.model.Move.Direction
- run() - Method in class rushhour.AbstractSolution
-
A sample runner for the solution: runs all of the solvers (plus BFS) on all of the sample boards, and shows the results as a table.
- Runners - Interface in rushhour
-
Provides methods for running sample boards to classes implementing Rushhour solution search via the standard graph search hierarchy.
- runSampleBoards() - Method in interface rushhour.Runners
-
Runs
Runners.search(rushhour.model.BoardState)
on all of the boards registered in theBoards.BOARDS
sample list. - runSearch(BoardState) - Method in interface rushhour.Runners
-
Expands one @{link BoardState}, and returns the sequence of moves in the solution.
- rushhour - package rushhour
-
Framework for solving a Rush Hour puzzle via graph search.
- rushhour.model - package rushhour.model
-
A model implementation of the Rush Hour game mechanics — the Rushhour board, cars, possible moves, etc.
S
- search - package search
-
A generic implementation of several of the graph search algorithms discussed in Russell and Norvig.
- search(BoardState) - Method in interface rushhour.Runners
-
This method for finding a path from start to stop state much be present.
- search(State) - Method in class search.GraphSearcher
-
Executes a search beginning from a particular search space element.
- SearchFailureException - Exception in search
-
Thrown from search algorithms when they find no solution.
- SearchFailureException() - Constructor for exception search.SearchFailureException
- SearchTreeNode<Self extends SearchTreeNode<Self,State>,State> - Interface in search
-
Methods required of a search tree node.
- SearchTreePathNode<This extends SearchTreePathNode<This,S>,S> - Interface in search
-
Type of search tree nodes which form a path of nodes, each expanded from its parent which is next in the path.
- setDebug(boolean) - Method in class search.GraphSearcher
-
Controls whether execution of the
GraphSearcher.search(State)
method should print debugging messages. - shouldAddToFrontier(Node) - Method in interface search.ExploredSet
-
Called by the
search
method to determine whether a node should be added to the frontier. - SimpleNodes(Predicate<State>, Function<State, Double>, Function<Comparator<Nodes.SimpleTreeCostNode<State>>, Supplier<? extends Frontier>>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarFrontierSearcher.SimpleNodes
-
Constructor for this class which does not maintain an explored set.
- SimpleNodes(Predicate<State>, Function<State, Double>, Function<Comparator<Nodes.SimpleTreeCostNode<State>>, Supplier<? extends Frontier>>, Function<State, Object>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarFrontierSearcher.SimpleNodes
-
Constructor for this class which maintains an explored set using a hashing of the state representations.
- SimpleNodes(Predicate<State>, Function<State, Double>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarSearcher.SimpleNodes
-
Constructor for this class which does not maintain an explored set.
- SimpleNodes(Predicate<State>, Function<State, Double>, Function<State, Object>, Function<State, Iterable<Nodes.CostAndStep<State>>>) - Constructor for class search.AStarSearcher.SimpleNodes
-
Constructor for this class which maintains an explored set using a hashing of the state representations.
- SimpleTreeCostNode(Function<S, Iterable<Nodes.CostAndStep<S>>>, double, S) - Constructor for class search.Nodes.SimpleTreeCostNode
-
Sole constructor for this class.
- SimpleTreeNode(Function<S, Iterable<S>>, S) - Constructor for class search.Nodes.SimpleTreeNode
-
Sole constructor for this class.
- SimpleTreePathCostNode(Function<S, Iterable<Nodes.CostAndStep<S>>>, double, S) - Constructor for class search.Nodes.SimpleTreePathCostNode
- SimpleTreePathCostNode(Nodes.SimpleTreePathCostNode<S>, double, S) - Constructor for class search.Nodes.SimpleTreePathCostNode
- SimpleTreePathNode(Function<S, Iterable<S>>, S) - Constructor for class search.Nodes.SimpleTreePathNode
- SimpleTreePathNode(Nodes.SimpleTreePathNode<S>, S) - Constructor for class search.Nodes.SimpleTreePathNode
- solvable() - Method in class rushhour.model.BoardStateBuilder
- solvable(State) - Method in class search.GraphSearcher
-
Convenience method for when we care only about whether a solution exists, and not what it is.
- standard(int) - Static method in class rushhour.model.BoardStateBuilder
- StateKeyedPriorityQueue(Comparator<N>) - Constructor for class search.Frontiers.StateKeyedPriorityQueue
- stateKeyedPriorityQueueFactory(Comparator<Node>) - Static method in class search.Frontiers
- statePath() - Method in interface search.SearchTreePathNode
-
Returns the sequence of nodes, starting with the initial state's node at index 0, leading to this node.
- statePath(ArrayList<S>) - Method in interface search.SearchTreePathNode
-
Write the sequence of nodes starting with the initial state's node and leading to this node into the given
ArrayList
.
T
- toString() - Method in class rushhour.BoardNode
- toString() - Method in class rushhour.model.BoardState
- toString() - Method in enum rushhour.model.Move.Direction
- toString() - Method in class rushhour.model.Move
- toString() - Method in exception rushhour.model.MoveCollisionException
- toString() - Method in exception rushhour.model.PlacementCollisionException
- toString(String) - Method in class rushhour.model.BoardState
-
Returns the string representation, with a given indentation.
- toString(StringBuilder) - Method in class rushhour.model.BoardState
-
Helper method for
BoardState.toString()
using a threadedStringBuilder
. - toString(StringBuilder, String) - Method in class rushhour.model.BoardState
-
Full helper method for
BoardState.toString()
. - trackGeneratedByArtifactHashSet(Function<N, A>) - Static method in class search.ExploredSets
-
Implementation which tracks nodes using a hash table of some artifact constructed from the nodes.
- trackStateByHashSet() - Static method in class search.ExploredSets
-
Implementation which tracks nodes using a hash table of the underlying node states.
U
- undoLastCar() - Method in class rushhour.model.BoardStateBuilder
-
Back out of the last (probably random) add
- UP - rushhour.model.Move.Direction
V
- valueOf(String) - Static method in enum rushhour.model.Move.Direction
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum rushhour.model.Move.Direction
-
Returns an array containing the constants of this enum type, in the order they are declared.
- vCar(String, int, int) - Method in class rushhour.model.BoardStateBuilder
- vTruck(String, int, int) - Method in class rushhour.model.BoardStateBuilder
All Classes|All Packages