A Plan Recognition Algorithm Based on the Probabilistic Goal Graph