This week in Computer Science, we learned about something extremely useful and important: algorithms!
What is an Algorithm?
To start class, we first asked a very essential question: what is an algorithm? After some discussion, there was at least some consensus that algorithms are instructions that are often followed and carried out by computers. However, we were still pretty unclear as to what exactly is an algorithm and what properties it has, so Mr. Pete had us watch a short but comprehensive video clip called What is an Algorithm and take notes on it. After that, we were able to come to a clear conclusion as to what is an algorithm and its main properties. Algorithms are a set of specific, clear, step-by-step instructions on how to finish a task in a finite amount of time effectively. There are five main properties that all algorithms share: they have finiteness (must happen within a certain amount of time), definiteness (are unambiguous), have an input, have an output, and they must be effective (they can finish the task fairly well in an efficient manner).

Understanding the Algorithm
Now, understanding the definition and properties of the algorithm is great and all, and it’s very important to helping us understand and utilize algorithms, but it’s hard to really understand something without doing it. So, we did an activity about algorithms.
The first activity was pretty neat. The teacher chose two volunteers, Demi and Catherine. Demi was blindfolded and played the part of the “robot”, while Catherine played the role of the “instructor”. A water bottle was placed on a desk some distance away from Demi. Catherine’s job was to provide instructions to the temporarily blinded Demi on how to pick up the water bottle and give it to another nearby student. Basically, Catherine was a “computer programmer” who created an algorithm for Demi, the “computer” who only knows how to follow instructions, to follow. This activity vividly showed us how computers are completely dependent on the instructions an algorithm provides, and how algorithms need to be clear and step-by-step for a computer to properly use it and carry out the task at hand.
Then, we were given a sheet of paper. Mr. Pete gave us a set of instructions (the algorithm) for us (the computers) to follow. However, the instructions weren’t specific. They didn’t tell us if we had to use a straight edge to draw the lines required or which way the paper should be held (horizontal or vertical). From this activity, we realized that algorithms have to be specific.

Finally, we were given a worksheet with different tourist locations. We had to devise a route along the paths shown on the paper that would ensure that for one, we visit each attraction only once, and for two, we would end up returning to the starting point (the hotel). After devising the route, we recorded the instructions for the route on a piece of paper. They were written in simple, specific step-by-step instructions, and were basically algorithms for humans. By learning to write our own “algorithms”, we were able to deepen our understanding of the properties of an algorithm even further.
Magic…
We also did a presentation on “magic tricks” with the groups that we were split in to. Our group’s “magic trick” was that we had an “extremely intelligent” piece of paper that was invincible at tic-tac-toe. In actuality, we had written an algorithm on the piece of paper that mathematically ensured that we could never lose at tic-tac-toe. In the presentation, we performed our magic trick and explained how we had an algorithm that ensured the paper’s victory. I was tasked with helping to perform the magic trick: I read instructions off the paper and performed actions in accordance to what the algorithm said. Overall, our presentation was pretty comprehensive and entertaining. Once again, we strengthened our understanding of algorithms by writing one.

Lightbot!
Lightbot is a flash game that teaches people the logic behind writing algorithms. In Lightbot, you control a bot by writing instructions for it. The objective is to get the bot to light up all the lights on the stage. Instructions are written by choosing from an assortment of unique blocks that each have their own unique instructions (rotate right, jump, step forward, undergo algorithm P1, etc.). The number of blocks that can be used are limited. Overall, it was pretty fun, and also became challenging by the end, as we had to learn how to use loops (repeating instructions) within an algorithm. This game improved my computational thinking skill by helping me understand the complexity and process behind writing a good algorithm. After playing the game, I was able to write more efficient algorithms for more complex tasks.

Overall…
I really learned a lot about algorithms this week. I learned about what they are, what properties they have, and how write them. We also practiced writing different algorithms for different tasks. Plus, I improved my presentation skills through the “magic” presentation. I believe learning about algorithms will be very helpful for me in the future, as algorithms are being used more and more to finish tasks in our everyday lives. For example, Google is basically just algorithms. Also, algorithms are now being used to do other non-computer-related tasks, such as separating goods in a warehouse and distributing them. There is a high chance that in the future, regardless of what I choose as an occupation, I’ll have to know about algorithms. So, this week’s classes were really useful. We learned a lot of important information this week.