Let's Look At: Algo Bot!
The full transcript of Let's Look At: Algo Bot!, a 31-minute Northernlion video (Algo Bot) uploaded on February 25, 2018: 71 timestamped lines, about 6,100 words. Press any timestamp to play the video from that moment.
- 0:00 hey everybody and welcome to let's look at algobot. now before you leave thinking this is another, oh no, d a e n l programming video game, it's not like that. it's, i mean it sorta is. but don't go anywhere, okay? it's ten bucks, it just came out on steam, i purchased this with my own money, in the interest of full disclosure.
- 0:19 so i owe this company anything. i bought it on steam on a friday night because i'm kind of interested in these i'm gonna call them zachtronics lights. you know like the kinds of games that abstracts programming concepts out to like a puzzle game mechanic so this is a game where you script instructions for a robot to do and then the robot kind of like you know what was it lego
- 0:41 what's a lego robot called? mindstorms? they kind of like lego mindstorms a task for you and complete something. normally involving picking something up, dropping it somewhere, hitting a switch and then exiting with the kind of like time and space constraints in particular, particularly constraints in the amount of instructions that you can have. but it's a puzzle game, okay? it's a lot like human resource machine except even a little bit more gamified than that. i think it's decent.
- 1:05 i'm not gonna bury the lead. i think this is like a six and a half out of ten that for like 80% of the population is gonna be like a five and then for 20% of the population is gonna be like a nine and i just so happen to be in that 20% of the population camp.
- 1:21 i spent about three hours playing this, had a good time, got a couple of little quirks that i do take a couple of points off for and we'll see as we get going here. but yeah, in three hours or so i've almost beaten the game. like i'm almost on the final section here, i just need one, two, three, four, five, six, seven, eight, eight more puzzles and then the final section. so maybe it's more fair to say that i'm actually just past the halfway point but still. let's go back to the early game here and i don't know, we'll do, i'm actually gonna turn down the sound a little bit because the high pitched whirring
- 1:51 not to be rude, but...
- 1:53 it's a little irritating to me. let's go back to like one of these earlier levels. let's go to a load of rubbish. that'll be a good opportunity for me to explain to you how the game works and how it actually expands when we get into deeper puzzles as well. so it does have a story. the central premise of the game is that, you know, you have this robot here that's gemini. it's kind of like the eve to your... or eva to your wally. she guides you and you're kind of a silent protagonist. although it seems weird to say that about a puzzle game. but...
- 2:23 basically, she gives you kind of exposition and the space station is collapsing, you gotta save it, but all sorts of wacky hijinks ensue. the story doesn't matter. not to insult the writers, but the main hook of the game is the scripting sort of gameplay. don't be alarmed if the jargon is too much, you'll catch on. technically true. oh, and it's about time you started using functions to optimize your commands. okay, so clear this, clear this, get this out of here. you can clear this pretty easily. i actually almost, you know what? you're not gonna love this.
- 2:52 but i'm gonna go back to the main menu, i'm gonna do a slightly earlier puzzle, because i think it explains the progression of the game a little better. so we're gonna go back here and go to like, um, turned around. every now and then i accidentally get a secondary loading screen. okay, so you don't need to know this, i'll tell you everything you need to know. just clear this out of here. i wish there was kind of like a clear option, maybe if you just right click on this that there is. so, this is the interface of algobot.
- 3:20 this is algobot. every single one of these circles is a node that you can go to. it represents one step. and these are your instructions that you can use here. so there's go forward, turn 90 degrees to the left, turn 90 degrees to the right.
- 3:33 turn 180 degrees in one step, and then this is just algobot's primary ability, which in most cases, in fact in all cases i think, is just push button. so, you know, if you want a quick little example of how this will work, basically each one of these spaces here represents a time step. so what we have to do to complete the level, we have to go forward, push this button, push this button, and then go forward to the end. so what we're gonna do to start here, i mean you can probably figure it out for yourself, but you know, you can go forward, forward, and that'll put us here. we'll turn 90 degrees to the left, go forward,
- 4:02 push the button. then we'll do a 180 degree turn. we'll walk forward twice. we'll push the button. we'll do a 180 degree turn. and then if you're like, oh, i can't follow that in my head, bobby fisher, i can't see that many moves ahead. why don't you slow it down? well, we can do so here using what essentially is the debugger. so this moves us one instruction forward. we go forward. we go forward. the buttons activate because we're one tile away. we turn left. we go forward. hit the button.
- 4:31 there is some quirks with hitting the button. like for example, you don't actually have to be facing it, which can actually be important on some of these levels. and then we're gonna turn 180 degrees. we'll talk about those later probably. we'll hit the button, turn 180 degrees, and then you know this is where we are. so what do we have to do next? forward, turn right, forward, forward. now, admittedly, one of the things i wish you could do is while you were essentially watching your puzzle solution, just be like, okay, go forward, go forward.
- 4:58 see i just like to go for if you're doing it step by step you actually can't add instructions as it's going i don't even want to add them to finish it i just want to add them so i don't have to keep the position in my head right now, but we can still do it it's forward right? forward
- 5:13 forward and you're going to say man. this is super easy all you got to do is look at what you got to do and then do it that's where the game gets harder later, and this game it has wildly in my experience at least it has wildly divergent puzzles some of them. i basically sight read i saw them for the first time and went all that simple i see what you're doing here we'll just make a quickly reusable function, and then we'll do it over and over and look at that we did it with like the optimal solution according to the game's
- 5:36 it has like a target score that you can hit so we hit the target score on the first try and then some of them i spent like 20 or 30 minutes on even which is a little embarrassing and i'll skip those for this video, but anyway where it becomes really difficult is obviously
- 5:49 if you wanted to just follow the robot's progress, you could easily... you could imagine like a 1024 turn puzzle, you could just do step by step. but there's always a limited amount of instructions, so you have to do it in the most compact way you conceivably can. otherwise, like if there was a... if we did things slightly sub optimally here, like maybe we're like, okay, throw in a u turn and then another u turn, we wouldn't actually be able to do anything after that because we'd reach the peak for instructions.
- 6:17 one of the things i wish the game would let you do is just be like, hey, this is where you have to solve it in this number of instructions or less to complete the puzzle, but we'll let you put more in so you can kind of like see how your final solution looks and then try to pare it down. but anyway, it does not do that, which is a little bit of a frustration. we're just gonna go up to speed three here and there you go, that puzzle's complete. and then we'll just go straight into our next puzzle, and i apologize for skipping the dialogue, but i just don't care about the actual
- 6:45 the story, more or less. that's just who i am as a person and as a player. so we used 14 commands, target score is 14, best score is 14. it would have been hard to do worse than that, but i think it's impossible to do better than that. it's just kind of like one line that seems obvious, which is not true for every puzzle. so this is the one we looked at earlier, and this is really where the game starts to blossom, is when they give you functions. now, i'm not gonna belabor the point and make it about programming, but essentially functions are
- 7:13 reusable bits of instructions that like there's a you know let's learn by example like if we look at this here the whole level is very simple right it's forward forward right forward button press left so that we're facing the way that we want to go again forward forward right forward button press left so you can see we're repeating the same instruction over and over so rather than go like forward forward right forward press and then just repeat this and you can see like where we go when we do this
- 7:43 like so. rather than just repeat this over and over and over, which would lead to us maybe even running out of space, what we can do is just instead move all this down here. so forward, forward, right, forward, button, press, turn left, and then delete all these, and then we can use our function instead, and...
- 8:06 there might be a more optimal way to do this, but i think we just put one of these at the end and that should do it. so, we can watch it get played here. instead of using... like we're literally using six instructions to hit the first button.
- 8:19 so if we did it up here, it would have taken us 19 instructions. 3 times f1 plus the one extra forward arrow that we have at the end. instead we're using 4 instructions because we put some of our reusable instructions inside of a function. so for many people you're probably going, hey dad i know what a function is and i'm going, you know what, are you okay? but it's really neat how they introduce them in this puzzle game to make things a little bit more interesting.
- 8:42 so that gives you, i think, a little bit of what you need to know in order to understand the fundamentals of algobot. let's go into some puzzles that are a little bit more difficult. so let's go into... and i don't... strictly speaking, i don't remember how to do any of these, so... let's try this one right here. i don't remember the names of the puzzles and what they entail, so there is a chance that i could get stuck on one of these again, even though i've done them before.
- 9:10 calm down, algobot. that was a rhetorical question. are we there yet? okay, algobot is not a silent protagonist. again, i don't necessarily think the story is one of the strongest suits. so one of the things they introduce a little bit closer to the mid game here is the second function. and now again, i don't wanna...
- 9:27 go full dae mode, but what you could do is like nest this function inside of this function. so you should go like or you could go function one calls you know like forward, forward, download which i'll talk about, left, forward, right, forward, forward, download, left or something like that.
- 9:47 and then you could be like okay minute as function to inside of it somewhere and function to contains like a little bit of code itself so you can actually call like 12 or even more than 12 is 1 2 3 4 5 6 7 8 these are 8 you could call 16 instructions with a single call if you did like you know forward for let's just say function 2 is like this and
- 10:09 in fact, you could call more than 16 instructions simultaneously. because you'd be like, okay, f2 is just move ahead eight spaces, and then f1 is do that eight times. so you could move 64 spaces in theory with a single call here, whereas it would take you 64 of them to do it
- 10:27 with exclusively up arrows or if you wanted to do it exclusively with function two, it would take you eight of these. so it would take you like half your space on the machine here. it's just an example. it's not actually good obviously, but it's an example of how the power of functions is it allows you to call
- 10:44 lot of instructions without actually forcing you to you know be beholden to the space constraint as much as you otherwise would so let's look at this puzzle the down arrows which are up arrows because of our camera perspective and i actually do think that's one of the weaknesses of the game is that i really sometimes i found the camera perspective distracting, and i don't find the art style particularly like inspired either but i really feel like you know in zachtronics games or i
- 11:10 you know silicone zeros or i'm trying to think of what the other like human resource machine it had kind of a fixed perspective that allowed you to focus on the mechanics of the puzzle whereas in this sometimes the camera is you know to your right side sometimes it's behind you three quarters etc and i just find that it adds like sure there's some visual variety but it's not really that doesn't really
- 11:31 excite me. it's more like it causes a distraction and even worse sometimes you know especially when you're first starting to play you're like oh can i interact with the turbines or are those just kind of like an environmental accent? can i interact with the stasis chamber is that just flavor you know yeah eventually you figure it out? but i do think it muddles the design a little bit and is needlessly beholden to this kind of like sci fi aesthetic that doesn't necessarily add a whole lot to the game all things considered, but anyway i'm getting up my own butt so to speak um
- 11:58 so these arrows essentially mean that we download. so we can download from a, and again because of the thing here you can't really see this is a right here, but we want to download data from a and we'll store it in red, which is just like that basically. so this stores a value. and then at some point we're going to want to download data from b
- 12:17 store it in green so we can hold two different values one from a and one from b and then we want to eventually get over here and we're going to broadcast our red to a because that's the color that we use to download and then we're going to broadcast and i keep making this mistake as well we're going to broadcast b or green to be over here, so that's essentially what we're going to do here so let's look at how this would work we do have a repeating element for sure and it's forward left forward right forward forward with two downloads in the middle and
- 12:46 where do we do that again? right here. forward, well it's really like forward something. which is bad because where are we gonna insert that in the puzzle? anyway let's figure it out on the fly. so we can make like one function which would just be, let's just put all of our downloads into function one and then all of our uploads into function two. and that might actually be the optimal solution. so it'd be like forward, download, and it'll automatically be red to start with. left, forward, right, forward, forward, and then we'll download green.
- 13:20 whoops, again, every time. i really feel like you should just be able to... this should be like a toggle, which one you want, and then when you click on this it should automatically do that instead of having to essentially paint it, but so be it. so this, if we play it forward, should take us... oh, we haven't put it on the instruction stack yet. this should put us like right here, facing this direction, facing forward, and having downloaded two pieces of data here that are stored in red and green respectively.
- 13:50 and then we get an error because we haven't put any more instructions. so what we could do after that is just be like, okay, we'll put left forward, right forward forward, right
- 14:12 forward forward and what we do when we have this this is kind of like a hacky way to do it but it's a good way to see like elements that you can consolidate like right now i can already see left forward right forward forward is a pattern that we use all the time left forward right forward forward right so like we can actually consolidate one of our functions to just hold this, but this is should put us like right here so if we wanted to and and it would be suboptimal we have enough space though what we could do here is just finish it off which is a left
- 14:39 so i think we might have actually, and if i sound like i'm a professor lecturing you right now, i apologize.
- 15:07 but i think i've explained it pretty well. you know we've made this and i think the solution should work but this might actually be the worst solution that actually still passes the test so let's put this on speed 3 and see if my if my mental algorithm was correct here, so it picks up both variables and then it comes back and now we're into the hard coded stuff it uploads a it uploads b and then it leaves but that sucked that was bad and we'll see when our when we're done with this here that you know this is not going to be our optimal solution and
- 15:37 like yeah, we used 32 commands, the target is 18, and previously we've done 20. so let's retry this and make it better. this is really the process you go through to solve puzzles, and this is where you're either gonna like it or you're gonna hate it. because this is where it scratches kind of like that refactoring programming itch that i don't think you need to be a programmer to like, but if you like programming, you know that you probably already like it. so really what you do is you identify patterns that get used over and over,
- 16:05 left up right forward forward and then you just consolidate those into a single function so let's let's make function to our reused piece of code or the instruction left up right forward forward we use that so many times used it three times. we also use it right here so right off the bat we can make this better and put that there and it'll still work and this will take us to here and it'll download and then we want to call it again and i think that that let's just play the play it forward here um
- 16:38 and we should see, like, look at how much we can get done with one instruction here. i can't click on the button because sinvicta just signed on to play the binding of isaac rebirth, so hopefully this actually works. but look at this, with one instruction, okay, we've still downloaded everything, and we made it there. now, unfortunately here, we're gonna have to use a little bit of hardcoding, right? because we gotta turn right forward forward. there might be a better way to do this, but anyway, we gotta go right forward forward without doing the left plus.
- 17:12 i wonder, i'm thinking like, okay, what if we did, um... and this might actually work and be hilarious, i wanna try it. so if we go left, we're gonna be facing the wrong direction, and then we're gonna go forward in the wrong direction.
- 17:26 nah, i don't think we should do it. because what we can some solutions are basically like, you know, you want to keep your function as tight as possible and reusable as possible, so you might deliberately face the wrong direction even though it takes one extra step, and then your function will turn you around and put you in the spot, so i was like, okay, what if we walked what if we faced in a u turn and then walked? it would not work, i think. okay, so we're facing this direction, so then it would be right, forward, forward. this is what i mean, where like maybe even right forward forward could be
- 17:57 distilled into its own function instead of like this one right here just being essentially some kind of like magic numbers hard coding, but anyway, then it's going to be left forward upload red and then left forward right forward forward so we do function to upload green and then it's left forward right forward left forward right
- 18:32 forward so again, you know maybe we take this out of here, and it makes it easier for us, but i'm not sure anyway i think this should work and this kind of demonstrates how like in his actronics game you can you know get a solution that works even though it is a little tricky sometimes and then eventually you look at it and you see ways that it can be improved and i mean look at that oh we still were missing one more which actually means that i'm stupid and we can make this way better by just doing that so put it on speed 3 and go ahead. i believe that you are going to get this done. oh
- 19:08 beautiful so that might not be 18 but it was definitely way less than 32 and that's actually like a better proof of concept than i ever could have hoped for yeah, we use 20 again. so there is a better way to do that. so i mean i do like the game i want to make that clear and this is not the end of the video and as you can tell by the viewing length i'm sure but it's not that i don't like the game because i really i find this loop really satisfying and it's not just because you know i've been learning how to code for a long time now. it's that i
- 19:37 it's just like an innately satisfying loop to kind of struggle and use your brain to come up with a solution and then sometimes your solution is going to be too long so you're like okay, that's obviously not the way to do it. what if i think outside the box? like what if, oh what if instead of going around in a clockwise fashion i go around counterclockwise like maybe that'll be ten steps faster or something like that. but it does suffer in comparison to games like particularly shenzhen i o and opus magnum. for one,
- 20:03 the, like, options for the game are essentially bereft. there's really just play the story mode and that's it. i think the interface is a little bit wonkier than in the zachtronics games. and there are other games like this, like human resource machine as well, but i think it sort of lacks a little bit of the charm of human resource machine, and then it also doesn't really...
- 20:20 hit the same kind of like robustness as a sac tronic scheme especially in terms of like length replayability and etcetera, etcetera i don't think it looks particularly great. i don't think it sounds particularly great, but i still like the core gameplay loop but i say this just as a way of being like you know it's not for everybody, but before we finish this up here maybe we can do like a different puzzle. we do like one of these ones on the third floor they haven't really introduced any more mechanics at this point. they've just gotten a little bit more complex and
- 20:49 although this one. i think actually is kind of on the easier side although if you look at it my solution essentially used up all the space so i must have had a hard time doing this one to begin with let's see if we can make it better i mean i can already see i did i played this game like 2 a.m.. last night, so i can already see something we can do to make it better like for example why would you have upright up in here when you could just call function 1 right there instead, but anyway? let's let's
- 21:16 get this whole thing taken care of. so we need to... we have some renewable elements, like we have some patterns, like this is like big dipper here of straight, left, straight, right, straight, straight, straight, right, straight. like that is going to be used over and over. so let's put that in here somewhere. so that's going to be like one, two, three, four, five, six, seven, seven tiles long. i don't think we're going to be able to get there the whole way, but let's start it. so it'll be like straight, left, straight,
- 21:48 right and then we could just call like another function here but you call it like in this one this allows us to go around a corner so it's kind of like reusable in that way right it allows us to go around a z pattern. i should say so maybe we want that and then we can also have something that allows us to go around like this triangle here so this puts us let's see forward left forward right? we're facing this way
- 22:20 we want like forward, forward, forward, right, forward. forward, forward, forward, right, forward. so how would we do this? well we would start with a... with like an upright up. which again, i don't like to hardcode this stuff because it usually means that there's a better solution. and then we'd have a download for red on this button. then we could call function two.
- 22:46 followed by function one that should put us here and we can get a download of green let me see because this is a little bit more of a difficult solution here, let's see if this is actually like functional seems to be working okay so what do we do after this point well if we do? another like u turn function to function one that should put us right here and
- 23:21 much as it sounds like it like i might be doing some kind of witchcraft to know that that would put us there without walking through the steps it's just because we've deliberately planned around this shape this like little weird like pseudo big dipper shape right here so this is just the same thing rotated 90 degrees counterclockwise right so we should just be able to upload red there, and this should work. i also wish the debugger allowed you to step forward much faster, but that's a
- 23:48 as something for a different day. i wish i didn't have to watch the robot's animation the whole time. yeah, so there you can see that it's uploading there, and then it's the same thing. if we pull a u turn, f2, and then f1, we should be able to upload green. now you see the problem though is that we're quite clearly
- 24:13 gonna not have enough instructions to get to the exit, so what do we do there? well we start to look for things that we can reuse and there's a very obvious one every time we call f2 we're calling f1 right after it right, so why don't we just put f1 inside of f2 more or less and then we can clear that clear that clear that we got a little bit more space and really functionally nothing should change there, so we should end at having broadcasted right here and
- 24:46 that indeed does appear to have worked. so then it would be like u turn and really after doing the u turn forward right forward forward right exit would do it. maybe, i think i'm in like exactly the same situation here that i was in my last one because like okay we're right here we do a u turn do we have to do a u turn or could we just no we do have to do a u turn i think so it'd be like forward right
- 25:29 forward and we really want to do this twice so obviously we're gonna run out of space and this is where i wish we had kind of like a buffer that we could play around with just to see how it would look. let's try to solve this on the fly here so we're going in, we're going through and you can see we're one three instruction step away from finishing so i see two things that we could do here. one of them is every time except one that we call function two we start with a u turn so i'm gonna put a u turn to start with here
- 26:10 and then i'm gonna purge this u turn, and this u turn, and then if we put one in front of the one that didn't have a call before, this should save us one instruction space, but we'll make sure it still works, because sometimes this goes terribly wrong. and again, it's kind of a hack way to do it. yeah, this is clearly not... oh, this one should go. this is clearly not necessarily the optimal way to do it, but it might still work regardless. let's see. yeah, okay. so now we're really only one step away... we do need to...
- 26:48 kill this. oh no we don't actually, hold up, because if we kill this, we might just be able to put this here. i know i'm kind of getting into like, i'm the only one that's really following what i'm talking about, not because it's complex but because i'm not explaining it very well. but i kind of think that we might have just discovered the, the solu a possible solution here, but let's see if it works, and if it doesn't that's fine too. clearly it does not. okay, so let's purge this. so right now we've got, uh, we've made a bunch of extra space for us. do we have enough space?
- 27:21 well, let's see where we finish what i'm gonna say though is do we have enough space to do like a forward right forward forward right forward forward right forward forward right now we're still one space shy, but we have made some space for ourselves which is good, and we have to do a u turn here as well, so it's even harder but like i'm thinking you turn forward then it's a left. that's the problem okay, so the last thing i'm gonna do here is i'm gonna purge these and this is gonna take forever, but we're i'm gonna move and
- 27:54 the forward forward into f2 and i'm going to take him out of f1 that way we can reuse upright up instead so instead of calling upright up here we'll just call f1
- 28:10 then at the end we're probably gonna have to do a u turn and fix it but i think this might actually be closer to an optimal solution and basically all i'm doing is looking at my solution and seeing where i'm needlessly by hand repeating instructions and instead putting them in something that i can call that's actually cheaper and easier okay, so this is where we end all we need is from this point is a u turn an upright up and an upright up so like a u turn an upright up and
- 28:38 and an upright up. so this should finish the puzzle, and i think it does a great job of demonstrating that the game strikes a pretty good balance between like being able to, you know, through trial and error, hack out a solution that works but is not necessarily optimal, and then if you really look at it, you can go, okay, you know what? there's ways that we can pare this solution down and make it much better. there might even be ways that we can pare this solution down, but like let's see if we've matched what... let's see if we matched what the developers were looking for here.
- 29:06 wow, we use 23 the target score is 19 so there is probably one other way that we can refactor this and make it more optimal, but anyway. this is algo bot is it a da e programming game? mildly, but not nearly to the same extent as like a the average you know zachtronics game although opus magnum is pretty i think it's inspired by stuff like that anyway opus magnum is pretty user friendly as well is it as good as opus magnum? i think no, but it's also 40% the price
- 29:34 or 60% cheaper if you want to phrase things in the way they're commonly used in english, and it's pretty long like again i've been playing it for three hours or so and i roughly know what i'm doing when it comes to this stuff if you're a super genius you'll probably be able to get through it in that time but i've made it a little past the halfway point and the puzzles they range from like trivial to sort of beguiling and you find your own genius in the solutions from time to time which is really satisfying so far from a perfect game, but a game that's very interesting i think if you're a
- 30:02 you know, these don't come out all that often. so if you're into these kind of games, this is like a mild thumbs up, i think. it's not quite the home run of a shenzhen i.o. or an opus magnum or a tis 100. i know they're all, that's why i call them as actronix lights. they're almost all from the same dude. same company, i should say. but it's good. i've had a good time with it and it's kept me engaged throughout. not like, if you look at it as the sum of its whole, graphically,
- 30:30 audioli auditorily maybe i should say narratively that stuff doesn't necessarily tickle my fancy, but the game plays there i think it's pretty good, and it's relatively cheap ten bucks on steam for now. thanks for watching i hope you enjoyed the episode if you did click the like button helps out a great deal of course subscribe you want to see more in the future but for now thanks for watching and i will see you next time and of course there will be a link in the video description below to pick up algo bot on steam if you're interested if you like what you see support the developers for now thanks for watching and i'll see you next time