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?
- To break a challenging, unsolved problem into smaller, more manageable pieces that possibly have been solved before
- To put action steps to the best option that you have generated
- To see the order in which steps need to be taken
- To better approximate time estimate for completing a task
- To understand which parts can be done in parallel
When should I use it?
- When coming across a complex problem that is solvable in discrete steps or stages
- When there is a question about what order to take steps in a given situation
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?
- Identify a problem or issue that is or may be a challenge.
- List all of the potential considerations regarding the issue.
- Find all logical or natural points where problem can be broken into two or more parts.
- Continue recursively to break each of the remaining parts into smaller parts until each part cannot breakdown anymore.
- 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.
- Ask a trusted, knowledgeable person (expert) if the sequence is appropriate.
- Implement the plan and determine when you will do each part of the plan.
- 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!
- Implement basic setter/getter functions of
Pathfinderclass - Implement
resetPathand other path-related functions ofPathfinder- This helps you think through which data structures will you need.
- Implement
computePathandPFNode- You keenly notice that using the Similar Problems / Fewer Variables CT Skill will get you a basic version of
computePaththat can be used to test other parts of your code (ex:getPathCost)- You implement
computePathwithout 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
- You implement
- You keenly notice that using the Similar Problems / Fewer Variables CT Skill will get you a basic version of
- Implement
Walkerclass- 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.