Post Reply 
Lunar Lander
12-04-2021, 12:29 AM (This post was last modified: 12-04-2021 12:30 AM by Mike T..)
Post: #1
Lunar Lander
I first encountered the Lunar lander game on a flight back to England way back in 1976 when my father introduced me to his brand new HP97 as a way to keep me occupied. By the time the battery went flat I'd managed to land successfully, had written a couple of programs of my own, and I knew I wasn't going to grow up to be a Marine Biologist!

I recently gave the HP33C version a go (from the HP33E Applications Book - Page 23) and after a few attempts managed to successfully land using 15 burns with no remaining fuel left.

Code:

Vel.Alt     Burn    Fuel

-50.0500    0        120
-55.0448    0        120
-60.0390    0        120
-65.0328    0        120
-70.0260    0        120
-75.0188    0        120
-80.0110    45       75
-40.0050    25       50
-20.0020    20       30
 -5.0008    8        22
 -2.0004    6        16
 -1.0003    5        11
 -1.0002    5        6
 -1.0001    6        0
  0.0000    0        0     (15 burns)
  0.

I'm sure I wasn't the only person whose imagination was captivated by this simple game - but the question is what is/was your best solution?

After a couple more goes I managed to improve on the solution above and land using just 13 burns with 10 units of fuel remaining, can you do better...

Mike T.

HP21, HP25, HP32E, HP33C, HP34C, HP10C, HP11C, HP12C, HP32S, HP22S
Find all posts by this user
Quote this message in a reply
12-04-2021, 07:50 AM
Post: #2
RE: Lunar Lander
I believe that the best solution is a single final burn.
Find all posts by this user
Quote this message in a reply
12-04-2021, 07:59 AM
Post: #3
RE: Lunar Lander
Free-fall until you're falling with a speed of 80 at an altitude of 110, then burn 15 units so you're falling at a speed of 70 at an altitude of 35; then burn 75 units, killing your speed at altitude 0.

I believe that's the optimum solution, at least as I recall, playing this game on the HP-25...
Visit this user's website Find all posts by this user
Quote this message in a reply
12-04-2021, 08:29 AM (This post was last modified: 12-04-2021 08:31 AM by toml_12953.)
Post: #4
RE: Lunar Lander
I was never able to land safely in any of the incarnations of LL I tried. I died in Assembler, BASIC, Fortran, COBOL, C, Pascal, JavaScript and Python. I died on everything from a building-sized mainframe to a desktop computer to a computer I could carry in my pocket. In fact, if you look at the moon carefully, you can see a crater named for me in the Mare Crisium (Sea of Crises).

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
12-04-2021, 02:37 PM
Post: #5
RE: Lunar Lander
I had an HP-25 and played a lot with the lunar landing simulator. The -25 version didn't adjust for vehicle mass reduction as fuel was consumed. I had little contact with the HP-67, but I recall its version did use the "interactive pause" feature: if you don't enter a burn command, the pause times out and the simulation goes on, assuming a burn of 0. Possibly the -67 version adjusted for mass reduction due to fuel useage, I'm not really sure about this aspect.

The HP-25 lunar langer simulator sparked my interest on flight simulators. I wrote a very crude glider landing simulator for the HP-25 (code is lost), and a passable space shuttle landing simulator for the HP-41C, later improved with synthetic symbols on the display.

Andrés C. Rodríguez (Argentina)

Please disregard idiomatic mistakes.
My posts are mostly from old memories, not from current research.
Find all posts by this user
Quote this message in a reply
12-05-2021, 12:23 AM
Post: #6
RE: Lunar Lander
(12-04-2021 08:29 AM)toml_12953 Wrote:  I was never able to land safely in any of the incarnations of LL I tried. I died in Assembler, BASIC, Fortran, COBOL, C, Pascal, JavaScript and Python. I died on everything from a building-sized mainframe to a desktop computer to a computer I could carry in my pocket.

I'm guessing many (some?) here played this on a PDP8 (back in the early 70s - showing my age!). I managed to land several times. IIRC, If you hit the sweet spot, the pilot got out of the ship, wandered over to the nearby McDonalds (!) and ordered a burger to go, got back in the ship, and you could take off.

If you landed in the wrong spot, you got the admonition "You clod, you've destroyed the only McDonald's on the moon!"
Find all posts by this user
Quote this message in a reply
12-05-2021, 01:27 AM (This post was last modified: 12-05-2021 01:31 AM by Danito-Danone.)
Post: #7
RE: Lunar Lander
Hi, Another way is:
Display | Burn | Fuel
....................| 120
-80.0110 | 40 | 80
-45.0048 | 30 | 50
-20.0015 | 20 | 30
- 5.0003 | 10 | 20
0.0000
D-D
Find all posts by this user
Quote this message in a reply
12-05-2021, 11:19 PM
Post: #8
RE: Lunar Lander
(12-05-2021 01:27 AM)Danito-Danone Wrote:  Hi, Another way is:
Display | Burn | Fuel
....................| 120
-80.0110 | 40 | 80
-45.0048 | 30 | 50
-20.0015 | 20 | 30
- 5.0003 | 10 | 20
0.0000
D-D

I might even be able to remember that solution!! (not the 'best' but it has a certain elegance)

Mike T.

Mike T.

HP21, HP25, HP32E, HP33C, HP34C, HP10C, HP11C, HP12C, HP32S, HP22S
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)