hw4 heuristic model