WEBVTT 00:00:22.038 --> 00:00:24.606 After breaking Ethic out of prison, 00:00:24.606 --> 00:00:27.821 Hedge flies them both towards a frontier settlement 00:00:27.821 --> 00:00:34.641 in the shadow of the Bradbarrier, the great wall that encircles the nation. NOTE Paragraph 00:00:34.641 --> 00:00:38.973 All the settlers there will soon gather for the monthly feeding. 00:00:38.973 --> 00:00:43.188 The people of the wall spend their days gathering up works of art and literature, 00:00:43.188 --> 00:00:45.788 from all across the land. 00:00:45.788 --> 00:00:50.378 On feeding day, the furnace-bots arrive, ravenous. 00:00:50.378 --> 00:00:56.119 If they eat, the lights stay on, and the food gets delivered. 00:00:56.119 --> 00:00:59.409 If they starve, the people do too. NOTE Paragraph 00:01:00.954 --> 00:01:05.934 Hedge’s fuel supply runs out just as he and Ethic reach the outskirts of town, 00:01:05.934 --> 00:01:08.732 and they come in for a crash landing. 00:01:10.576 --> 00:01:14.996 Luckily, everyone is too busy preparing for the feeding to notice. NOTE Paragraph 00:01:14.996 --> 00:01:17.870 Today’s feeding is where Ethic can find the leader 00:01:17.870 --> 00:01:20.551 of an underground resistance movement. 00:01:20.551 --> 00:01:24.819 This person knows the location of the first of three powerful artifacts. 00:01:24.819 --> 00:01:27.222 The problem is, Hedge and Ethic don’t know 00:01:27.222 --> 00:01:30.618 the resistance leader’s name or appearance. 00:01:30.618 --> 00:01:34.801 But Hedge has gathered the following information: NOTE Paragraph 00:01:34.801 --> 00:01:37.216 The leader has green eyes. 00:01:37.216 --> 00:01:43.236 If the leader has red hair, their name has at least one consecutive double letter. 00:01:43.236 --> 00:01:48.286 If the leader wear glasses, their name has exactly 2 vowels. 00:01:48.286 --> 00:01:52.299 Otherwise, their name has exactly 3 vowels. 00:01:52.299 --> 00:01:57.109 There is exactly one person for whom these are all true. NOTE Paragraph 00:01:57.109 --> 00:01:58.324 As a fugitive, 00:01:58.324 --> 00:02:02.514 Ethic can’t sneak into the crowd without drawing attention to herself. 00:02:02.514 --> 00:02:05.326 But she can give instructions to Hedge. 00:02:05.326 --> 00:02:09.505 And one tool she has is what programmers call a conditional. 00:02:09.505 --> 00:02:13.185 That’s a statement of the form “If A, then B.” 00:02:13.185 --> 00:02:16.376 Flowcharts are great illustrations of how those work. 00:02:16.376 --> 00:02:22.266 This conditional translates to: if A is true, carry out instruction B. 00:02:22.266 --> 00:02:26.178 There are also conditionals that account for different possibilities. 00:02:26.178 --> 00:02:30.025 This says, “If A is true, perform instruction B. 00:02:30.025 --> 00:02:33.718 Otherwise, carry out instruction C.” NOTE Paragraph 00:02:33.718 --> 00:02:38.828 So what instructions does she give Hedge so he can find the resistance leader? NOTE Paragraph 00:02:38.828 --> 00:02:43.492 Pause now to figure it out for yourself. NOTE Paragraph 00:02:43.492 --> 00:02:47.407 With a problem like this, it can help to simplify first. 00:02:47.407 --> 00:02:50.987 What if Hedge just has to examine this one person? 00:02:50.987 --> 00:02:54.232 What information does he need to collect about her? NOTE Paragraph 00:02:54.232 --> 00:02:57.236 He might ask, “Does she have green eyes?” 00:02:57.236 --> 00:03:01.688 What other questions should Hedge ask to find the resistance leader, 00:03:01.688 --> 00:03:05.728 and how can he track those answers? NOTE Paragraph 00:03:05.728 --> 00:03:10.718 Pause now to figure it out for yourself. NOTE Paragraph 00:03:10.718 --> 00:03:14.607 It may seem intuitive how you’d approach this problem as a human. 00:03:14.607 --> 00:03:16.380 But Hedge isn’t a human, 00:03:16.380 --> 00:03:20.990 and so the challenge comes from needing to give him systematic instructions 00:03:20.990 --> 00:03:23.654 that will work in any scenario. NOTE Paragraph 00:03:23.654 --> 00:03:26.578 Hedge needs to examine the settlers, one at a time, 00:03:26.578 --> 00:03:29.139 until he discovers the right person. 00:03:29.139 --> 00:03:32.709 In other words, like with the lock on the prison cell, 00:03:32.709 --> 00:03:36.555 this is a loop that repeats the same instructions. 00:03:36.555 --> 00:03:40.083 Only this time the loop will involve a series of questions 00:03:40.083 --> 00:03:41.770 in the form of conditionals, 00:03:41.770 --> 00:03:45.081 and will end as soon as Hedge finds his target. NOTE Paragraph 00:03:45.081 --> 00:03:48.592 But first, you’ll want to organize your information. 00:03:48.592 --> 00:03:55.130 Each person has a set of characteristics: Eye color, hair color, glasses, and name. NOTE Paragraph 00:03:55.130 --> 00:03:57.297 Does this person have green eyes? 00:03:57.297 --> 00:04:02.367 If so, mark a check next to “eye color." If not, mark an X there. NOTE Paragraph 00:04:02.367 --> 00:04:06.207 If they have red hair, does their name contain a double letter? 00:04:06.207 --> 00:04:09.543 If so, mark a check next to “hair color.” 00:04:09.543 --> 00:04:13.832 If they don’t have a double letter, mark an X next to “hair color.” 00:04:13.832 --> 00:04:18.582 Anyone with red hair and no double letter can’t be the resistance leader. 00:04:18.582 --> 00:04:20.832 But notice that if they have blue hair, 00:04:20.832 --> 00:04:25.432 Hedge will skip this question and go on to the next one. NOTE Paragraph 00:04:25.432 --> 00:04:27.801 For the last question, we can say, 00:04:27.801 --> 00:04:32.551 “If they wear glasses, does their name have exactly 2 vowels? 00:04:32.551 --> 00:04:38.129 If they don’t have glasses, does their name have exactly 3 vowels?” 00:04:38.129 --> 00:04:42.457 There will be people in the crowd with glasses and 1 vowel, 00:04:42.457 --> 00:04:44.864 or no glasses and 2 vowels. 00:04:44.864 --> 00:04:48.673 But they’re not who we’re looking for, so they’ll get X’s. NOTE Paragraph 00:04:48.673 --> 00:04:52.198 The resistance leader must be someone with either check marks 00:04:52.198 --> 00:04:55.027 or blanks next to every question. 00:04:55.027 --> 00:04:58.113 Blanks are ok, because if someone has blue hair, 00:04:58.113 --> 00:05:01.923 the rule about red hair doesn’t apply to them. NOTE Paragraph 00:05:01.923 --> 00:05:05.511 You could have Hedge ask every question about every person, 00:05:05.511 --> 00:05:09.215 and then choose the person with only checks and blanks. 00:05:09.215 --> 00:05:14.165 But there’s a way to save yourself lots of time: as soon as Hedge marks an X, 00:05:14.167 --> 00:05:16.722 have him move on to the next person. 00:05:16.722 --> 00:05:19.294 You don’t need to know the answer to every question; 00:05:19.294 --> 00:05:24.404 just one X means they’re not the target of your search. NOTE Paragraph 00:05:26.283 --> 00:05:28.085 Hedge buzzes through the crowd, 00:05:28.085 --> 00:05:31.646 and within minutes finds Adila, the resistance leader, 00:05:31.646 --> 00:05:33.785 and brings her back to Ethic. NOTE Paragraph 00:05:33.785 --> 00:05:39.055 Adila agrees to help them steal the first artifact— the node of power— 00:05:39.055 --> 00:05:41.018 but under one condition: 00:05:41.018 --> 00:05:43.746 that Ethic and Hedge jump-start the revolution 00:05:43.746 --> 00:05:48.349 by reprogramming the furnace-bots that terrorize the town. 00:05:48.349 --> 00:05:51.129 And right on cue, the robots descend.