1 00:00:00,070 --> 00:00:01,660 The following content is provided 2 00:00:01,660 --> 00:00:03,810 under a Creative Commons license. 3 00:00:03,810 --> 00:00:06,540 Your support will help MIT OpenCourseWare continue 4 00:00:06,540 --> 00:00:10,140 to offer high-quality educational resources for free. 5 00:00:10,140 --> 00:00:12,690 To make a donation or to view additional materials 6 00:00:12,690 --> 00:00:16,590 from hundreds of MIT courses, visit MIT OpenCourseWare 7 00:00:16,590 --> 00:00:17,263 at ocw.mit.edu. 8 00:00:23,520 --> 00:00:25,530 PROFESSOR: So let's go ahead and start 9 00:00:25,530 --> 00:00:29,260 Lecture 6, which is all about strategy. 10 00:00:29,260 --> 00:00:31,900 And we're going to try to be numerical about it 11 00:00:31,900 --> 00:00:35,310 because numbers make us feel smart. 12 00:00:35,310 --> 00:00:40,230 So strategy is a nebulous thing. 13 00:00:40,230 --> 00:00:43,760 It can't be easily defined, and very many people 14 00:00:43,760 --> 00:00:47,190 spend all day talking about it without giving 15 00:00:47,190 --> 00:00:49,630 any statistics or numerical results. 16 00:00:49,630 --> 00:00:52,810 Which I think is quite a shame because, especially 17 00:00:52,810 --> 00:00:56,020 in this Battlecode, we can actually 18 00:00:56,020 --> 00:00:59,630 do computations and say, OK, if I build this many of x, 19 00:00:59,630 --> 00:01:01,890 I can build this many of y. 20 00:01:01,890 --> 00:01:04,300 And we can get to some pretty interesting results. 21 00:01:04,300 --> 00:01:07,770 I'm going to start out by just having a seat here, 22 00:01:07,770 --> 00:01:12,160 and I'm going to talk about some sort of general stuff. 23 00:01:12,160 --> 00:01:14,820 And then we'll move straight into numerical strategy, which 24 00:01:14,820 --> 00:01:17,120 I've got here on the right of the view screen. 25 00:01:17,120 --> 00:01:19,710 And you can see, like, I've implemented Battlecode 26 00:01:19,710 --> 00:01:22,730 in Mathematica to a limited extent 27 00:01:22,730 --> 00:01:26,114 for the express purpose of showing graphs like these. 28 00:01:26,114 --> 00:01:27,030 So we'll get to those. 29 00:01:27,030 --> 00:01:29,550 Let's talk about Battlecode a little bit. 30 00:01:29,550 --> 00:01:31,830 The way I see it is that strategy 31 00:01:31,830 --> 00:01:36,950 can be expressed as having a triangle aspect to it 32 00:01:36,950 --> 00:01:41,180 because you're basically picking between a technology 33 00:01:41,180 --> 00:01:46,190 route, an econ route, and a military route. 34 00:01:46,190 --> 00:01:49,510 And then among military, I like to try to draw another line. 35 00:01:49,510 --> 00:01:53,890 And you can sort of imagine this triangle as being on a plane. 36 00:01:53,890 --> 00:01:56,780 This is on a plane that's like perpendicular to this line, 37 00:01:56,780 --> 00:01:58,890 indicating that you can sort of be in any of them. 38 00:01:58,890 --> 00:02:01,450 I could have drawn it as a triangular prism, 39 00:02:01,450 --> 00:02:03,860 but I chose not to. 40 00:02:03,860 --> 00:02:05,840 So then this triangle, you can have 41 00:02:05,840 --> 00:02:07,980 a defensive military strategy, or you 42 00:02:07,980 --> 00:02:10,280 can have an offensive one. 43 00:02:10,280 --> 00:02:13,920 Offensive is spelled that way. 44 00:02:13,920 --> 00:02:18,660 And I also like to populate this map with even more things 45 00:02:18,660 --> 00:02:20,770 to make it less clear what's going on. 46 00:02:20,770 --> 00:02:24,050 So I'm going to put over here large map, 47 00:02:24,050 --> 00:02:27,460 and I'm going to put over down here small map. 48 00:02:27,460 --> 00:02:30,450 Because if you're on a small map, 49 00:02:30,450 --> 00:02:32,920 you want to have more military, at least early on. 50 00:02:32,920 --> 00:02:34,660 I mean, this is all time-changing. 51 00:02:34,660 --> 00:02:38,086 So you could describe a strategy in time as being like, 52 00:02:38,086 --> 00:02:39,960 OK, first, I'm going to do a lot of military, 53 00:02:39,960 --> 00:02:41,619 and then I'm going to get some econ, 54 00:02:41,619 --> 00:02:42,910 and then I'm going to get tech. 55 00:02:42,910 --> 00:02:47,060 So like that's a strategy, though it looks pretty weird. 56 00:02:47,060 --> 00:02:49,560 That looks pretty weird, and it's crossing out my small map. 57 00:02:49,560 --> 00:02:52,400 Anyway, so small map, it is really 58 00:02:52,400 --> 00:02:55,600 another way of saying it's far to the enemy base 59 00:02:55,600 --> 00:02:56,459 or it's close. 60 00:02:56,459 --> 00:02:58,750 So on a small map, you can get right to the enemy base. 61 00:02:58,750 --> 00:03:01,255 You got to be prepared if they've got a rush strategy. 62 00:03:03,860 --> 00:03:06,550 Maybe what you ought to do instead of saying, 63 00:03:06,550 --> 00:03:08,960 OK, I'm going to use the map size, is do 64 00:03:08,960 --> 00:03:10,140 sort of a heuristic. 65 00:03:10,140 --> 00:03:12,850 Because you could imagine this map-- 66 00:03:12,850 --> 00:03:15,340 I'm going to do example maps here-- 67 00:03:15,340 --> 00:03:19,320 and this map currently identical. 68 00:03:19,320 --> 00:03:21,040 Now let's make them different. 69 00:03:21,040 --> 00:03:23,020 This one's got like tons of mines, 70 00:03:23,020 --> 00:03:25,800 and this one has a little bit of mines. 71 00:03:25,800 --> 00:03:27,150 Obviously, they're different. 72 00:03:27,150 --> 00:03:31,760 I mean, if the headquarters are here and here in these two 73 00:03:31,760 --> 00:03:35,670 maps, well, this one is effectively a small map, 74 00:03:35,670 --> 00:03:37,600 and this one is effectively a large map. 75 00:03:37,600 --> 00:03:39,250 So here's a suggestion. 76 00:03:39,250 --> 00:03:42,060 It's not very expensive to sense mines at location. 77 00:03:42,060 --> 00:03:46,190 It costs 10 in the MethodCosts.txt file. 78 00:03:46,190 --> 00:03:48,380 So you could consider saying, all right, 79 00:03:48,380 --> 00:03:49,680 I'm this headquarters. 80 00:03:49,680 --> 00:03:51,190 For the first couple of rounds, I'm 81 00:03:51,190 --> 00:03:55,060 going to compute the sum of the number of mines between me 82 00:03:55,060 --> 00:03:59,240 and the enemy in sort of a volume looking like that. 83 00:03:59,240 --> 00:04:01,790 And so I'm just going to compute this number, 84 00:04:01,790 --> 00:04:03,310 just going to total it all up. 85 00:04:03,310 --> 00:04:08,615 If the map is, say, 50 by 50, then how many tiles 86 00:04:08,615 --> 00:04:09,600 do you need to count? 87 00:04:09,600 --> 00:04:13,720 Well, say you make it 4 wide, just for halibut. 88 00:04:13,720 --> 00:04:15,240 And then down in this direction, I 89 00:04:15,240 --> 00:04:17,529 guess it would end up being sort of like 50. 90 00:04:17,529 --> 00:04:23,880 So you'd have about 200 tiles to look at times 10. 91 00:04:23,880 --> 00:04:27,880 That's going to be 10 bytecodes per sense tile, 92 00:04:27,880 --> 00:04:29,550 and so you've only got 2,000. 93 00:04:29,550 --> 00:04:31,520 You can do that easily in one turn 94 00:04:31,520 --> 00:04:33,740 because the bytecode limit is 10,000. 95 00:04:33,740 --> 00:04:36,410 So then you could very quickly get an estimate 96 00:04:36,410 --> 00:04:38,810 of how easy or difficult it is to get to your enemy 97 00:04:38,810 --> 00:04:39,740 right off there. 98 00:04:39,740 --> 00:04:41,860 And so then you could find your spot, 99 00:04:41,860 --> 00:04:45,290 say, OK, I'm here or here on my Tech Tree. 100 00:04:45,290 --> 00:04:49,690 The system doesn't have to be incredibly complicated. 101 00:04:49,690 --> 00:04:52,080 So let's delete some of this mess 102 00:04:52,080 --> 00:04:54,820 that I've made here so that I can 103 00:04:54,820 --> 00:04:57,340 make some notes about the differences 104 00:04:57,340 --> 00:05:00,400 between defensive and offensive strategy. 105 00:05:00,400 --> 00:05:03,350 Later on, we're going to see the number of units 106 00:05:03,350 --> 00:05:08,250 that you can get if you're pushing for an early advantage, 107 00:05:08,250 --> 00:05:10,980 and that's going to sort of tie into this. 108 00:05:10,980 --> 00:05:13,250 So there's a time aspect, where you're 109 00:05:13,250 --> 00:05:17,410 saying, if you're defending, you have a number of advantages. 110 00:05:17,410 --> 00:05:20,160 One is that you can have additional units up at the time 111 00:05:20,160 --> 00:05:21,530 when the enemy arrives. 112 00:05:21,530 --> 00:05:23,720 Another is that the pathing is much easier 113 00:05:23,720 --> 00:05:26,380 because you don't have to go anywhere. 114 00:05:26,380 --> 00:05:32,040 You can establish a better concave in theory 115 00:05:32,040 --> 00:05:36,056 because the enemy might have to defuse mines. 116 00:05:36,056 --> 00:05:37,680 It's worth noting here that, of course, 117 00:05:37,680 --> 00:05:39,950 you're not guaranteed this advantage 118 00:05:39,950 --> 00:05:43,170 because the enemy knows where you are. 119 00:05:43,170 --> 00:05:45,700 You're sort of around your headquarters. 120 00:05:45,700 --> 00:05:48,690 I mean, it's generally true that if you can recognize the enemy 121 00:05:48,690 --> 00:05:50,850 is around his headquarters, so he's all sort of 122 00:05:50,850 --> 00:05:52,340 clumped up here. 123 00:05:52,340 --> 00:05:54,910 Well, it's pretty easy for you to say, all right, 124 00:05:54,910 --> 00:06:00,900 I'm going to stay at a distance r from that enemy, 125 00:06:00,900 --> 00:06:03,560 and I'm just going to sort of group up there. 126 00:06:03,560 --> 00:06:08,010 And as soon as everybody is within a distance r and not 127 00:06:08,010 --> 00:06:11,425 farther than a distance this other letter, 128 00:06:11,425 --> 00:06:14,860 then I know that I'm in a good position to attack all at once. 129 00:06:14,860 --> 00:06:18,650 And so if the enemy's just sort of hiding there in its hole, 130 00:06:18,650 --> 00:06:22,220 then that's also a vulnerability as well as an advantage. 131 00:06:22,220 --> 00:06:24,010 So you could imagine that case. 132 00:06:24,010 --> 00:06:25,540 And you could also imagine the case 133 00:06:25,540 --> 00:06:29,010 where there's a ton of mines, and so the minefield is 134 00:06:29,010 --> 00:06:36,460 like this giant, thick thing, which is filled. 135 00:06:36,460 --> 00:06:40,320 And so you're defending over here. 136 00:06:40,320 --> 00:06:44,960 And yeah, you're defending here, and the enemy's coming at you. 137 00:06:44,960 --> 00:06:46,700 And they kind of have to go in a line 138 00:06:46,700 --> 00:06:48,540 because it's such a big mine field, 139 00:06:48,540 --> 00:06:50,010 so you can just sort surround them. 140 00:06:50,010 --> 00:06:51,926 Yeah, I meant to do that outlining on purpose. 141 00:06:54,170 --> 00:06:55,660 Oh, my goodness. 142 00:06:55,660 --> 00:06:57,090 Who can use Microsoft Paint? 143 00:06:57,090 --> 00:06:58,560 I certainly can. 144 00:06:58,560 --> 00:07:00,220 Let's see here. 145 00:07:00,220 --> 00:07:03,340 So yeah, there's this concave issue. 146 00:07:03,340 --> 00:07:05,355 And then there's another issue that you 147 00:07:05,355 --> 00:07:07,760 can have the base take hits. 148 00:07:07,760 --> 00:07:10,730 So your base has 500 hit points. 149 00:07:10,730 --> 00:07:13,600 So you can use that as a sort of buffer 150 00:07:13,600 --> 00:07:14,870 to try to protect your robot. 151 00:07:14,870 --> 00:07:18,510 It's a very good idea, but it would spread out 152 00:07:18,510 --> 00:07:19,790 the damage a little bit. 153 00:07:19,790 --> 00:07:21,390 So in the event of an emergency, it 154 00:07:21,390 --> 00:07:24,800 could be superior to being farther from your base. 155 00:07:24,800 --> 00:07:29,230 Also consider that it's easier to heal your robots 156 00:07:29,230 --> 00:07:31,927 because you're going to have this area sort of established. 157 00:07:31,927 --> 00:07:33,510 You're going to know where things are. 158 00:07:33,510 --> 00:07:36,035 You're going to have a safe path to the nearest medbay 159 00:07:36,035 --> 00:07:36,910 that you might build. 160 00:07:36,910 --> 00:07:40,830 And later on we're going to look at the effects of building 161 00:07:40,830 --> 00:07:41,992 medbay versus other things. 162 00:07:41,992 --> 00:07:43,200 It's going to be really good. 163 00:07:45,830 --> 00:07:48,270 So these are just sort of a first look at things. 164 00:07:48,270 --> 00:07:51,270 There's some other stuff in here, 165 00:07:51,270 --> 00:07:53,140 like about tactical withdrawal. 166 00:07:53,140 --> 00:07:56,130 When do you realize that everything's gone to shit, 167 00:07:56,130 --> 00:07:58,550 and you've got to back out? 168 00:07:58,550 --> 00:08:03,320 What's the value of preserving your units versus the penalty 169 00:08:03,320 --> 00:08:04,940 of having them not in combat? 170 00:08:04,940 --> 00:08:07,990 They're in transit between wherever they are 171 00:08:07,990 --> 00:08:10,250 and the medical bays that you've built. 172 00:08:10,250 --> 00:08:12,420 Because you could easily imagine filling the whole 173 00:08:12,420 --> 00:08:15,270 map with medical bays just to reduce that transit time. 174 00:08:15,270 --> 00:08:19,020 And would that be worth it compared to just not 175 00:08:19,020 --> 00:08:21,420 having them go to medbay or only engaging in battles 176 00:08:21,420 --> 00:08:23,200 within a certain range of the medbay? 177 00:08:23,200 --> 00:08:25,560 So you might actually be retreating to a range 178 00:08:25,560 --> 00:08:29,280 rather than directly to the thing itself. 179 00:08:29,280 --> 00:08:31,000 These are things that you'll probably 180 00:08:31,000 --> 00:08:34,100 end up thinking about if you haven't already. 181 00:08:34,100 --> 00:08:37,549 Let's jump straight into some simulations. 182 00:08:37,549 --> 00:08:39,720 So what I've done in this model-- 183 00:08:39,720 --> 00:08:43,145 let me zoom in just a little bit-- is 184 00:08:43,145 --> 00:08:46,890 I've got a system where you can build bots. 185 00:08:46,890 --> 00:08:52,360 Bots will die if you have less than zero resources. 186 00:08:52,360 --> 00:08:54,329 You can build generators, as you can see here. 187 00:08:54,329 --> 00:08:56,120 I mean, I'm not expecting you to read this. 188 00:08:56,120 --> 00:08:58,990 But just showing you the parts that are in the model 189 00:08:58,990 --> 00:09:01,779 so that when you look at the model results, 190 00:09:01,779 --> 00:09:04,320 you can see for yourself whether you think they're realistic. 191 00:09:04,320 --> 00:09:05,900 So you can build generators. 192 00:09:05,900 --> 00:09:07,980 And as in the game, the generators 193 00:09:07,980 --> 00:09:12,140 will provide you an additional 10 resources per turn. 194 00:09:12,140 --> 00:09:15,620 And the cost of building a generator 195 00:09:15,620 --> 00:09:17,660 is 20 times the number of encampments 196 00:09:17,660 --> 00:09:18,870 that are currently built. 197 00:09:18,870 --> 00:09:20,600 And here's plus 1 for the additional one 198 00:09:20,600 --> 00:09:23,060 that you're building. 199 00:09:23,060 --> 00:09:24,870 Same thing applies for suppliers. 200 00:09:24,870 --> 00:09:27,180 It's got the same build cost. 201 00:09:27,180 --> 00:09:30,610 But instead, it's advantage is that the spawn time then 202 00:09:30,610 --> 00:09:31,770 becomes this number. 203 00:09:31,770 --> 00:09:34,330 Note that this is different from what it was in Lecture 1. 204 00:09:34,330 --> 00:09:38,580 In Lecture 1, the spawn time was 10-- it was this. 205 00:09:38,580 --> 00:09:43,514 It was 10 times 0.95 to the power of supplier number, 206 00:09:43,514 --> 00:09:45,930 where supplier number is the number of suppliers you have. 207 00:09:45,930 --> 00:09:47,250 That's what it used to be. 208 00:09:47,250 --> 00:09:49,920 But it's been switched to this number 209 00:09:49,920 --> 00:09:54,000 in order to make it slightly worse, because it was too good. 210 00:09:54,000 --> 00:09:57,170 This and the other changes have been updated on the Battlecode 211 00:09:57,170 --> 00:09:59,097 data sheet that I made that you might 212 00:09:59,097 --> 00:10:00,180 remember from the website. 213 00:10:00,180 --> 00:10:02,096 So if you're using that, make sure that you've 214 00:10:02,096 --> 00:10:03,070 updated recently. 215 00:10:03,070 --> 00:10:06,000 And when you download it, hit F5 or Refresh, 216 00:10:06,000 --> 00:10:07,990 because it has the same file name as before. 217 00:10:07,990 --> 00:10:09,860 So your computer might not download it again 218 00:10:09,860 --> 00:10:11,500 unless you specifically tell it to. 219 00:10:11,500 --> 00:10:13,041 That's just something to worry about. 220 00:10:13,041 --> 00:10:15,545 Because it's terrible to be on a bad version of the specs 221 00:10:15,545 --> 00:10:16,920 because then you think I'm wrong, 222 00:10:16,920 --> 00:10:21,970 and that's just very, very hard to handle for me. 223 00:10:21,970 --> 00:10:23,830 So here's your spawn time here. 224 00:10:23,830 --> 00:10:25,920 So that's what your suppliers are doing for you. 225 00:10:25,920 --> 00:10:30,070 And so I've made this model that tries to build these things, 226 00:10:30,070 --> 00:10:33,550 tries to build robots, and it kills the excess ones. 227 00:10:33,550 --> 00:10:37,050 So we're trying to reach a large number of robots. 228 00:10:37,050 --> 00:10:39,830 to Zoom out just a little bit here. 229 00:10:39,830 --> 00:10:44,070 So you can see here that we've got power over time, 230 00:10:44,070 --> 00:10:45,464 and this is for 500 rounds. 231 00:10:45,464 --> 00:10:46,880 I've got it so that you can change 232 00:10:46,880 --> 00:10:48,130 the length of the simulation. 233 00:10:48,130 --> 00:10:50,340 And we're going to see quite a number of simulations 234 00:10:50,340 --> 00:10:51,840 here today. 235 00:10:51,840 --> 00:10:54,250 So you could see here that, at first, you 236 00:10:54,250 --> 00:10:55,290 start out with no power. 237 00:10:55,290 --> 00:10:57,760 I don't know if this is 100% realistic because I think 238 00:10:57,760 --> 00:11:00,660 in the game you might actually start out with full power 239 00:11:00,660 --> 00:11:01,950 to begin with. 240 00:11:01,950 --> 00:11:03,575 But that's a transient effect. 241 00:11:03,575 --> 00:11:04,950 I wouldn't really worry about it. 242 00:11:04,950 --> 00:11:06,300 We're physicists here. 243 00:11:06,300 --> 00:11:08,750 We talk about orders of magnitude. 244 00:11:08,750 --> 00:11:10,290 Yes. 245 00:11:10,290 --> 00:11:13,080 So you could see here that initially your power decays 246 00:11:13,080 --> 00:11:15,770 upward to some relatively stable value. 247 00:11:15,770 --> 00:11:18,210 But it begins to decrease as you build robots, 248 00:11:18,210 --> 00:11:21,760 because as the number of robots increases over time, 249 00:11:21,760 --> 00:11:23,340 the upkeep is increasing. 250 00:11:23,340 --> 00:11:26,800 And so you're decaying downward to stable values as you go. 251 00:11:26,800 --> 00:11:29,580 And then it becomes a stable number of robots 252 00:11:29,580 --> 00:11:33,590 as they are produced, and then they also run out of energy. 253 00:11:33,590 --> 00:11:36,130 So I've also plotted down here the maximum number 254 00:11:36,130 --> 00:11:38,840 of robots that are achieved within a simulation. 255 00:11:38,840 --> 00:11:43,050 So this shows that you hit 40 robots at round 391. 256 00:11:43,050 --> 00:11:45,000 We're going to end up looking at this quantity 257 00:11:45,000 --> 00:11:47,170 and trying to see how we can make the most 258 00:11:47,170 --> 00:11:49,780 robots at the shortest round number. 259 00:11:49,780 --> 00:11:52,850 Or how we can have a trade-off between maybe getting 260 00:11:52,850 --> 00:11:55,350 the most robots at an early number 261 00:11:55,350 --> 00:11:57,670 or getting more robots at a later number, which 262 00:11:57,670 --> 00:11:59,920 would embody the difference between a rush 263 00:11:59,920 --> 00:12:03,020 strategy and an econ strategy. 264 00:12:03,020 --> 00:12:04,820 I've also plotted the spawn time so 265 00:12:04,820 --> 00:12:07,030 that you can see how the effect of suppliers 266 00:12:07,030 --> 00:12:10,180 is changing how long it takes for robots to spawn. 267 00:12:10,180 --> 00:12:12,700 In this example, there aren't any suppliers, 268 00:12:12,700 --> 00:12:14,730 so the spawn time is flat. 269 00:12:14,730 --> 00:12:16,439 So let's change the example a little bit. 270 00:12:16,439 --> 00:12:18,021 I'm going to zoom out just a tiny bit, 271 00:12:18,021 --> 00:12:20,290 making everything illegible, so that you can see also 272 00:12:20,290 --> 00:12:23,140 the inputs to this function that I've made. 273 00:12:23,140 --> 00:12:27,550 And so I'm going to make it so that the bytecode usage is 274 00:12:27,550 --> 00:12:28,470 5,000. 275 00:12:28,470 --> 00:12:30,610 And what effect should that have? 276 00:12:30,610 --> 00:12:33,600 It should decrease the number of robots that we can sustain. 277 00:12:33,600 --> 00:12:35,720 And sure enough, we see that when we run it, 278 00:12:35,720 --> 00:12:40,120 the maximum number we hit is now 27 robots at round 261. 279 00:12:40,120 --> 00:12:42,776 So we've hit there sooner, but it's a smaller number. 280 00:12:42,776 --> 00:12:45,110 It's just worse in every way. 281 00:12:45,110 --> 00:12:46,650 You want to save bytecodes. 282 00:12:46,650 --> 00:12:48,530 So let's go back to that example. 283 00:12:48,530 --> 00:12:50,560 Now, generator built rounds and supplier 284 00:12:50,560 --> 00:12:53,520 built rounds is the number of rounds between every time it 285 00:12:53,520 --> 00:12:56,610 will attempt to build a generator or a supplier. 286 00:12:56,610 --> 00:12:58,660 This is the basic version that I started with. 287 00:12:58,660 --> 00:13:01,127 So let's start by building generators every 10 rounds. 288 00:13:01,127 --> 00:13:03,460 This is assuming that there are enough generators around 289 00:13:03,460 --> 00:13:04,740 for us to build on. 290 00:13:04,740 --> 00:13:07,320 So you can see here that the first generator is built around 291 00:13:07,320 --> 00:13:07,850 here. 292 00:13:07,850 --> 00:13:11,184 There's a tiny dip, and here's another and another. 293 00:13:11,184 --> 00:13:12,600 But the generator doesn't actually 294 00:13:12,600 --> 00:13:15,790 kick in and start to take effect until 50 turns later 295 00:13:15,790 --> 00:13:18,360 because there's a capture delay, and it doesn't do anything 296 00:13:18,360 --> 00:13:20,010 while it's being captured. 297 00:13:20,010 --> 00:13:23,390 Then once these are captured, the amount of power 298 00:13:23,390 --> 00:13:24,890 you have skyrockets. 299 00:13:24,890 --> 00:13:27,240 So this was the previous maximum of 200. 300 00:13:27,240 --> 00:13:30,450 And now we're up to 2,000 power in just 500 rounds. 301 00:13:30,450 --> 00:13:35,520 This shows that you can really amplify your economy rapidly. 302 00:13:35,520 --> 00:13:39,210 You'll notice here that the sawtooth behavior 303 00:13:39,210 --> 00:13:41,380 is becoming increasingly severe. 304 00:13:41,380 --> 00:13:44,070 This is because each one of these motions 305 00:13:44,070 --> 00:13:47,690 downward indicates the purchase of yet another generator, which 306 00:13:47,690 --> 00:13:49,160 costs more than the last. 307 00:13:49,160 --> 00:13:51,280 Because as I mentioned before, the cost 308 00:13:51,280 --> 00:13:54,052 of capturing an encampment is 20 times the number of encampments 309 00:13:54,052 --> 00:13:54,760 you have already. 310 00:13:54,760 --> 00:13:57,080 So that's going to linearly increase. 311 00:13:57,080 --> 00:13:59,350 You could see that it's recovering faster and faster 312 00:13:59,350 --> 00:14:02,530 though because, as has been mentioned, 313 00:14:02,530 --> 00:14:06,300 the generators do produce 10 energy per turn. 314 00:14:06,300 --> 00:14:08,830 So here we can see that it's not hitting any limit 315 00:14:08,830 --> 00:14:10,580 to the number of robots that can be built. 316 00:14:10,580 --> 00:14:13,660 And if we extend the simulation out to 2,000 rounds, 317 00:14:13,660 --> 00:14:16,690 we can see that it just continues on as it was before, 318 00:14:16,690 --> 00:14:18,780 and the number of robots is unlimited. 319 00:14:18,780 --> 00:14:23,370 So if you do find a map that has a whole lot of encampments 320 00:14:23,370 --> 00:14:25,360 to capture-- and we haven't specified 321 00:14:25,360 --> 00:14:27,330 that there's a maximum number of encampments 322 00:14:27,330 --> 00:14:29,610 as far as I know-- then you could end up 323 00:14:29,610 --> 00:14:31,270 just continuing to build these things. 324 00:14:31,270 --> 00:14:33,800 And then it doesn't matter how terrible your micro is 325 00:14:33,800 --> 00:14:38,180 or how terrible your tech is because you'll just 326 00:14:38,180 --> 00:14:39,020 overwhelm the enemy. 327 00:14:39,020 --> 00:14:42,880 Hey, look, at round 1991, what a good year. 328 00:14:42,880 --> 00:14:45,080 That's pretty special. 329 00:14:45,080 --> 00:14:46,780 So let's go back down to 500 where 330 00:14:46,780 --> 00:14:49,360 we can see what's going on, and let's change generator 331 00:14:49,360 --> 00:14:50,510 built rounds to 1. 332 00:14:50,510 --> 00:14:53,290 So now we're going to try to build a generator every round. 333 00:14:53,290 --> 00:14:54,340 But look at here. 334 00:14:54,340 --> 00:14:57,010 These red dots indicating the completion of generators 335 00:14:57,010 --> 00:14:58,970 are non-uniformly spaced. 336 00:14:58,970 --> 00:15:00,590 That seems to indicate that it's not 337 00:15:00,590 --> 00:15:02,950 able to build generators every turn. 338 00:15:02,950 --> 00:15:04,750 That's because there's not enough power. 339 00:15:04,750 --> 00:15:07,270 You can see here that the power is as close to 0 340 00:15:07,270 --> 00:15:10,560 as it possibly can without destroying robots 341 00:15:10,560 --> 00:15:12,930 from bringing it down to negative values. 342 00:15:12,930 --> 00:15:15,360 So you can see here that you can now 343 00:15:15,360 --> 00:15:18,480 get to have more robots than you otherwise would have. 344 00:15:18,480 --> 00:15:19,447 No, that's not true. 345 00:15:19,447 --> 00:15:21,530 You can't have any more robots because we're still 346 00:15:21,530 --> 00:15:23,820 limited by the rate at which they're being produced. 347 00:15:23,820 --> 00:15:25,850 They're only being produced one every 10 rounds, 348 00:15:25,850 --> 00:15:28,970 and that's really cramping our style, as it were. 349 00:15:28,970 --> 00:15:31,790 So let's increase this back up to a million 350 00:15:31,790 --> 00:15:34,260 so that it's not building any more generators. 351 00:15:34,260 --> 00:15:36,290 Let's try building just suppliers. 352 00:15:36,290 --> 00:15:38,990 So let's build a supplier every 10 rounds. 353 00:15:38,990 --> 00:15:40,800 As you can see here, here's the money 354 00:15:40,800 --> 00:15:42,650 being expended on suppliers. 355 00:15:42,650 --> 00:15:45,840 And pretty soon, even before round 100, 356 00:15:45,840 --> 00:15:48,640 we start hitting a point where the number of robots we have, 357 00:15:48,640 --> 00:15:51,500 which is accelerating over time as the spawn time 358 00:15:51,500 --> 00:15:54,100 is decreasing, the number of robots going up 359 00:15:54,100 --> 00:15:56,360 is preventing us from getting enough power 360 00:15:56,360 --> 00:15:58,100 to continue building suppliers. 361 00:15:58,100 --> 00:16:00,500 So we're actually capped. 362 00:16:00,500 --> 00:16:04,030 This behavior, where the power goes down and crashes, 363 00:16:04,030 --> 00:16:08,440 is going to really hurt our ability to play the game. 364 00:16:08,440 --> 00:16:12,630 It becomes exacerbated the faster you build suppliers. 365 00:16:12,630 --> 00:16:15,850 Because you see here, I built these suppliers, and then, 366 00:16:15,850 --> 00:16:16,570 bingo. 367 00:16:16,570 --> 00:16:19,040 I've only built a total of-- let's see here, 368 00:16:19,040 --> 00:16:24,700 supplier number, I've built a total of eight suppliers 369 00:16:24,700 --> 00:16:29,050 within the first, I don't know, this looks like 40 turns. 370 00:16:29,050 --> 00:16:30,830 And now I'm not going to be able to build 371 00:16:30,830 --> 00:16:32,680 anything else for the whole game, 372 00:16:32,680 --> 00:16:36,760 because the next encampment that I buy would cost 8 times 20 373 00:16:36,760 --> 00:16:41,590 is 160, plus 20 for the next one, is going to be 180. 374 00:16:41,590 --> 00:16:43,740 I simply can't afford that if my power is never 375 00:16:43,740 --> 00:16:45,770 exceeding 170 over here. 376 00:16:45,770 --> 00:16:48,460 So that's pretty much going to be a crippling blow. 377 00:16:48,460 --> 00:16:51,880 So maybe, as my player, I need to do one of two things. 378 00:16:51,880 --> 00:16:54,780 One, maybe I should build suppliers and generators. 379 00:16:54,780 --> 00:16:57,610 Two, I could notice that maybe the enemy has killed 380 00:16:57,610 --> 00:17:00,430 a bunch of my generators, but I still have suppliers left over. 381 00:17:00,430 --> 00:17:01,626 Have you thought about that? 382 00:17:01,626 --> 00:17:03,000 Maybe some of your suppliers will 383 00:17:03,000 --> 00:17:05,540 have to destroy themselves to make room 384 00:17:05,540 --> 00:17:07,250 for more power generation. 385 00:17:07,250 --> 00:17:10,790 It could be something that happens to you less than not 386 00:17:10,790 --> 00:17:15,200 ever, or which is to say more often than not ever. 387 00:17:15,200 --> 00:17:17,460 So let's make it 10 and 10. 388 00:17:17,460 --> 00:17:18,919 So we're trying to do some of each. 389 00:17:18,919 --> 00:17:20,168 Well, it's not really working. 390 00:17:20,168 --> 00:17:22,130 It's like building some, and then the others 391 00:17:22,130 --> 00:17:24,970 because one of them is taking precedence over the first. 392 00:17:24,970 --> 00:17:28,329 Maybe we'll try building these every 20 and these every 10. 393 00:17:28,329 --> 00:17:29,870 Well, now it's building some of each. 394 00:17:29,870 --> 00:17:31,280 This is not so bad. 395 00:17:31,280 --> 00:17:33,880 So now we're getting to 76 robots at 496. 396 00:17:33,880 --> 00:17:35,850 Our power is going up, but we're not so much 397 00:17:35,850 --> 00:17:37,620 wasting it as we were before. 398 00:17:37,620 --> 00:17:40,120 And we can see that the spawn time has gone all the way down 399 00:17:40,120 --> 00:17:41,110 to half. 400 00:17:41,110 --> 00:17:43,640 Now, this does assume that none of your robots 401 00:17:43,640 --> 00:17:44,860 are being destroyed. 402 00:17:44,860 --> 00:17:46,880 If you're actively losing robots, 403 00:17:46,880 --> 00:17:49,370 it makes perfect sense to build only suppliers 404 00:17:49,370 --> 00:17:51,660 because, at that point, you can clump up your units 405 00:17:51,660 --> 00:17:53,900 and lose them, which will give you the money 406 00:17:53,900 --> 00:17:55,260 to continue building units. 407 00:17:55,260 --> 00:17:59,450 It's only when you've favored suppliers and then not attacked 408 00:17:59,450 --> 00:18:02,020 that you're wasting your effort and time. 409 00:18:02,020 --> 00:18:04,560 So this is something that I saw in some of the scrimmage 410 00:18:04,560 --> 00:18:06,020 matches that I've been looking at, 411 00:18:06,020 --> 00:18:08,840 because we devs have access to all kinds of secret information 412 00:18:08,840 --> 00:18:12,189 about you, including the performance 413 00:18:12,189 --> 00:18:13,730 of your players in scrimmage matches. 414 00:18:13,730 --> 00:18:16,040 And so I've been downloading these maps and looking at them. 415 00:18:16,040 --> 00:18:17,430 And in these matches, I've tended 416 00:18:17,430 --> 00:18:19,580 to see that, a lot of times, we're 417 00:18:19,580 --> 00:18:21,957 favoring suppliers but not attacking. 418 00:18:21,957 --> 00:18:23,540 Other times, we're favoring suppliers, 419 00:18:23,540 --> 00:18:25,990 and we're just sending our units one by one 420 00:18:25,990 --> 00:18:27,820 to be killed by the enemy blob. 421 00:18:27,820 --> 00:18:30,470 I think that's also sub-optimal. 422 00:18:30,470 --> 00:18:32,680 But at the same time, we have seen 423 00:18:32,680 --> 00:18:34,300 quite a few good strategies. 424 00:18:34,300 --> 00:18:36,470 I've seen some great pathing, and I've 425 00:18:36,470 --> 00:18:38,660 seen some great solving for the map. 426 00:18:38,660 --> 00:18:40,494 I think that there's a lot to be done there. 427 00:18:40,494 --> 00:18:42,076 And I have confidence that we're going 428 00:18:42,076 --> 00:18:44,440 to see a lot of great matches in the sprint tournament. 429 00:18:44,440 --> 00:18:47,540 So let's go back to the model here and look again 430 00:18:47,540 --> 00:18:49,490 at maybe getting a build order. 431 00:18:49,490 --> 00:18:52,020 So here, the build order I'm defining as, 432 00:18:52,020 --> 00:18:54,580 what order do you get suppliers and generators? 433 00:18:54,580 --> 00:18:57,840 This way of doing it, as you see I've implemented it here, 434 00:18:57,840 --> 00:19:00,200 is kind of inefficient, because whichever 435 00:19:00,200 --> 00:19:02,810 one goes first is just whichever one 436 00:19:02,810 --> 00:19:04,720 hit the round counter or something. 437 00:19:04,720 --> 00:19:07,970 So here I re-implement the whole system with an explicit 438 00:19:07,970 --> 00:19:09,150 build order. 439 00:19:09,150 --> 00:19:13,560 So I can say, all right, please give me a bunch of 2, 440 00:19:13,560 --> 00:19:18,050 and then give me 2 and then 1 in alternating turns. 441 00:19:18,050 --> 00:19:20,740 So you can see here-- it's not working very well-- 442 00:19:20,740 --> 00:19:25,100 2 is my number for the supplier, and 1 443 00:19:25,100 --> 00:19:27,240 is my indicator for the generator. 444 00:19:27,240 --> 00:19:31,830 So here we do five 2's, and then we alternate 2 and 1 forever. 445 00:19:31,830 --> 00:19:35,665 So there are the five 2's, and then we've got a 2, 1, and a 2, 446 00:19:35,665 --> 00:19:36,690 and a 1. 447 00:19:36,690 --> 00:19:39,010 Well, that's not very good because we still crash, 448 00:19:39,010 --> 00:19:41,490 and we only hit a maximum of 57 robots. 449 00:19:41,490 --> 00:19:44,570 So let's consider reducing this number of 2's. 450 00:19:44,570 --> 00:19:46,010 Well, that's much better. 451 00:19:46,010 --> 00:19:50,035 So now we've gotten up to 87 robots around 495. 452 00:19:50,035 --> 00:19:51,410 Now, if you've been keeping track 453 00:19:51,410 --> 00:19:53,060 in your mind of which number of robots 454 00:19:53,060 --> 00:19:54,990 we've hit at which round, congratulations. 455 00:19:54,990 --> 00:19:56,606 You're much better at that than me. 456 00:19:56,606 --> 00:19:58,230 Later on, I'm going to be showing plots 457 00:19:58,230 --> 00:20:00,690 so that we don't have to memorize how many robots we 458 00:20:00,690 --> 00:20:01,940 have at what round. 459 00:20:01,940 --> 00:20:03,600 But for the sake of illustration, 460 00:20:03,600 --> 00:20:06,150 it's pretty useful to be able to say, all right, if I 461 00:20:06,150 --> 00:20:09,740 add one more supplier here, how does that help me? 462 00:20:09,740 --> 00:20:11,570 Well, if you look very carefully, 463 00:20:11,570 --> 00:20:14,232 it's going to shift your early number of robots up, 464 00:20:14,232 --> 00:20:16,690 and it's probably going to shift your late number of robots 465 00:20:16,690 --> 00:20:17,189 down. 466 00:20:17,189 --> 00:20:18,900 That's the way it's changing the shape. 467 00:20:18,900 --> 00:20:22,490 So you can see here that that's a very subtle change. 468 00:20:22,490 --> 00:20:24,910 Let's change it so that we're only building suppliers, 469 00:20:24,910 --> 00:20:27,020 and then we're only building generators. 470 00:20:27,020 --> 00:20:29,000 So there we've built a few suppliers, and then 471 00:20:29,000 --> 00:20:30,280 a lot of generators. 472 00:20:30,280 --> 00:20:31,770 That's 62 robots. 473 00:20:31,770 --> 00:20:33,480 We can keep changing it and try. 474 00:20:33,480 --> 00:20:34,700 Here's a few more suppliers. 475 00:20:34,700 --> 00:20:35,491 Well, look at that. 476 00:20:35,491 --> 00:20:38,210 We never got the chance to build any generators because we 477 00:20:38,210 --> 00:20:40,340 ran out of energy when we were building suppliers. 478 00:20:40,340 --> 00:20:43,790 This is the same issue that we were seeing before. 479 00:20:43,790 --> 00:20:45,730 So let's explore the space automatically. 480 00:20:45,730 --> 00:20:47,350 This is kind of weird. 481 00:20:47,350 --> 00:20:49,130 What I'm going to show you is a plot 482 00:20:49,130 --> 00:20:50,960 of the peak number of robots that you've 483 00:20:50,960 --> 00:20:54,799 gotten during the simulation versus the number of rounds. 484 00:20:54,799 --> 00:20:56,340 And what I'm going to do is I'm going 485 00:20:56,340 --> 00:20:59,140 to sort of move along the space in some line, which 486 00:20:59,140 --> 00:21:02,340 is going to be an automatic search for these various things 487 00:21:02,340 --> 00:21:03,950 that we're looking for. 488 00:21:03,950 --> 00:21:07,220 So yeah, so where do you want to be on this graph? 489 00:21:07,220 --> 00:21:09,270 You want to be up here at the upper left 490 00:21:09,270 --> 00:21:11,670 because that means that you're getting a lot of robots 491 00:21:11,670 --> 00:21:13,920 at a small number of rounds. 492 00:21:13,920 --> 00:21:16,240 This is the phenomenon that we were seeing before, 493 00:21:16,240 --> 00:21:20,344 where going from 1, 2, 3, 5, 7, 8-- 494 00:21:20,344 --> 00:21:23,010 you could see that it's skipping some numbers because they would 495 00:21:23,010 --> 00:21:25,720 have written over one another. 496 00:21:25,720 --> 00:21:27,950 Yeah, I'll show it with all the numbers. 497 00:21:31,122 --> 00:21:31,830 Well, that's odd. 498 00:21:31,830 --> 00:21:34,450 It changed shape. 499 00:21:34,450 --> 00:21:38,300 Ba, ba da, ba, ba, ba, ba, ba, ba. 500 00:21:38,300 --> 00:21:39,680 Well, let's go with it. 501 00:21:39,680 --> 00:21:44,690 So this example is-- did I define the explicit system? 502 00:21:44,690 --> 00:21:46,720 This is the explicit system here. 503 00:21:46,720 --> 00:21:48,160 Did I set that? 504 00:21:48,160 --> 00:21:49,250 And then did I define it? 505 00:21:49,250 --> 00:21:51,810 Well, all right, that's how it is. 506 00:21:51,810 --> 00:21:57,610 So this system is showing you from 0 up to 15 507 00:21:57,610 --> 00:21:59,630 for every time it's trying a longer 508 00:21:59,630 --> 00:22:03,160 or a shorter system of building the suppliers. 509 00:22:03,160 --> 00:22:05,120 So if it says 0, it means it just 510 00:22:05,120 --> 00:22:06,650 goes straight into generators. 511 00:22:06,650 --> 00:22:08,540 And if it says a higher number, then it 512 00:22:08,540 --> 00:22:12,450 has built that many suppliers before it goes into generators. 513 00:22:12,450 --> 00:22:15,020 So you could see, yeah, so that's there. 514 00:22:15,020 --> 00:22:17,322 And the numbers sort of start to overlap one another, 515 00:22:17,322 --> 00:22:19,780 so I made this little function that gets rid of the numbers 516 00:22:19,780 --> 00:22:21,600 if they're too close to another number. 517 00:22:21,600 --> 00:22:24,211 And that changed the way it looked quite a bit. 518 00:22:24,211 --> 00:22:27,925 [INAUDIBLE] 2,000 at the bottom if you take that [INAUDIBLE]? 519 00:22:27,925 --> 00:22:29,440 I see, I see. 520 00:22:29,440 --> 00:22:30,660 It was going out to 2,000. 521 00:22:30,660 --> 00:22:32,050 Thank you, thank you. 522 00:22:32,050 --> 00:22:35,240 So let's make this, yeah, let's make this just to 1,000. 523 00:22:35,240 --> 00:22:37,250 Strategy exploration is there. 524 00:22:37,250 --> 00:22:39,820 Simplified exploration is here. 525 00:22:39,820 --> 00:22:40,760 Yeah. 526 00:22:40,760 --> 00:22:42,240 So there are the numbers. 527 00:22:42,240 --> 00:22:45,470 And this phenomenon is the thing that we've been seeing before, 528 00:22:45,470 --> 00:22:49,840 that as you have more and more suppliers to begin with, 529 00:22:49,840 --> 00:22:52,530 it's OK up to a point, at which you 530 00:22:52,530 --> 00:22:54,230 can't build any more robots. 531 00:22:54,230 --> 00:22:56,480 And you hit a limit because you've run out of power. 532 00:22:56,480 --> 00:22:56,980 OK. 533 00:22:56,980 --> 00:22:58,900 That's what we've seen, seen it 100 ways. 534 00:22:58,900 --> 00:22:59,720 That's good. 535 00:22:59,720 --> 00:23:01,450 Let's switch to a mix of things. 536 00:23:01,450 --> 00:23:04,370 So instead of doing all one, we do a mix 537 00:23:04,370 --> 00:23:06,540 so that we're alternating one and the other. 538 00:23:06,540 --> 00:23:09,640 So in this example, we're starting 539 00:23:09,640 --> 00:23:13,490 with i numbers of suppliers, and then we're 540 00:23:13,490 --> 00:23:15,840 going to follow it up with alternating 541 00:23:15,840 --> 00:23:17,540 generators and suppliers. 542 00:23:17,540 --> 00:23:19,290 And you can see here that the best 543 00:23:19,290 --> 00:23:21,680 result seems to be something. 544 00:23:21,680 --> 00:23:23,180 I mean, you really can't decide just 545 00:23:23,180 --> 00:23:26,340 based on this graph because these are maximum points. 546 00:23:26,340 --> 00:23:29,400 And if this is 8, is that a better way 547 00:23:29,400 --> 00:23:31,690 to operate for a rush strategy? 548 00:23:31,690 --> 00:23:33,700 Well, here's a way of addressing that question. 549 00:23:33,700 --> 00:23:36,130 Here I've plotted the number of robots 550 00:23:36,130 --> 00:23:38,479 versus the round for this 0. 551 00:23:38,479 --> 00:23:40,020 And you can see here that it's always 552 00:23:40,020 --> 00:23:42,060 above the other peak robot counts. 553 00:23:42,060 --> 00:23:45,040 So that indicates that it's definitively better 554 00:23:45,040 --> 00:23:47,980 to start building generators before you start building 555 00:23:47,980 --> 00:23:51,070 suppliers, at least if you're aiming for the peak robot 556 00:23:51,070 --> 00:23:51,570 condition. 557 00:23:51,570 --> 00:23:55,020 You're trying to get the greatest number of robots. 558 00:23:55,020 --> 00:23:56,130 So there you go. 559 00:23:56,130 --> 00:23:57,440 It's better always to use zero. 560 00:23:57,440 --> 00:24:01,480 And here if we compare different strategies, 561 00:24:01,480 --> 00:24:03,040 we can see them on the same space. 562 00:24:03,040 --> 00:24:04,620 And one is obviously better. 563 00:24:04,620 --> 00:24:07,750 This one above here that's new is much better than the one 564 00:24:07,750 --> 00:24:08,350 we had before. 565 00:24:08,350 --> 00:24:10,750 It gets us more robots at the same round number. 566 00:24:10,750 --> 00:24:12,750 And again, we're trying to get to the upper left 567 00:24:12,750 --> 00:24:13,860 of this graph. 568 00:24:13,860 --> 00:24:17,460 This strategy consists of building a generator, 569 00:24:17,460 --> 00:24:23,300 and then building a supplier i times. 570 00:24:23,300 --> 00:24:25,450 So we'll do that set i times, and then we'll 571 00:24:25,450 --> 00:24:27,795 go into building 1, 2, 2. 572 00:24:27,795 --> 00:24:29,920 So then we'll be building a generator for every two 573 00:24:29,920 --> 00:24:31,210 suppliers. 574 00:24:31,210 --> 00:24:35,570 And we could see that this is much better at any point. 575 00:24:35,570 --> 00:24:38,755 So that's pretty interesting. 576 00:24:38,755 --> 00:24:39,880 That is pretty interesting. 577 00:24:39,880 --> 00:24:41,620 Because then we can say, all right, 578 00:24:41,620 --> 00:24:43,430 I've played around with this. 579 00:24:43,430 --> 00:24:44,960 Maybe it's better to have three. 580 00:24:44,960 --> 00:24:45,870 Is that even better? 581 00:24:45,870 --> 00:24:47,730 We'll see, we'll see. 582 00:24:47,730 --> 00:24:49,450 That changes the shape a little bit. 583 00:24:49,450 --> 00:24:51,830 So that gives me a bit of an improvement in this region. 584 00:24:51,830 --> 00:24:55,270 So if we really want to have the most robots at this round, 585 00:24:55,270 --> 00:24:57,865 possibly the best way to do it is to start here. 586 00:24:57,865 --> 00:25:00,320 And I know that these are all pretty obscure-looking, 587 00:25:00,320 --> 00:25:04,610 so I'm going to just skip straight on down to over here, 588 00:25:04,610 --> 00:25:06,930 where we can look at the effect of a rush. 589 00:25:06,930 --> 00:25:08,960 And we can see it very concretely 590 00:25:08,960 --> 00:25:16,050 that, in this example, we've got the first guy in blue. 591 00:25:16,050 --> 00:25:20,330 He's building only generators for 40 rounds, 592 00:25:20,330 --> 00:25:22,790 and then he's going to start building suppliers. 593 00:25:22,790 --> 00:25:25,160 So there you can see blue is building only generators, 594 00:25:25,160 --> 00:25:26,743 and then he starts building suppliers. 595 00:25:26,743 --> 00:25:29,970 And his robot production rate increases. 596 00:25:29,970 --> 00:25:33,510 Here in red, the red guy is starting by building suppliers. 597 00:25:33,510 --> 00:25:38,870 And so you can see he caps out at 41 suppliers, or 41 robots 598 00:25:38,870 --> 00:25:41,490 for a moment, and then he's back to oscillating. 599 00:25:41,490 --> 00:25:45,990 So he's got a military advantage in this window starting 600 00:25:45,990 --> 00:25:49,500 from round 100 going up to round 300, where, for a time, 601 00:25:49,500 --> 00:25:51,650 he's going to outnumber the enemy. 602 00:25:51,650 --> 00:25:54,500 And his goal is to win during this time. 603 00:25:54,500 --> 00:25:58,120 So if you outnumber the enemy starting at round 100 604 00:25:58,120 --> 00:26:01,140 and going to 300, here's what you have to do. 605 00:26:01,140 --> 00:26:03,960 You have to get to the enemy and start shooting at him. 606 00:26:03,960 --> 00:26:07,670 So if the map is really, really big, 607 00:26:07,670 --> 00:26:10,009 like if the map is 100, size 100, 608 00:26:10,009 --> 00:26:11,425 you don't have the pickax upgrade. 609 00:26:11,425 --> 00:26:17,470 So you're going to be defusing mines at 12 rounds per mine. 610 00:26:17,470 --> 00:26:20,694 If you've got 50 mines in the way and 12 each, 611 00:26:20,694 --> 00:26:22,610 there's no way that you're going to get there. 612 00:26:22,610 --> 00:26:24,550 Because it's going to take you 500 rounds just 613 00:26:24,550 --> 00:26:26,091 to get to the enemy, and you'll never 614 00:26:26,091 --> 00:26:27,970 actually get to start shooting. 615 00:26:27,970 --> 00:26:30,320 But if you can find a straight path to your enemy, 616 00:26:30,320 --> 00:26:32,570 even if the map is 50 units long, 617 00:26:32,570 --> 00:26:34,950 you can get there and start capitalizing on your unit 618 00:26:34,950 --> 00:26:37,560 advantage before his econ play kicks in. 619 00:26:37,560 --> 00:26:40,392 So there you go, a very concrete example 620 00:26:40,392 --> 00:26:43,177 of the effects of rushing or playing an econ. 621 00:26:43,177 --> 00:26:44,760 At the same time, you could definitely 622 00:26:44,760 --> 00:26:46,499 imagine intermediate strategies. 623 00:26:46,499 --> 00:26:48,290 So here I'm just going to go ahead and plot 624 00:26:48,290 --> 00:26:52,670 a third strategy, which maybe I'll make in green. 625 00:26:52,670 --> 00:26:54,600 And maybe this strategy is a mix of the two. 626 00:26:54,600 --> 00:26:59,380 So instead of starting with just generators or just suppliers, 627 00:26:59,380 --> 00:27:02,470 we'll do a combination of generators and suppliers. 628 00:27:02,470 --> 00:27:03,180 Now look at that. 629 00:27:03,180 --> 00:27:04,550 That's pretty interesting. 630 00:27:04,550 --> 00:27:09,030 Let's extend the simulation length to 800 rounds, 631 00:27:09,030 --> 00:27:11,470 and we'll be able to see the effects. 632 00:27:11,470 --> 00:27:14,600 So now we see that the green player does almost as well 633 00:27:14,600 --> 00:27:15,510 as the red player. 634 00:27:15,510 --> 00:27:17,850 It's almost indistinguishable at this distance. 635 00:27:17,850 --> 00:27:19,410 And given the defensive advantage 636 00:27:19,410 --> 00:27:22,040 we talked about earlier, it may be enough for the green player 637 00:27:22,040 --> 00:27:23,060 to hold off. 638 00:27:23,060 --> 00:27:25,400 He'll still be able to smash the red player. 639 00:27:25,400 --> 00:27:27,950 And he's still got an advantage over the blue player 640 00:27:27,950 --> 00:27:30,340 without being that much at a disadvantage. 641 00:27:30,340 --> 00:27:32,570 That is to say that the green advantage lasts 642 00:27:32,570 --> 00:27:34,330 until about round 600. 643 00:27:34,330 --> 00:27:37,270 Let's zoom in a little bit so that we can see round 600 644 00:27:37,270 --> 00:27:40,320 and try to assess how much better the green player is 645 00:27:40,320 --> 00:27:41,385 than the blue player. 646 00:27:41,385 --> 00:27:43,680 So here, once again, green is building 647 00:27:43,680 --> 00:27:47,230 alternating generators and suppliers. 648 00:27:47,230 --> 00:27:49,240 And he has an advantage over blue 649 00:27:49,240 --> 00:27:54,540 starting at about round 100 and going to about round 450. 650 00:27:54,540 --> 00:27:56,040 That's a pretty big round and that's 651 00:27:56,040 --> 00:27:58,360 a pretty big advantage for a pretty long time. 652 00:27:58,360 --> 00:28:01,400 It's only at that time that blue begins to take off 653 00:28:01,400 --> 00:28:03,490 and gets a serious advantage. 654 00:28:03,490 --> 00:28:07,150 So you can see here that there's a pretty significant difference 655 00:28:07,150 --> 00:28:09,510 between different strategies and that you 656 00:28:09,510 --> 00:28:11,900 can achieve a significant difference of units. 657 00:28:11,900 --> 00:28:14,080 But how many different differences of units 658 00:28:14,080 --> 00:28:16,920 are important to start really making a difference? 659 00:28:16,920 --> 00:28:19,650 I mean, if you have 10 units versus their 11, 660 00:28:19,650 --> 00:28:21,040 how good is that? 661 00:28:21,040 --> 00:28:22,130 Is that a lot? 662 00:28:22,130 --> 00:28:22,755 Is it a little? 663 00:28:22,755 --> 00:28:24,512 It doesn't seem like very much. 664 00:28:24,512 --> 00:28:25,970 Well, to answer that question, I've 665 00:28:25,970 --> 00:28:27,550 made yet another simulation. 666 00:28:27,550 --> 00:28:29,920 Because why not do a simulation? 667 00:28:29,920 --> 00:28:31,750 Simulations are fun. 668 00:28:31,750 --> 00:28:33,910 So here's a look at it. 669 00:28:33,910 --> 00:28:37,377 And what I've made here is sort of a very basic simulator 670 00:28:37,377 --> 00:28:38,710 that works in the following way. 671 00:28:38,710 --> 00:28:40,920 I'm going to zoom in a little bit. 672 00:28:40,920 --> 00:28:42,536 So this is some combat, and I'm going 673 00:28:42,536 --> 00:28:45,139 to simulate the combat between 10 and 11 units. 674 00:28:45,139 --> 00:28:46,680 I'm going to do it a couple of times. 675 00:28:46,680 --> 00:28:49,525 I'll start out doing it slowly, so I'm 676 00:28:49,525 --> 00:28:50,900 decreasing the compute time here. 677 00:28:50,900 --> 00:28:53,005 So there's 11 units on the bottom, 678 00:28:53,005 --> 00:28:54,490 and these are their hit points. 679 00:28:54,490 --> 00:28:57,100 And there are 10 units on the top. 680 00:28:57,100 --> 00:28:58,350 I'm going to do it once again. 681 00:28:58,350 --> 00:28:59,766 I'm going to start with 10 and 10. 682 00:28:59,766 --> 00:29:02,360 This is team A on top and team B on bottom. 683 00:29:02,360 --> 00:29:03,950 As you can see here, that when there 684 00:29:03,950 --> 00:29:05,480 are the same number of units, they all lose 685 00:29:05,480 --> 00:29:07,190 hit points at the same rate, and they all 686 00:29:07,190 --> 00:29:10,080 die at the same time, at least in my simulation. 687 00:29:10,080 --> 00:29:13,130 When there's an advantage, that extra robot that you have 688 00:29:13,130 --> 00:29:15,910 can start dealing additional damage to his robots. 689 00:29:15,910 --> 00:29:19,500 And so that advantage becomes more significant over time. 690 00:29:19,500 --> 00:29:23,840 So if we have 100 units versus 101 units, 691 00:29:23,840 --> 00:29:25,390 then we'll be here all day. 692 00:29:25,390 --> 00:29:27,040 But the point is that you'll end up 693 00:29:27,040 --> 00:29:28,840 seeing a more and more significant 694 00:29:28,840 --> 00:29:30,880 difference between the two. 695 00:29:30,880 --> 00:29:33,860 That didn't seem to work quite right, did it? 696 00:29:33,860 --> 00:29:35,290 But perhaps it did. 697 00:29:35,290 --> 00:29:37,160 It may just have the exact same result. 698 00:29:37,160 --> 00:29:38,036 I'd be quite curious. 699 00:29:38,036 --> 00:29:39,743 Well, in any case, we're going to go back 700 00:29:39,743 --> 00:29:41,370 to the example we were showing before. 701 00:29:41,370 --> 00:29:44,050 What I'm going to do is I'm going to say, OK, when you have 702 00:29:44,050 --> 00:29:48,920 10 versus 11, the 11 team ends up with four units left. 703 00:29:48,920 --> 00:29:52,000 And two of them are very low hit points, but two of them 704 00:29:52,000 --> 00:29:53,730 have a lot of the points remaining. 705 00:29:53,730 --> 00:29:56,880 So we can start to define two quantities, the robot kill 706 00:29:56,880 --> 00:29:59,890 ratio and the HP kill ratio. 707 00:29:59,890 --> 00:30:04,760 So the robot kill ratio is to say I put in 11 units, 708 00:30:04,760 --> 00:30:07,760 and I got out four of mine remaining. 709 00:30:07,760 --> 00:30:09,890 So 11 is the bottom. 710 00:30:09,890 --> 00:30:12,620 I got four remaining, so that cost me seven. 711 00:30:12,620 --> 00:30:14,680 But in the process of costing me seven, 712 00:30:14,680 --> 00:30:17,200 I was able to take out 10 enemy units. 713 00:30:17,200 --> 00:30:19,536 So that's 10 divided by 7, and if we 714 00:30:19,536 --> 00:30:21,410 make it numerical with a decimal point there, 715 00:30:21,410 --> 00:30:22,201 we see that number. 716 00:30:24,880 --> 00:30:25,420 Question. 717 00:30:25,420 --> 00:30:28,270 Yeah, how [INAUDIBLE]? 718 00:30:28,270 --> 00:30:30,220 So I'm actually modeling the combat 719 00:30:30,220 --> 00:30:32,720 by distributing the attack evenly 720 00:30:32,720 --> 00:30:34,030 from one side and the other. 721 00:30:34,030 --> 00:30:36,730 And then any remaining units will have the opportunity 722 00:30:36,730 --> 00:30:39,950 to deal more damage to the enemy team. 723 00:30:39,950 --> 00:30:42,390 So I don't know exactly how accurate it is. 724 00:30:42,390 --> 00:30:45,070 And if you can manage to maintain a tight choke point, 725 00:30:45,070 --> 00:30:47,130 then you can trade evenly with your enemy. 726 00:30:47,130 --> 00:30:50,470 But that's the best you can do if you're outnumbered. 727 00:30:50,470 --> 00:30:52,824 If you have the advantage and you surround the enemy, 728 00:30:52,824 --> 00:30:54,490 then you could do even better than this. 729 00:30:54,490 --> 00:30:58,280 This is something like a middle ground between those two cases. 730 00:30:58,280 --> 00:30:59,610 Good question. 731 00:30:59,610 --> 00:31:01,840 If you want to see the actual way that it works, 732 00:31:01,840 --> 00:31:05,210 learn Mathematica and read the code that's right here. 733 00:31:05,210 --> 00:31:07,950 So we see here that there's the robot kill ratio. 734 00:31:07,950 --> 00:31:09,520 That's pretty good. 735 00:31:09,520 --> 00:31:12,300 We came to the fight with 10% additional units, 736 00:31:12,300 --> 00:31:16,730 and we end up getting 40% more value out of our units 737 00:31:16,730 --> 00:31:18,825 that we lost. 738 00:31:18,825 --> 00:31:22,830 On a hit point basis, we didn't get that much of an advantage. 739 00:31:22,830 --> 00:31:27,630 Bringing a 10% advantage got us 6% hit point advantage 740 00:31:27,630 --> 00:31:30,840 on how many hit points we were able to lose versus the enemy. 741 00:31:30,840 --> 00:31:32,750 So let's look at a lot of results. 742 00:31:32,750 --> 00:31:34,440 So here on the left, I made a table. 743 00:31:34,440 --> 00:31:38,650 So I've just done the simulation for 20 units versus i units, 744 00:31:38,650 --> 00:31:40,960 where i goes from 21 to 30. 745 00:31:40,960 --> 00:31:44,510 So you can see the force ratio that I'm bringing to the table. 746 00:31:44,510 --> 00:31:47,140 Here I'm imagining that I have more than the enemy. 747 00:31:47,140 --> 00:31:49,140 But of course, you can just invert these numbers 748 00:31:49,140 --> 00:31:50,810 and get the reverse case. 749 00:31:50,810 --> 00:31:55,080 The force ratio I'm bringing is 5% extra, 10% extra, and so on, 750 00:31:55,080 --> 00:31:57,630 and that achieves these unit kill ratios. 751 00:31:57,630 --> 00:31:59,750 You can see here I've capped it out at 20,000 752 00:31:59,750 --> 00:32:01,870 so that it doesn't display the infinity sign. 753 00:32:01,870 --> 00:32:06,970 Because here, once you have more than 1/3 more than the enemy, 754 00:32:06,970 --> 00:32:09,790 you don't lose any units at all during combat. 755 00:32:09,790 --> 00:32:12,100 That's according to the simulation that I've set up. 756 00:32:12,100 --> 00:32:14,720 A pretty amazing result if you ask me. 757 00:32:14,720 --> 00:32:17,500 So you can see here that the unit kill ratio magnifies quite 758 00:32:17,500 --> 00:32:18,530 intensely. 759 00:32:18,530 --> 00:32:21,470 The hit point kill ratio doesn't magnify that intensely. 760 00:32:21,470 --> 00:32:26,670 So here, 5% force ratio gets you about 20% unit kill. 761 00:32:26,670 --> 00:32:28,670 10% gets you 40%. 762 00:32:28,670 --> 00:32:31,450 15% gets you 80% extra. 763 00:32:31,450 --> 00:32:33,620 And then once you get up higher, it just 764 00:32:33,620 --> 00:32:35,150 ramps up more from there. 765 00:32:35,150 --> 00:32:40,700 So it shows that even it's a fight of five versus four, 766 00:32:40,700 --> 00:32:43,690 it's probably a very bad idea to engage the enemy. 767 00:32:43,690 --> 00:32:46,860 Because you're not going to be able to kill any of their units 768 00:32:46,860 --> 00:32:49,460 before they kill all of yours, which means that all of theirs 769 00:32:49,460 --> 00:32:51,310 can sort of head back to a medbay, 770 00:32:51,310 --> 00:32:54,510 get healed up, and then be back to the fight. 771 00:32:54,510 --> 00:32:58,480 It's worth mentioning here that the medbay can end up 772 00:32:58,480 --> 00:33:00,630 being as productive as your headquarters. 773 00:33:00,630 --> 00:33:06,260 So let's go back up to where I've talked about the medbay. 774 00:33:06,260 --> 00:33:07,480 Let's talk about it here. 775 00:33:07,480 --> 00:33:09,690 So let's talk about the production abilities 776 00:33:09,690 --> 00:33:11,380 of your various capabilities. 777 00:33:11,380 --> 00:33:13,610 You've got your headquarters, which 778 00:33:13,610 --> 00:33:17,240 is making units at 40 hit points each. 779 00:33:17,240 --> 00:33:20,430 And let's say that it produces them every 10 rounds, or maybe 780 00:33:20,430 --> 00:33:23,380 every 5 rounds at best if you've got a lot of suppliers. 781 00:33:23,380 --> 00:33:25,400 So this is your headquarters building units. 782 00:33:25,400 --> 00:33:28,410 So it's building hit points every turn. 783 00:33:28,410 --> 00:33:31,240 So it's building from four to eight hit points per turn. 784 00:33:31,240 --> 00:33:32,630 Well, that's not too bad. 785 00:33:32,630 --> 00:33:34,980 That's building four to eight hit points per turn. 786 00:33:34,980 --> 00:33:36,860 But what about everything else? 787 00:33:36,860 --> 00:33:40,350 A medbay can heal two hit points for every 788 00:33:40,350 --> 00:33:41,750 of the adjacent units. 789 00:33:41,750 --> 00:33:44,660 So that there, right there-- if you can multiply correctly-- 790 00:33:44,660 --> 00:33:46,610 it's 16 hit points per turn. 791 00:33:46,610 --> 00:33:48,180 That's so many. 792 00:33:48,180 --> 00:33:51,470 That's the value of two headquarters right there, 793 00:33:51,470 --> 00:33:54,640 even considering headquarters at full supplier capacity. 794 00:33:54,640 --> 00:33:56,810 That just shows that even if you're using medbays 795 00:33:56,810 --> 00:34:00,850 incorrectly or doing it wrong in the various ways that you can, 796 00:34:00,850 --> 00:34:03,580 you'll still be doing a much better job than a headquarters 797 00:34:03,580 --> 00:34:04,279 alone. 798 00:34:04,279 --> 00:34:06,070 I mean, that's ignoring the fact that there 799 00:34:06,070 --> 00:34:08,239 are other things at play here. 800 00:34:08,239 --> 00:34:09,830 Like you have to have injured units 801 00:34:09,830 --> 00:34:12,230 in order to produce hit points in a medbay. 802 00:34:12,230 --> 00:34:13,900 But it's certainly worth mentioning 803 00:34:13,900 --> 00:34:17,179 that even this basic analysis shows what it is. 804 00:34:17,179 --> 00:34:18,696 Very clear. 805 00:34:18,696 --> 00:34:20,570 Now, what's the killing ability of artillery? 806 00:34:20,570 --> 00:34:22,236 It's been said that they're overpowered. 807 00:34:22,236 --> 00:34:24,560 Or that they're quite strong, and they're definitely 808 00:34:24,560 --> 00:34:25,460 worth using. 809 00:34:25,460 --> 00:34:28,320 But is the killing power of an artillery worth 810 00:34:28,320 --> 00:34:30,810 it compared to the healing power of a medbay? 811 00:34:30,810 --> 00:34:32,520 Purely from a numerical standpoint, 812 00:34:32,520 --> 00:34:35,500 you can see here that the best the artillery can do 813 00:34:35,500 --> 00:34:38,420 is to deal 40 damage to its target and 20 damage 814 00:34:38,420 --> 00:34:41,980 to each of eight targets adjacent for a total of 200, 815 00:34:41,980 --> 00:34:43,520 if I did that math correctly. 816 00:34:43,520 --> 00:34:47,040 And it does that every 20 turns, which is its attack delay. 817 00:34:47,040 --> 00:34:49,948 So that gives us 10 hit points per turn. 818 00:34:49,948 --> 00:34:50,489 Look at that. 819 00:34:50,489 --> 00:34:52,929 Oftentimes, 10 less than 16. 820 00:34:52,929 --> 00:34:53,947 True. 821 00:34:53,947 --> 00:34:55,280 It's even going to tell me that. 822 00:34:55,280 --> 00:34:56,870 [LAUGHTER] 823 00:34:56,870 --> 00:34:58,990 Well, what a big surprise. 824 00:34:58,990 --> 00:35:02,850 So you can make the decision for yourself. 825 00:35:02,850 --> 00:35:04,900 And of course, each one has its own uses, 826 00:35:04,900 --> 00:35:07,340 because the artillery is not always 827 00:35:07,340 --> 00:35:08,980 going to be able to deal 10 hit points. 828 00:35:08,980 --> 00:35:11,090 Medbay's not always going to be able to heal units. 829 00:35:11,090 --> 00:35:12,756 Maybe it's too far from the headquarters 830 00:35:12,756 --> 00:35:14,300 to be a real defensive asset. 831 00:35:14,300 --> 00:35:14,846 Maybe not. 832 00:35:14,846 --> 00:35:16,720 There are a lot of considerations to include. 833 00:35:16,720 --> 00:35:18,340 But doing a calculation like this 834 00:35:18,340 --> 00:35:21,380 can certainly help you out in making your decisions. 835 00:35:21,380 --> 00:35:23,140 For example, I mean, I think it's worth 836 00:35:23,140 --> 00:35:24,590 doing the following check. 837 00:35:24,590 --> 00:35:27,360 Check if there's an encampment near your base. 838 00:35:27,360 --> 00:35:30,000 If there is, go ahead and make it a medbay. 839 00:35:30,000 --> 00:35:31,434 If it's not that near, maybe it's 840 00:35:31,434 --> 00:35:32,600 better to make it artillery. 841 00:35:32,600 --> 00:35:35,120 Like if it's adjacent, you probably want a medbay. 842 00:35:35,120 --> 00:35:36,610 But if it's not close, the medbay 843 00:35:36,610 --> 00:35:38,090 becomes less and less valuable. 844 00:35:38,090 --> 00:35:40,120 Whereas if it's in still artillery range, 845 00:35:40,120 --> 00:35:41,679 maybe it's still worth having. 846 00:35:41,679 --> 00:35:44,220 It's the kind of question-- this is the kind of trade-off you 847 00:35:44,220 --> 00:35:46,178 could make, and you could just hard-code it in. 848 00:35:46,178 --> 00:35:48,700 If it's more than a distance 16, distance 849 00:35:48,700 --> 00:35:50,510 squared 16, then go ahead, do it this way. 850 00:35:50,510 --> 00:35:52,180 Otherwise, do it that way. 851 00:35:52,180 --> 00:35:54,450 Very simple way of addressing the problem. 852 00:35:54,450 --> 00:35:56,810 So let's go back down and let's talk more 853 00:35:56,810 --> 00:35:59,230 about encounters of units. 854 00:35:59,230 --> 00:36:04,030 So let's continue with this unit kill ratio results table. 855 00:36:04,030 --> 00:36:05,235 So we're here. 856 00:36:05,235 --> 00:36:07,360 And you know, it's kind of hard to look at numbers. 857 00:36:07,360 --> 00:36:08,980 Oftentimes when people have a lot of numbers, 858 00:36:08,980 --> 00:36:10,670 especially in a table, they plot it. 859 00:36:10,670 --> 00:36:11,670 So here I've got a plot. 860 00:36:11,670 --> 00:36:13,540 Doesn't mean that much. 861 00:36:13,540 --> 00:36:16,280 Let's do a list plot so we've got points. 862 00:36:16,280 --> 00:36:20,160 And so we're asking the question-- here is the input. 863 00:36:20,160 --> 00:36:20,910 Is that the input? 864 00:36:20,910 --> 00:36:23,870 No, the input, it goes up to 1.3. 865 00:36:23,870 --> 00:36:25,400 Yeah, the input is here. 866 00:36:25,400 --> 00:36:30,960 So this is having 5% advantage, 10% advantage, and so on. 867 00:36:30,960 --> 00:36:33,700 And the question is, how many hit points 868 00:36:33,700 --> 00:36:34,630 is that worth for you? 869 00:36:34,630 --> 00:36:36,650 What hit point advantage does that get you? 870 00:36:36,650 --> 00:36:41,090 And so we could do a best fit for these results. 871 00:36:41,090 --> 00:36:43,890 So in Mathematica that would look like-- find a fit. 872 00:36:43,890 --> 00:36:45,936 You put the data in. 873 00:36:45,936 --> 00:36:48,870 You put the expression ax plus b, 874 00:36:48,870 --> 00:36:50,590 where a and b are the parameters, 875 00:36:50,590 --> 00:36:52,830 and x is the variable in question. 876 00:36:52,830 --> 00:36:54,940 And this is your fit rule, and then you 877 00:36:54,940 --> 00:36:58,450 can just apply that to the expression. 878 00:36:58,450 --> 00:37:04,270 And in one line-- we'll have a plot. 879 00:37:04,270 --> 00:37:07,142 So we'll plot this thing, mess that it is. 880 00:37:07,142 --> 00:37:08,850 Well, OK, why don't we just call it here. 881 00:37:08,850 --> 00:37:12,400 The line is this, so we're finding the best fit line here. 882 00:37:12,400 --> 00:37:19,220 And x goes from-- I don't know-- 0 to 1.5, 883 00:37:19,220 --> 00:37:21,560 and that ought to do it for us. 884 00:37:21,560 --> 00:37:23,700 We'll plot that line, and we'll plot these points. 885 00:37:23,700 --> 00:37:25,200 So we'll call it points equals that, 886 00:37:25,200 --> 00:37:29,670 and we'll show the line together with the points. 887 00:37:29,670 --> 00:37:34,700 And we'll also be able show other things. 888 00:37:34,700 --> 00:37:36,440 PlotStyle Red. 889 00:37:36,440 --> 00:37:38,970 We'll make the line red because that's real style. 890 00:37:38,970 --> 00:37:40,660 That's real style. 891 00:37:40,660 --> 00:37:43,070 That almost worked. 892 00:37:43,070 --> 00:37:43,620 There you go. 893 00:37:43,620 --> 00:37:44,980 So there's a line. 894 00:37:44,980 --> 00:37:46,200 What line is that? 895 00:37:46,200 --> 00:37:50,820 It's the line where-- the line. 896 00:37:50,820 --> 00:37:52,340 Please tell me the line. 897 00:37:52,340 --> 00:37:53,174 It's 0.69. 898 00:37:53,174 --> 00:37:53,840 So there you go. 899 00:37:53,840 --> 00:37:56,806 The slope here is 0.69. 900 00:37:56,806 --> 00:37:58,430 I mean, of course, this is probably not 901 00:37:58,430 --> 00:38:00,250 valid down at these low numbers. 902 00:38:00,250 --> 00:38:08,480 But the point is that for every additional 1% or one unit 903 00:38:08,480 --> 00:38:14,710 that you add, that's going to be an extra 0.7 units that you're 904 00:38:14,710 --> 00:38:16,160 going to damage of your enemy. 905 00:38:16,160 --> 00:38:19,710 And it's sort of fairly linear between 1 and 5. 906 00:38:19,710 --> 00:38:21,740 Let's see if we really dominate the enemy how 907 00:38:21,740 --> 00:38:24,340 the results will sort of stack up. 908 00:38:24,340 --> 00:38:26,340 So here it's simulating a whole bunch of combat, 909 00:38:26,340 --> 00:38:27,570 and it's going really slowly. 910 00:38:27,570 --> 00:38:28,450 Why is it going slowly? 911 00:38:28,450 --> 00:38:30,230 Well, because I put in like that delay thing 912 00:38:30,230 --> 00:38:31,896 so that you could see what was going on. 913 00:38:31,896 --> 00:38:33,510 So I'm going to change the delay to 0 914 00:38:33,510 --> 00:38:35,468 and scroll right on back down, giving everybody 915 00:38:35,468 --> 00:38:36,922 in the room nausea. 916 00:38:36,922 --> 00:38:38,630 There's also a bunch of print statements. 917 00:38:38,630 --> 00:38:40,630 So we're seeing like 200 print statements, which 918 00:38:40,630 --> 00:38:42,620 was to print the dynamic results of the match 919 00:38:42,620 --> 00:38:45,020 so that you could see them fighting, sort of seeing 920 00:38:45,020 --> 00:38:48,050 numbers decrease on a board, which is a lot like combat 921 00:38:48,050 --> 00:38:49,590 in the eyes of a nerd. 922 00:38:49,590 --> 00:38:51,720 So then we can see here a bunch of force ratios. 923 00:38:51,720 --> 00:38:53,680 And here in this example, we see that we're 924 00:38:53,680 --> 00:38:55,260 maxing out at a certain number. 925 00:38:55,260 --> 00:38:58,290 So according to the way that I've set up this simulation, 926 00:38:58,290 --> 00:39:01,040 beyond a force ratio of 2, you're 927 00:39:01,040 --> 00:39:02,630 not getting any additional advantage 928 00:39:02,630 --> 00:39:05,760 out of your additional troops because they just 929 00:39:05,760 --> 00:39:07,270 can't find a place to stand. 930 00:39:07,270 --> 00:39:11,160 In reality, when you have four versus one or eight versus one, 931 00:39:11,160 --> 00:39:12,950 there's a place for all of your eight guys 932 00:39:12,950 --> 00:39:15,560 to stand around all of their one poor little guy. 933 00:39:15,560 --> 00:39:18,080 But if you have a large number of units, 934 00:39:18,080 --> 00:39:20,130 it may be less realistic to assume that there's 935 00:39:20,130 --> 00:39:22,140 that much room available for them to double 936 00:39:22,140 --> 00:39:26,280 team, or quadruple team, or eight-tuple team the enemy. 937 00:39:26,280 --> 00:39:28,486 So you could see here that these are some results. 938 00:39:28,486 --> 00:39:29,860 And now if we plot them again, we 939 00:39:29,860 --> 00:39:32,240 see that we sort of hit the ceiling right over here, 940 00:39:32,240 --> 00:39:35,040 and so the line sort of is totally destroyed 941 00:39:35,040 --> 00:39:37,890 and comes out wrong. 942 00:39:37,890 --> 00:39:40,670 Let's go up to 3 so we see how bad-looking it is. 943 00:39:40,670 --> 00:39:42,170 And this is just yet another example 944 00:39:42,170 --> 00:39:45,140 of how doing a best fit line to something 945 00:39:45,140 --> 00:39:47,840 is not the right answer 100% of the time. 946 00:39:47,840 --> 00:39:50,874 It's the right answer 99.99% of the time. 947 00:39:50,874 --> 00:39:53,290 Or basically use the r squared number to see if it's-- no, 948 00:39:53,290 --> 00:39:54,170 I'm just kidding. 949 00:39:54,170 --> 00:39:55,770 That's not genuine statistics. 950 00:39:55,770 --> 00:39:58,720 And most of you are probably poo-pooing the idea 951 00:39:58,720 --> 00:40:01,480 that I even considered for a moment or a nanosecond 952 00:40:01,480 --> 00:40:03,900 including the two words in the same sentence. 953 00:40:03,900 --> 00:40:09,770 So that's a sort of summary of these issues. 954 00:40:09,770 --> 00:40:12,440 Like what force ratio gets you what unit or hit 955 00:40:12,440 --> 00:40:13,630 point kill ratio? 956 00:40:13,630 --> 00:40:17,680 You can see here a big takeaway lesson that just 25% more units 957 00:40:17,680 --> 00:40:19,860 or just 30% more units than the enemy 958 00:40:19,860 --> 00:40:21,350 can make a giant difference. 959 00:40:21,350 --> 00:40:23,840 And you should never engage when you're outnumbered, 960 00:40:23,840 --> 00:40:25,790 unless you're right next to the headquarters 961 00:40:25,790 --> 00:40:27,482 and there's no choice. 962 00:40:27,482 --> 00:40:29,065 I strongly recommend that you consider 963 00:40:29,065 --> 00:40:31,470 the little micro-tricks, trying to get 964 00:40:31,470 --> 00:40:33,590 your units into the right place, withdrawing 965 00:40:33,590 --> 00:40:35,020 when it's a good idea. 966 00:40:35,020 --> 00:40:38,470 Remember that if you're retreating from the enemy 967 00:40:38,470 --> 00:40:40,730 and the enemy is adjacent to you, 968 00:40:40,730 --> 00:40:43,450 that means you can take damage every turn while you're 969 00:40:43,450 --> 00:40:44,250 retreating. 970 00:40:44,250 --> 00:40:47,930 So in this game, retreating is definitely not 971 00:40:47,930 --> 00:40:49,370 encouraged for that reason. 972 00:40:49,370 --> 00:40:51,380 What you need is like allied units 973 00:40:51,380 --> 00:40:54,570 to sort of distract the enemy while your injured ones are 974 00:40:54,570 --> 00:40:55,290 going to heal. 975 00:40:55,290 --> 00:40:57,960 Or you need to have your medbays close enough 976 00:40:57,960 --> 00:40:59,490 that you can survive the retreat. 977 00:40:59,490 --> 00:41:02,180 Because the way the game works is, you move, 978 00:41:02,180 --> 00:41:03,620 and then you deal attack damage. 979 00:41:03,620 --> 00:41:05,120 So if you retreat from your enemy, 980 00:41:05,120 --> 00:41:07,789 you're not adjacent to him anymore after you've moved. 981 00:41:07,789 --> 00:41:09,705 And then he moves toward you and deals damage. 982 00:41:09,705 --> 00:41:11,440 And then you retreat, and you don't deal damage. 983 00:41:11,440 --> 00:41:13,148 And he moves toward you and deals damage. 984 00:41:13,148 --> 00:41:14,820 And it's just a very bad situation. 985 00:41:14,820 --> 00:41:16,030 I've been in it myself. 986 00:41:16,030 --> 00:41:17,930 It was very painful to watch. 987 00:41:17,930 --> 00:41:21,737 So with that, I mean, I think that's going 988 00:41:21,737 --> 00:41:23,320 to be all that I've got for you today, 989 00:41:23,320 --> 00:41:25,778 even though it's slightly early on the days I've gone over. 990 00:41:25,778 --> 00:41:27,900 And so I recommend that you just sort of sit 991 00:41:27,900 --> 00:41:30,290 here, enjoy yourselves, ask me questions. 992 00:41:30,290 --> 00:41:32,730 And when the Bubble tea arrives, the deputies 993 00:41:32,730 --> 00:41:33,900 will spring into action. 994 00:41:33,900 --> 00:41:37,385 So thank you very much for coming to Lecture 6. 995 00:41:37,385 --> 00:41:42,080 I guess I should explain what's going on in the next lectures. 996 00:41:42,080 --> 00:41:44,880 Next lecture is going to be an exciting guest lecture, 997 00:41:44,880 --> 00:41:47,050 where we've got one of the developers of Battlecode 998 00:41:47,050 --> 00:41:48,825 who's been remote and who was the winner 999 00:41:48,825 --> 00:41:52,830 of Battlecode last year, fun gamers, on that team. 1000 00:41:52,830 --> 00:41:56,890 He's coming here to talk about various important things. 1001 00:41:56,890 --> 00:41:59,460 I forgot what he's-- oh, my goodness. 1002 00:41:59,460 --> 00:42:02,040 What a terrible plug for his talk. 1003 00:42:02,040 --> 00:42:05,150 It was going to be about-- no, that wasn't a helpful comment. 1004 00:42:05,150 --> 00:42:07,450 That was just talking. 1005 00:42:07,450 --> 00:42:11,810 Yeah, he's going to talk about, I think, emergent complexity 1006 00:42:11,810 --> 00:42:14,710 and like really awesome tricks that you learn 1007 00:42:14,710 --> 00:42:18,860 if you do Battlecode N years, where N is a large number.