edu.ou.pacman.heuristic
Class PacmanPathFinding

java.lang.Object
  extended by edu.ou.pacman.heuristic.PacmanPathFinding

public final class PacmanPathFinding
extends java.lang.Object

Class to house static methods for pac-man's pathfinding heuristic methods.

Author:
Derek Rushing

Constructor Summary
PacmanPathFinding()
           
 
Method Summary
static Direction aStar(GameBoard board)
          Method to determine the direction a player should go using the aStar algorithm.
static Direction greedyBestFirst(GameBoard board)
          Method to determine the direction a player should go using the greedy best first search algorithm.
static Direction pelletFinder(GameBoard board)
          Check pacman's current location and shoot for the next pellet regardless of where the ghosts are.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacmanPathFinding

public PacmanPathFinding()
Method Detail

aStar

public static Direction aStar(GameBoard board)
Method to determine the direction a player should go using the aStar algorithm.

Parameters:
board - - The board to traverse.
Returns:
The direction to move the player.

greedyBestFirst

public static Direction greedyBestFirst(GameBoard board)
Method to determine the direction a player should go using the greedy best first search algorithm.

Parameters:
board - - The board to traverse.
Returns:
The direction to move the player.

pelletFinder

public static Direction pelletFinder(GameBoard board)
Check pacman's current location and shoot for the next pellet regardless of where the ghosts are. Not an efficient algorithm, but does not get stuck in any set location.

Parameters:
board - - The game board
Returns:
The direction pacman should be move.