General principles for problem solving