Live data from Hacker News

Show HN: I built an autopilot for the lunar lander game

szhu.github.io

51–60 of 73 posts

Re: Show HN: I built an autopilot for the lunar lander game

#51

Earlier quoted context omitted.

That'd be very fun indeed!

Maybe not for long, because for a given set of constraints to optimze for, there's probably a solution for which it can be proven to be optimal. At that point there's no more contest.

[dead]

Re: Show HN: I built an autopilot for the lunar lander game

#53

Earlier quoted context omitted.

That'd be very fun indeed!

Maybe not for long, because for a given set of constraints to optimze for, there's probably a solution for which it can be proven to be optimal. At that point there's no more contest.

Obviously next you switch up the game to do things besides lunar landing. Have it be a take off ascent simulator for example. After a few years we can have an entire space mission programmed by gamers...

Re: Show HN: I built an autopilot for the lunar lander game

#55
post #37

Earlier quoted context omitted.

Yes, I would like to see the environment ported to Python, wrapped in gym, and given a good shaped reward, i.e. like reward = prior_height_delta - (height - target_height) - fuel_cost. Run Stable Baselines PPO or DQN on that and it should converge to something close to an optimized MPC controller.

It is already there, just not this particular implementation (or maybe it is?). You can run PPO or DQN right now on the Open AI Gym implementation using Stable-Baselines3: https://stable-baselines3.readthedocs.io/en/master/ In fact I previously ran it locally and PPO solved the problem within 10 minutes of training with max reward of about 200.

This is a different lunar lander than you are maybe thinking. It looks more like SpaceX's Starship than an Apollo lunar module. I don't think it has been made into a gym env yet but that would be great if it is!

Re: Show HN: I built an autopilot for the lunar lander game

#56

this is great! The one thing i think to optimize it is to predict how late to start the engine to minimize its usage. The last I got was 730 times used, at 53seconds.

choosing how late you can turn it on and still land is almost a game in itself.

Re: Show HN: I built an autopilot for the lunar lander game

#57
post #23

That's cool, but it has a very conservative descent profile and would use a ton of fuel. Having played Kerbal I'm used to attempting fuel efficient landings, which means more of a suicide burn approach, but of course this game doesn't keep track of that. There's something timelessly appealing about lunar lander games. The very first game I ever played on a computer, written in BASIC, was a 'turn based' one dimensiona…

Ditto on the timeless appeal.

Watching this auto pilot reminded me of landing Getaceiver on Barsoom in Heinlein’s Number of the Beast, which has a very long passage describing the (fictional) orbital mechanics landing on (a fictional alternate reality version of) Mars.

Re: Show HN: I built an autopilot for the lunar lander game

#58
post #25

very similar to https://www.gymlibrary.dev/environments/box2d/lunar_lander/

Oh yeah, the author of the game said he made use of a similar tutorial:

http://students.cs.ucl.ac.uk/schoolslab/projects/HT5/

from the readme here: https://github.com/ehmorris/lunar-lander

Re: Show HN: I built an autopilot for the lunar lander game

#59
post #28

uhm... it doesn't seem to work, at least on my workstation (firefox on a debian)

oh no! I'm tried it on Firefox on Mac and it worked fine?

https://user-images.githubusercontent.com/1570168/224370129-...

https://user-images.githubusercontent.com/1570168/224369935-...

Re: Show HN: I built an autopilot for the lunar lander game

#60

Simple and fun, thanks for sharing! Have you thought of adding a wordle style variation - just a daily puzzle that's a different start orientation + velocity? Just a thought.

Oh that sounds like fun, I would definitely play that. You should suggest it to the developer who made the game!

https://github.com/ehmorris/lunar-lander/issues

https://news.ycombinator.com/item?id=35032506

Post reply on HN