Working general problem solver