Hi. In this tutorial you will learn what Problem Solving refers to and the basics to it. No experience required, just some thinking and your own time.
Well if you didn't know what Problem Solving is, it's basically the method or a solution to a problem that you encounter. You may brush over it, but in reality, all of us do Problem Solving in Programming. We just don't realize it.
Say that you wanted to assign half of the players to a team and the rest to the other team. The method used to solve this problem is called the solution. You would need to come up and brainstorm a solution in order to solve it.
The real issue here is - How do I come up with a solution?, Where do I even begin?, How do I approach it? Now that you understood what Problem Solving and Solutions are, let's get into the techniques, perspectives and more.
Let's take the first example. How do I balance teams equally? Take note of key words - equally, balance
What normally a quick fix to this solution is to split up half the players into two groups and then assign teams for them.
There's a flaw with this "quick solution" though. How do you know if one team is full? It's MUCH harder to deal with that then to come up with another solution.
However, a well thought and planned Solution can be - Loop through the players, if we reach a certain amount of tolerancy between one team, we assign the player to the other team.
You can see now that good Solutions are harder to come up with.
What I mean by this is to look at the problem in how many ways possible. I wouldn't of came up with a good solution by just studying the problem for a bit. I realized that it's just more than spliting up the groups of players.
Imagine a farmer with a boat and their fox, goose and food. The farmer needs to take all of his pets and food with him accross the river.
However, he can only take one thing at a time, he also needs to make sure that the fox does not eat the goose and the goose does not eat the food.
Usually your first thought was to take the goose first, but that wouldn't work since either if the food or the fox comes next to the other side, the goose will eat the food or the fox will eat the goose, resulting in people saying this problem is impossible.
But did you know you can transfer things back and forth accross each sides? The problem becomes MUCH easier now.
Here's what the solution was:
The perspective could be under your noses, and you couldn't even realize!
This may be an obvious one but it is REALLY powerful. A plan for problem solving is Step 1 for your solution.
Sit down, write on a piece of paper on what you think you SHOULD do and what you CAN do. Imagine the end result for your solution. Also write down the tools needed for solving the problem, it can be a simple loop or a complex algorithim.
Problems vary from eachother.
Do you fully understand the Problem? Is there any holes that you can't figure out? If so then solving those "holes" are also Step 1 for the solution.
Many times I've seen people with their scripting problems not fully knowing what the problem is asking. They guess what it's asking, that can lead to a very poor solution.
This one is simple since you can just study your problem and see if you fully know what your doing.
Problem Solving is important in Scripting since you can effectievly solve a coding barrier that most people just brush over. We do problem solving in Scripting but we just don't realize it.
A solution is the final step to Problem Solving. Many steps are required further back to help understand the Solution and the Problem itself and also provide a basic understanding of what needs to be done.
Look into the perspectives, set up a plan and really try to understand what the Problem is asking you to do.
Do not get discouraged, I myself do Problem Solving and I am getting better at it everytime I solve one. I also feel very good once I learn what it was. It's going to be hard for beginners, but that's the truth. No one should brush over Problem Solving.
Please leave comments on which Problem I should feature, suggestions and feedback on this tutorial.
*123nabilben123*