Participants will that algorithms, like recipes, are a set of instructions that modify an input to produce an output. Participants are then asked to write an algorithm to make the ”best” peanut butter and jelly sandwich. Participants then explore what it means to be ”best” and see how their opinions are reflected in their algorithms.
- Projector and projection screen
- [One per participant] Worksheet (pages 20-21)
- [One per participant] Pens or pencils
- Intro Into Algorithms as Opinions – by Blakeley H. Payne
Teaching point: for students to understand that algorithms can have various goals and motives
- Remember this morning when we learned what an algorithm is? Who can remind me what the three parts of an algorithm are? [wait for students to say input/data, specific steps to change that data, and an output]
- That’s correct. An algorithm needs some input data and follows specific steps or instructions to give us a desired output. Computers use algorithms, but so do humans. Algorithms are a lot like a recipe.
- For example, if I were baking a cake, my algorithm would take in the following ingredients, like flour, sugar, salt, eggs, etc.
- I would mix together my dry ingredients and then mix in the wet ingredients like eggs or milk.
- I would pour into a cake pan, set the oven to 350, and put the cake pan in the oven.
- My output would be a cake!
[show accompanying slides (page 4) with images of cake]
- Okay, now I want you to write your own algorithms. I want you to take the next 5-10 minutes to write an “algorithm” (or recipe) for the BEST peanut butter and jelly sandwich. Be sure to specify what your inputs are.
[let time elapse for students to work]
- Okay, now I want you to turn to your partner and share your algorithms. I want you to talk about what your algorithms have in common and how they are different.
[give students a few minutes to chat]
- Who can share with the class what their algorithms had in common?
- What was different?
- If you have to give your algorithm a title “How to make the ____ PBJ,” what adjective would you use? You can’t use “best.”
[most students will say yummiest/tastiest]
Did any of you include instructions to put away your ingredients after you used them?
Then you were optimizing for tidiness in your algorithm!
Did any of you cut your sandwich into fun shapes? Cut off the crust?
Then you were optimizing for playfulness or aesthetics!
- Computer algorithms also optimize for various goals, but sometimes this can be hard to spot. What do you think the goal of Google’s search algorithm is?
[Students might say “best” results. If so, ask them what word they would replace with best like they did earlier. Students might also say “best results for me,” so you can prompt students to ask what they mean by that, or how Google might confirm that they’ve shown “the best results for me.” We’re looking for answers like: to get us to click on links, to get us to click on advertisers links - things that show students understand the search results benefit Google first]
Optional: If possible, open up Google search under two different accounts (or one under an account that is logged in, and one in an incognito browser). Search for some of the following items: pizza place, best movie, news. Ask students why they think the results are different.
|Original title:||Introduction to Algorithms As Opinions|
|Estimated time:||45 minutes|
|Individually or in group:||Group|
|License:||This tool is part of a curriculum. The Ethics of Artificial Intelligence Curriculum for Middle School Students was created by Blakeley H. Payne with support from the MIT Media Lab Personal Robots Group, directed by Cynthia Breazeal. The curriculum is licensed under a Creative Commons Attribution-NonCommercial 2.0 Generic license. For more information, please visit the curriculum.|