1 00:00:22,038 --> 00:00:24,606 After breaking Ethic out of prison, 2 00:00:24,606 --> 00:00:27,821 Hedge flies them both towards a frontier settlement 3 00:00:27,821 --> 00:00:34,641 in the shadow of the Bradbarrier, the great wall that encircles the nation. 4 00:00:34,641 --> 00:00:38,973 All the settlers there will soon gather for the monthly feeding. 5 00:00:38,973 --> 00:00:43,188 The people of the wall spend their days gathering up works of art and literature, 6 00:00:43,188 --> 00:00:45,788 from all across the land. 7 00:00:45,788 --> 00:00:50,378 On feeding day, the furnace-bots arrive, ravenous. 8 00:00:50,378 --> 00:00:56,119 If they eat, the lights stay on, and the food gets delivered. 9 00:00:56,119 --> 00:00:59,409 If they starve, the people do too. 10 00:01:00,954 --> 00:01:05,934 Hedge’s fuel supply runs out just as he and Ethic reach the outskirts of town, 11 00:01:05,934 --> 00:01:08,732 and they come in for a crash landing. 12 00:01:10,576 --> 00:01:14,996 Luckily, everyone is too busy preparing for the feeding to notice. 13 00:01:14,996 --> 00:01:17,870 Today’s feeding is where Ethic can find the leader 14 00:01:17,870 --> 00:01:20,551 of an underground resistance movement. 15 00:01:20,551 --> 00:01:24,819 This person knows the location of the first of three powerful artifacts. 16 00:01:24,819 --> 00:01:27,222 The problem is, Hedge and Ethic don’t know 17 00:01:27,222 --> 00:01:30,618 the resistance leader’s name or appearance. 18 00:01:30,618 --> 00:01:34,801 But Hedge has gathered the following information: 19 00:01:34,801 --> 00:01:37,216 The leader has green eyes. 20 00:01:37,216 --> 00:01:43,236 If the leader has red hair, their name has at least one consecutive double letter. 21 00:01:43,236 --> 00:01:48,286 If the leader wear glasses, their name has exactly 2 vowels. 22 00:01:48,286 --> 00:01:52,299 Otherwise, their name has exactly 3 vowels. 23 00:01:52,299 --> 00:01:57,109 There is exactly one person for whom these are all true. 24 00:01:57,109 --> 00:01:58,324 As a fugitive, 25 00:01:58,324 --> 00:02:02,514 Ethic can’t sneak into the crowd without drawing attention to herself. 26 00:02:02,514 --> 00:02:05,326 But she can give instructions to Hedge. 27 00:02:05,326 --> 00:02:09,505 And one tool she has is what programmers call a conditional. 28 00:02:09,505 --> 00:02:13,185 That’s a statement of the form “If A, then B.” 29 00:02:13,185 --> 00:02:16,376 Flowcharts are great illustrations of how those work. 30 00:02:16,376 --> 00:02:22,266 This conditional translates to: if A is true, carry out instruction B. 31 00:02:22,266 --> 00:02:26,178 There are also conditionals that account for different possibilities. 32 00:02:26,178 --> 00:02:30,025 This says, “If A is true, perform instruction B. 33 00:02:30,025 --> 00:02:33,718 Otherwise, carry out instruction C.” 34 00:02:33,718 --> 00:02:38,828 So what instructions does she give Hedge so he can find the resistance leader? 35 00:02:38,828 --> 00:02:43,492 Pause now to figure it out for yourself. 36 00:02:43,492 --> 00:02:47,407 With a problem like this, it can help to simplify first. 37 00:02:47,407 --> 00:02:50,987 What if Hedge just has to examine this one person? 38 00:02:50,987 --> 00:02:54,232 What information does he need to collect about her? 39 00:02:54,232 --> 00:02:57,236 He might ask, “Does she have green eyes?” 40 00:02:57,236 --> 00:03:01,688 What other questions should Hedge ask to find the resistance leader, 41 00:03:01,688 --> 00:03:05,728 and how can he track those answers? 42 00:03:05,728 --> 00:03:10,718 Pause now to figure it out for yourself. 43 00:03:10,718 --> 00:03:14,607 It may seem intuitive how you’d approach this problem as a human. 44 00:03:14,607 --> 00:03:16,380 But Hedge isn’t a human, 45 00:03:16,380 --> 00:03:20,990 and so the challenge comes from needing to give him systematic instructions 46 00:03:20,990 --> 00:03:23,654 that will work in any scenario. 47 00:03:23,654 --> 00:03:26,578 Hedge needs to examine the settlers, one at a time, 48 00:03:26,578 --> 00:03:29,139 until he discovers the right person. 49 00:03:29,139 --> 00:03:32,709 In other words, like with the lock on the prison cell, 50 00:03:32,709 --> 00:03:36,555 this is a loop that repeats the same instructions. 51 00:03:36,555 --> 00:03:40,083 Only this time the loop will involve a series of questions 52 00:03:40,083 --> 00:03:41,770 in the form of conditionals, 53 00:03:41,770 --> 00:03:45,081 and will end as soon as Hedge finds his target. 54 00:03:45,081 --> 00:03:48,592 But first, you’ll want to organize your information. 55 00:03:48,592 --> 00:03:55,130 Each person has a set of characteristics: Eye color, hair color, glasses, and name. 56 00:03:55,130 --> 00:03:57,297 Does this person have green eyes? 57 00:03:57,297 --> 00:04:02,367 If so, mark a check next to “eye color." If not, mark an X there. 58 00:04:02,367 --> 00:04:06,207 If they have red hair, does their name contain a double letter? 59 00:04:06,207 --> 00:04:09,543 If so, mark a check next to “hair color.” 60 00:04:09,543 --> 00:04:13,832 If they don’t have a double letter, mark an X next to “hair color.” 61 00:04:13,832 --> 00:04:18,582 Anyone with red hair and no double letter can’t be the resistance leader. 62 00:04:18,582 --> 00:04:20,832 But notice that if they have blue hair, 63 00:04:20,832 --> 00:04:25,432 Hedge will skip this question and go on to the next one. 64 00:04:25,432 --> 00:04:27,801 For the last question, we can say, 65 00:04:27,801 --> 00:04:32,551 “If they wear glasses, does their name have exactly 2 vowels? 66 00:04:32,551 --> 00:04:38,129 If they don’t have glasses, does their name have exactly 3 vowels?” 67 00:04:38,129 --> 00:04:42,457 There will be people in the crowd with glasses and 1 vowel, 68 00:04:42,457 --> 00:04:44,864 or no glasses and 2 vowels. 69 00:04:44,864 --> 00:04:48,673 But they’re not who we’re looking for, so they’ll get X’s. 70 00:04:48,673 --> 00:04:52,198 The resistance leader must be someone with either check marks 71 00:04:52,198 --> 00:04:55,027 or blanks next to every question. 72 00:04:55,027 --> 00:04:58,113 Blanks are ok, because if someone has blue hair, 73 00:04:58,113 --> 00:05:01,923 the rule about red hair doesn’t apply to them. 74 00:05:01,923 --> 00:05:05,511 You could have Hedge ask every question about every person, 75 00:05:05,511 --> 00:05:09,215 and then choose the person with only checks and blanks. 76 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, 77 00:05:14,167 --> 00:05:16,722 have him move on to the next person. 78 00:05:16,722 --> 00:05:19,294 You don’t need to know the answer to every question; 79 00:05:19,294 --> 00:05:24,404 just one X means they’re not the target of your search. 80 00:05:26,283 --> 00:05:28,085 Hedge buzzes through the crowd, 81 00:05:28,085 --> 00:05:31,646 and within minutes finds Adila, the resistance leader, 82 00:05:31,646 --> 00:05:33,785 and brings her back to Ethic. 83 00:05:33,785 --> 00:05:39,055 Adila agrees to help them steal the first artifact— the node of power— 84 00:05:39,055 --> 00:05:41,018 but under one condition: 85 00:05:41,018 --> 00:05:43,746 that Ethic and Hedge jump-start the revolution 86 00:05:43,746 --> 00:05:48,349 by reprogramming the furnace-bots that terrorize the town. 87 00:05:48,349 --> 00:05:51,129 And right on cue, the robots descend.