Before the bell
You are responsible for all of this before the end of class.
- The discussion form in the I Do deck. All three sections. If you are here, this should be done.
- Your classwork. This form on the right. Section 1 before the exit ticket pops up; Section 2 past the floor.
- No Bench Basics today — this is a short or catch-up day.
- The exit ticket. It opens 20 minutes before the bell and lives on the last slide of this deck.
Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.
Five Things on Your Phone
This reading applies the test from the passage to five features found on most phones.
Features With Rules Written by People
The calculator is a program, because its programmers wrote every rule in a programming language, and the code for one calculator app is public for anyone to read. The alarm clock is also a program, since the owner chooses a time and the app asks the phone's system to run an action at that time, even when the app itself is closed. Both the time and the action come from people, so nothing in the alarm was learned from examples.
Features That Depend on Training
Autocorrect depends on how it was built. Some spell checkers compare each typed word to a list of words stored in a dictionary file, along with a second file of rules for prefixes and word endings. An earlier design for one phone keyboard used rules that described common typing mistakes. A newer design of that keyboard replaced those rules with a model trained on examples of real typing, such as the times people undid a correction. Many newer phone keyboards now use a trained model for autocorrect. An autocorrect that only looks words up in a list is a program, and one that uses a trained model is not covered by the word "program" alone.
Face recognition on the lock screen uses machine learning, which means its matching comes from training. The phone turns a scan of the face into numbers and then uses neural networks to compare those numbers to the face data saved during setup.
A voice assistant is made of several parts. The part that listens for the wake phrase is a neural network trained on recordings of people saying that phrase. A separate speech recognizer, also trained on examples, turns the rest of the request into words. After that, a spoken request to set an alarm can be handed to the phone's alarm app, the same kind of program described above, which follows rules people wrote.
Sources: Microsoft, Windows Calculator; Google, What is Machine Learning?; Android Developers, Schedule alarms; Hunspell project, Hunspell; Beaufays and Riley, The Machine Intelligence Behind Gboard (2017); Apple, About Face ID advanced technology and Biometric security; Apple, iOS 17 makes iPhone more personal and intuitive (2023); Apple Machine Learning Research, Hey Siri (2017); Android Developers, Common intents.
AI Is a Branch of Computer Science
This section explains where artificial intelligence fits inside computer science and how a model is different from an ordinary program.
Where AI Fits in Computer Science
Computer science is the study of computers and the step-by-step processes they carry out. Networking, data management and security are three branches of computer science, and artificial intelligence, usually called AI, is another. The name "artificial intelligence" comes from the 1950s, when four researchers proposed a summer study of the topic at Dartmouth College. Machine learning is one area inside AI, and the language models that write text belong to machine learning. The models behind the class tools MuggsOfPrompts and MuggsOfVibes are language models of this kind. Figure 1 shows these areas as boxes drawn inside one another.
Programs: Rules Written by People
A program is a set of instructions that a person wrote for a computer to follow. For example, a calculator app is a program. When a user enters 2 + 2, the app follows an addition rule that a programmer wrote, so the same input gives the same output every time. A model is also a program in the broad sense that it is software that runs on a computer, but nobody typed its rule. The calculator fits this description of a program, while the face-recognition feature described below does not.
How Models Are Made by Training
A model is a piece of software whose behavior came from examples instead of from rules a person wrote. Inside, a model is a large collection of numbers that connect an input to an output. Training is the process of showing a model a very large number of examples and adjusting its numbers until its output matches them. For each example, the model makes a prediction, the prediction is compared to the correct answer, which is called a label, and the model's numbers are adjusted to bring the next prediction closer. A person typing in a rule is not training, because the rule came from the person and not from examples. A language model is trained on a very large amount of text, and it then generates text one word or part of a word at a time. A chatbot is one use of a language model, which generates each reply as a continuation of the conversation so far.
One Phone, Two Kinds of Software
The calculator app runs on the phone's chips and is not a model, because every one of its rules was typed by a person. The feature that unlocks the phone by recognizing its owner's face works differently, because it relies on a model that was made by training. No person wrote a rule that lists what the owner's face looks like. Some features have been built both ways. For example, an earlier design of one phone keyboard described typing mistakes with rules, and a newer design replaced those rules with a trained model, so the answer to the test depends on how the feature was built.
Summary
AI is one branch of computer science, and machine learning and language models are areas inside it, as Figure 1 shows. A program follows rules that a person wrote, while a model gets its behavior from training on examples. The test for any computer feature is whether a person wrote the rule or whether the rule was learned from examples.
Sources: McCarthy et al., A Proposal for the Dartmouth Summer Research Project on Artificial Intelligence (1955); Tucker et al. via K–12 CS Framework, Defining Computer Science; ACM, IEEE-CS and AAAI, Computer Science Curricula 2023 (2024); Russell and Norvig, Artificial Intelligence: A Modern Approach, contents; CompTIA, Tech+ (FC0-U71); Samuel, Some Studies in Machine Learning Using the Game of Checkers (1959); Google, What is Machine Learning? and Supervised Learning; Google, LLMs: What's a large language model?; Microsoft, Windows Calculator; Beaufays and Riley, The Machine Intelligence Behind Gboard (2017); Apple, About Face ID advanced technology and Biometric security; Mistral AI, Models Overview; course repository, MuggsOfPrompts and MuggsOfVibes model ids.
Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.
MC 1. (Calculator) Where did the rule for the calculator app come from?
- A person wrote the rule
- Learned from examples
CR 1. Give one reason for your answer to MC 1. Use one fact from Reading 2.
Write your answer in your lab notebook, labeled CR 1.
MC 2. (Alarm clock) Where did the rule for the alarm clock come from?
- A person wrote the rule
- Learned from examples
CR 2. Give one reason for your answer to MC 2. Use one fact from Reading 2.
Write your answer in your lab notebook, labeled CR 2.
MC 3. (Autocorrect on a newer phone keyboard) Reading 2 describes the autocorrect on many newer phone keyboards. Where did the rule for that autocorrect come from?
- A person wrote the rule
- Learned from examples
CR 3. Give one reason for your answer to MC 3. Then name one way an earlier or simpler autocorrect could work differently.
Write your answer in your lab notebook, labeled CR 3.
MC 4. (Face recognition on the lock screen) Where did the rule for matching the owner's face come from?
- A person wrote the rule
- Learned from examples
CR 4. Give one reason for your answer to MC 4. Use one fact from Reading 2.
Write your answer in your lab notebook, labeled CR 4.
MC 5. (Voice assistant) Where did the rule for the part of a voice assistant that listens for the wake phrase come from?
- A person wrote the rule
- Learned from examples
CR 5. Give one reason for your answer to MC 5. Then name one part of a voice assistant that follows rules a person wrote.
Write your answer in your lab notebook, labeled CR 5.
Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.
MC 6. (A MuggsArcade game) In a MuggsArcade game such as Breakout, the ball bounces off the paddle and the bricks the same way every time. Where did that rule come from?
- A person wrote the rule
- Learned from examples
CR 6. Give one reason for your answer to MC 6. Use the test from the passage.
Write your answer in your lab notebook, labeled CR 6.
MC 7. (MuggsOfPrompts) When a student types a prompt into MuggsOfPrompts, where did the rule that produces the answer come from?
- A person wrote the rule
- Learned from examples
CR 7. Give one reason for your answer to MC 7. Use Figure 1 or the passage.
Write your answer in your lab notebook, labeled CR 7.
MC 8. (This Google Form) This form shows its questions in order and saves each answer you submit. Where did the rules for that come from?
- A person wrote the rule
- Learned from examples
CR 8. Give one reason for your answer to MC 8. Use the test from the passage.
Write your answer in your lab notebook, labeled CR 8.
No bench today
There is no bench on this day. Finish your classwork and move to the exit ticket.
No bench today — the bench pop-up is off for this day.
Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.
Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.
This opens during your class period.