Pitcher Problems: A Case Study in Using Search Trees

  1. The problem
  2. First: Do it by hand
  3. Second: Notice what you did
  4. Third: Identify the problem type
  5. Formalize the Algorithm
  6. Pseudocode
  7. An edge case leads to a refinement
  8. Towards Python: A little OOP
  9. Further towards Python: Pseudocode translation
  10. Debugging is_goal()
  11. Interlude: Bitwise operations (really just &)
  12. Back to our program: is_goal()
  13. Final program