Name: Kevin Du
UTEID: kd9357

Q1: If the agent has no more food, the game is won. If the player does not move at all, it is a poor decision. If the player is too cloase to an unafraid ghost, it is a poor decision. Otherwise, return the inverse of the closest food pellet plus the score so far.
Q2: Define two functions maxValue and minValue, where maxValue returns the maximum score a minimizing agent might return, and minValue returns the minimum value a maximizing agent might return. minValue will run for each ghost on the field, in the specified order, and once all ghosts have made their decision will go one level deeper and calculate maxValue of the agent, until the specified depth has been reached. Return the direction that produces the best score once the tree has been searched.
Q3: Same as above, except alpha and beta are added. In maxValue, if the score found is greater than beta than immediately return the score. Otherwise update alpha to be the highest value found. In minValue, if the score found is less than alpha than immediately return the score. Otherwise update beta to be the smallest value found. Return the direction that produces the best score once the tree has been pruned and searched.
Q4: Same as Q2, except instead of minValue, expectedValue tallies the probable action and value for each ghost rather than finding the minimum value. 
Q5: If the game is a win or loss, immediately return. Otherwise calculate the closest food and add the inverse distance to the score. Punish idling by subtracting remaining food pellets from the score heavily. If the ghosts are unafraid, reward the agent by maintaining a distance from the closest ghost of at least 3. If the ghosts are afraid, reward the agent for being near the ghosts and add remaining time to the score. Finally, weight the reward of food and the reward for ghosts separately, and combine with the currentGame score