Add General Problem Solver implementation from PAIP chapter 4