F1 + F2
September 17, 2008 4:27 AM   Subscribe

Do you like thinking ahead? Try light-bot.

Object: program a cute little robot to turn on the lights. Sounds easy, right? Think again. And again. And again. [WARNING: this will probably hurt your brain in the later levels] On the bright side, it sure does a wonderful job of explaining functions.

p.s. I think certain people here [*cough* geeks *cough*] will adore this unassuming little game, or I wouldn't have posted a SLFG FPP on a Tuesday.
posted by chuckdarwin (46 comments total) 16 users marked this as a favorite
 
parameterless functions
posted by DU at 4:38 AM on September 17, 2008 [1 favorite]


Reminds me of the robot programming puzzles from The Island of Dr Brain.
posted by daniel_charms at 5:06 AM on September 17, 2008 [2 favorites]


See? When you asked if I like thinking ahead, you assumed my answer was "yes". Seeing as it wasn't, were you prepared to offer an alternative in the event someone said "no", or do you dislike thinking ahead, as well?
posted by Bathtub Bobsled at 5:12 AM on September 17, 2008 [5 favorites]


Yay it's just like work.
posted by Skorgu at 5:20 AM on September 17, 2008 [11 favorites]


See? When you asked if I like thinking ahead, you assumed my answer was "yes". Seeing as it wasn't, were you prepared to offer an alternative in the event someone said "no", or do you dislike thinking ahead, as well?

ERROR. ERROR.
posted by chuckdarwin at 5:24 AM on September 17, 2008


I wasn't even going to mention Dr Brain because I thought I was the only one that ever even knew that thing existed. What a great puzzle game. Still very playable after 10-15 years.
posted by DU at 5:36 AM on September 17, 2008


Level 10 is very hard if you do it the "obvious" way, 11 and 12 are much easier. Walkthrough here if you're really stuck.
posted by Skorgu at 6:08 AM on September 17, 2008


This is straddling that fine line between fun sense of acheivement and I need OCD meds stat.
posted by BrotherCaine at 6:12 AM on September 17, 2008 [3 favorites]


I knew you were going to post this, chuck.
posted by weapons-grade pandemonium at 6:25 AM on September 17, 2008


Yeah, level 10 might just humiliate you.
posted by chuckdarwin at 6:33 AM on September 17, 2008


Last level made me think of Q-Bert.

I think my solutions to this game are like my CSS / Javascript: Not the simplest, not the most elegant, but they work.
posted by caution live frogs at 6:40 AM on September 17, 2008


My solution to level 10 was a little inelegant, but I didn't think it was so difficult. Hardest of the levels, sure, but not brain-meltingly so. And I am certainly not the most algorithmic of folks.
posted by uncleozzy at 6:43 AM on September 17, 2008


(I really wish it let you select levels so I could give 10 another go.)
posted by uncleozzy at 6:44 AM on September 17, 2008


This is awesome. In that OCD way BrotherCaine pointed out.
posted by jacalata at 6:44 AM on September 17, 2008


I knew you were going to post this, chuck.

ESP?
posted by chuckdarwin at 6:51 AM on September 17, 2008


This would be a great game to teach kids programming.

Needs loops and conditions (and therefore the robot needs some kind of sensor).

I've coached First Lego League robotics and it takes a while for the kids to get the concept of programming. Something like this might help immensely without having to give every kid their own lego robot.
posted by schwa at 7:54 AM on September 17, 2008


chuckdarwin: please advise where to send invoice for time spent playing this when I should be working, kthx.
posted by signal at 7:54 AM on September 17, 2008


I get to the point where it asks me to press space to continue to level one (well, it says space - continue). I press space, nothing happens. I click it, nothing happens. Anybody got a walkthrough of that part? :(
posted by sveskemus at 8:18 AM on September 17, 2008


FD 10
RT 90
FD 10
LT 90
etc.

Did this remind anyone else of that?

Or is this something that only someone who was in elementary school with Apple II's would remember?
posted by Hactar at 8:45 AM on September 17, 2008 [3 favorites]


FD 10
PEN DOWN
FD 10
PEN UP
RT 90
FIND INPUT TURTLE
FD 100
PEN UP!
MOUNT
PEN IN
PEN OUT
PEN IT
PEN OUT
PEN DOWN!
DISMOUNT

But seriously, I remember trying to do a star in elementary school and being frustrated that I couldn't figure out the interior angle right away.
posted by BrotherCaine at 9:13 AM on September 17, 2008


Oh crap, I totally missed a pen size joke there. No wonder I remember elementary school with my sense of humor.
posted by BrotherCaine at 9:15 AM on September 17, 2008


Not bad. I finished in 195 commands total, which is probably a lot worse than what a real programmer can do.
posted by echo target at 10:20 AM on September 17, 2008


Wednesday morning? Dude, have some mercy. Now I have to try to remember this for Friday because it's pretty cool.
posted by GuyZero at 10:36 AM on September 17, 2008


I will eat level 10's babies, I still haven't gotten it........
posted by BrnP84 at 10:40 AM on September 17, 2008


Also reminds me of RoboRally. Robot programming games were big in the 80s, but they kind of died off. Hopefully this is the beginning of a resurgence.
posted by formless at 10:54 AM on September 17, 2008


I finished in 194 but I didn't get that I was trying to conserve moves until Level 6.
posted by roofus at 1:23 PM on September 17, 2008


formless: was going to post the same thing. RoboRally is favorite of mine. I just wish they'd reprint the old expansions.
posted by papercake at 1:45 PM on September 17, 2008


Fun little game - level 10 is definitely the toughest. My solution relied heavily on the game's "error handling" - what happens when you try to move forward with a wall or drop in front of you (or at the edge of the board), or when you try to jump with no such obstacle in front of you. I lost a few commands testing those behaviors early on, but it made level 10 a little easier to deal with. Thanks for the link!
posted by dilettanti at 3:40 PM on September 17, 2008


193 moves. Level 10 is definitely the hardest of all the levels, and I was kind of sad that level 11 and 12 were so straight forward. I hope they add more levels some day!
posted by explosion at 4:17 PM on September 17, 2008


183 on my first try. When I realized you were trying to minimize moves, 167 on my second try. Knowing how it works now, it'd be hard to do more than one or two points better than that.

I have a screen shot of my neat solution to level 10. :-D
posted by lupus_yonderboy at 4:53 PM on September 17, 2008


I would love this game a lot more if it gave me loops and condition checking.

In the spirit of this I tried some recursion, where I had an f1 call inside the f1 definition. This worked well, was an elegant solution and the robot lit up all the lights. Sadly, there was no way to terminate the loop and he just kept walking, walking and walking into a wall (whereupon he kept walking, but not getting anywhere). The game doesn't check that you've won until after the robot stops moving.
posted by mr dodo at 5:44 PM on September 17, 2008


You guys are all very smart.

Me, I just like the way the cute little robot guy takes a poop of energy when you tell him to.
posted by rokusan at 5:46 PM on September 17, 2008 [1 favorite]


formless: I just played RoboRally for the first time a few weeks ago, and that's exactly what I thought when I saw this. Played RR with the fam and some beers, and a good time was had.

For those who enjoyed playing this short online game, check out RoboRally for a fun board game. It comes of as kind of dorky when convincing other to play, but well, you enjoyed this short online game.
posted by shunshine at 6:00 PM on September 17, 2008


I have the highest (read:worst) score so far, so I'm not posting it. Ok, it was 197. But what fun.

mr dodo: I set up recursive loops just for fun, but I didn't realize the game was not winnable if you used one.
posted by artifarce at 6:22 PM on September 17, 2008


186 but my level 10 solution was ... inelegant. (hacky spaghetti code)

167 is amazing, I don't suppose you would mind posting your solutions?
posted by Bonzai at 7:02 PM on September 17, 2008


Seems quite easy, but that walkthrough sucked, you should use recursive functions. fantasticcontraption.com is way better.
posted by jeffburdges at 8:05 PM on September 17, 2008


I don't see the old F.C. thread, but looks like they have a new final level, here is a quick solution.
posted by jeffburdges at 8:13 PM on September 17, 2008


198 before I realized how the command count worked. 174 second time around. I too am curious about level 10's 'neat solution.' Here's mine (spoiler, obvs). It didn't give me any problems, just curious.
posted by carsonb at 8:50 PM on September 17, 2008


167 is amazing, I don't suppose you would mind posting your solutions?

Thank you. I didn't record them all, only level 10. I'm not sure if "6" (the scoring is equivalent to scoring the blank boxes left on the screen) is the best for that screen or not. I'd be really surprised to see an 8.

I had a lot of trouble with level 10 the first time around. The second time I did it again from scratch and did much better.

In some cases like the last two I felt I had a rough proof that I had the best score.

You get a lot of the gains in the early levels when you do it the second time. You have to be really parsimonious on each step and use repetitions.

The other two things I'm doing tonight are playing Go online and doing C++ programming so I'm sort of primed to do this. I do an awful lot of this sort of thing...
posted by lupus_yonderboy at 9:30 PM on September 17, 2008


(and I have to say, the cuteness of the robot was a good deal of the reason I kept going. It's quite satisfying and I can muse about my real work while the robot wanders around and does his little glowing thing...)
posted by lupus_yonderboy at 9:31 PM on September 17, 2008


I'm doing a PhD in computer science, yet still can't get level 10 out. Oh the shame.
posted by mr dodo at 10:24 PM on September 17, 2008 [2 favorites]


Well, here's a hint for level 10... you're trying to create some monster useful subroutine that does everything for you. Mine is used 7 times.

You have to make heavy use of the fact that moving forward does nothing unless you can move forward; that turning on the light bulb does nothing unless there's a light there; that jumping does nothing if jumping is impossible. So you add little pieces into your basic pattern to make it more general.
posted by lupus_yonderboy at 10:37 PM on September 17, 2008


I guess it's kind of interesting as a reflection of which side you normally work on. The very lean solution lupus posted saves a few commands but requires the robot to execute twice as many moves and effectively reduces it to looking like a roomba, whereas carsonb's code uses a few more commands but makes the robot appear to know what it's doing.
posted by mandal at 1:23 AM on September 18, 2008


When I realized you were trying to minimize moves, 167 on my second try. Knowing how it works now, it'd be hard to do more than one or two points better than that.

I don't think there's an awful lot more to be gained either. You were a few points clear of me after level 10, but I finished at 167 too. I may have clipped a few back at level 12 with this:

MM: F, J, F2, F1, L, F2, B*
Fn1: J, B, J, B, J, B, R
Fn2: F1, F1, F1

[* bulb]
posted by mandal at 6:03 AM on September 18, 2008 [1 favorite]


Also reminds me of RoboRally.

That's what I thought! Played some just a couple of weekends ago.
posted by Durn Bronzefist at 4:56 PM on September 18, 2008


197, but I wasn't optimising. Interesting that Level 12 only needs 1 function. You'd think it'd be harder than that.
Bizarrely, it was level 11 that gave me the most difficulty. Level 10 sort of progressed organically. I used all my squares, and you couldn't follow the code, but it worked.
posted by seanyboy at 12:58 PM on September 23, 2008


« Older 42 + 1?   |   oil tied economies - the gift that keeps giving Newer »


This thread has been archived and is closed to new comments