dyslexic
edit
qrcode
+=-

Skill: Developing Sub-Goals


Critical Thinking for COS 265

What does it mean to "develop sub-goals"?


This critical thinking skill is used to formulate a plan that will solve a complex problem. A computer science term that is related to developing sub-goals is divide-and-conquer, where a big and challenging problem can be broken into smaller problems (but not necessarily simpler) that are easier to solve.

Why should I use it?


When should I use it?


How can this type of thinking help me?


When addressing a complex problem, it is helpful to create a procedural plan in a step-by-step fashion in order to break the problem down into manageable parts. A procedural plan will allow you to recognize patterns in the solution that are easily solved or have an algorithmic solution already.


How do I use it?


  1. Identify a problem or issue that is or may be a challenge.
  2. List all of the potential considerations regarding the issue.
  3. Find all logical or natural points where problem can be broken into two or more parts.
  4. Continue recursively to break each of the remaining parts into smaller parts until each part cannot breakdown anymore.
  5. Arrange the list in the most appropriately timed sequence.
    • Keep in mind that many parts could possibly be done in parallel, either in terms of development or in terms of execution.
  6. Ask a trusted, knowledgeable person (expert) if the sequence is appropriate.
  7. Implement the plan and determine when you will do each part of the plan.
  8. Evaluate whether the plan was successful. A good plan should be reproducible.

Example


You are tasked to implement an pathfinding algorithm using A* search and a walker class. Upon some inspection, you realize that the task can be accomplished in four steps. And, as a bonus, the work done in each step can be easily tested before moving on to more complicated parts with minimal amount of effort and code!

  1. Implement basic setter/getter functions of Pathfinder class
  2. Implement resetPath and other path-related functions of Pathfinder
    • This helps you think through which data structures will you need.
  3. Implement computePath and PFNode
    • You keenly notice that using the Similar Problems / Fewer Variables CT Skill will get you a basic version of computePath that can be used to test other parts of your code (ex: getPathCost)
      • You implement computePath without worrying about travel costs (all cost \(1\))
      • Then you incorporate travel costs into your implementation without the heuristic
      • Then you augment your implementation to account for the heuristic
  4. Implement Walker class
    • Again, you notice that Similar Problems / Fewer Variables can help here, too!

The problem requires completing all of these tasks, but breaking up the problem and then solving each subproblem individually turns the challenging analysis problem into manageable chunks.