Sujet : Re: More Fun Stuff From Lunar Lander
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.os.linux.advocacyDate : 18. Jun 2024, 20:58:23
Autres entêtes
Message-ID : <lde3meF8ic2U1@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Tue, 18 Jun 2024 08:19:25 -0000 (UTC), Lawrence D'Oliveiro wrote:
There are Fortran and Rust versions already available:
<https://www.cs.brandeis.edu/~storer/LunarLander/LunarLander.html>.
I'd found the C version. The comments on the globals helped a lot. Z, the
thrust per pound of fuel is arbitrarily set to 1.8. I'm not sure about
setting G (gravity) to .001. As a game it doesn't make a difference but I
don't think it's correct.
Spreading out the polynomial might help. For added obfuscation 420 has
Q*Q and 430 has Q^2.
The guy’s father was a physicist, who helped him with the maths. This is
the kind of code that physicists would write.
I worked with a PhD chemist with a similar style but he used FORTRAN.
Unraveling it and converting it to 8049 assembler for a handheld device
was interesting.