1969 Lunar Lander

Inputs

Hands up if you know what input(s) is/are required to achieve our goal (perfect landing), is it (a) fuel remaining (b) altitude (c) elapsed time (d) downward velocity? Or a combination of them?

A gold star if you said any “one” of them.

In case you didn’t know, it takes just ONE input. For example (d) works.

_fuelRateLBsPerSec = 
   200*(Math.Tanh((0.8695499822497368*DownwardsVelocityInMilesPerSecond)
   +1.303050011396408));

That results in a 0.29 mph landing doing a suicide burn! Fuel rates are as follows:

0, 0, 0, 0, 0, 0, 0, 195.45916665128829, 194.59301873787552, 193.48858268263712, 192.06074110206742, 190.18758410668414, 187.69260825321075, 184.31860542726068, 179.6914867066628, 173.27688782274663

But that’s not all.

What if I give the AI nothing but the altitude? Hands up if you think that would be dumb.

If your hand is up, I am not surprised. Until you try things, you don’t always believe them. Here’s the formula:

_fuelRateLBsPerSec =
   200*(Math.Tanh((1.2230499928627978*(AltitudeInMiles/150))
   +1.7500000055879354));

This is a suicide burn again, yet this managed a 0.82 mph landing (perfect score) with the following fuel rates:

0, 0, 0, 0, 0, 0, 0, 194.5137752950097, 193.53695595944632, 192.51559469260962, 191.48913575519646, 190.5077420699081, 189.6306235470036, 188.9228643435211, 188.450684505169, 188.27523441292078

Now let me give you a puzzled frown.

What if I only tell the AI what the elapsed time is? No hands-up required – you know what’s coming.

It will still manage a “good landing” (2.17 mph). It’s not an efficient way, to achieve an optimum descent, but it works. It even leaves us with 666.79 lb of fuel.

_fuelRateLBsPerSec = 
   200*(Math.Tanh((0.8694499936791544*ElapsedTimeInSeconds/200)
   +1.562499988824129));

This gives fuel rates of:

0, 0, 0, 0, 0, 0, 0, 190.66076264335015, 191.42178592256516, 192.12204649638548, 192.76619952662622, 193.35857447183173, 193.90319291302382, 194.40378624847446, 194.86381308084307

Maybe if I ran it a few times / longer, it would have possibly found the right weighting/bias.

Lastly, giving the ratio of the “remaining fuel” to that of a “full fuel tank”, comes in at (not too shabby) 0.62 mph!

_fuelRateLBsPerSec = 
   200*(Math.Tanh((1.616999994032085*(WeightFuelRemaining/WeightFullTank))
    +0.9563499800860882));

With fuel rates of:

0, 0, 0, 0, 0, 0, 0, 197.6860341128507, 196.55921950993013, 194.90221342303607, 192.4871258562243, 189.01215612291668, 184.10299817430976, 177.3424933779793, 168.34746692412813, 156.90013718211182

Aren’t you a little confused about how it manages to safely land despite some rather unhelpful inputs?

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *