[Bug Report] Lunar Lander Runs Slowly
See original GitHub issueDescribe the bug
The Lunar Lander environment creates particles and updates their physics, even when not being rendered. This slows down wall-time training on the environment by ~5x-10x.
Wrapping said code within the step(.) function with if self.render_mode == “human”: resolves the issue.
Code example
if self.render_mode == "human":
p = self._create_particle(
3.5, # 3.5 is here to make particle speed adequate
impulse_pos[0],
impulse_pos[1],
m_power,
) # particles are just a decoration
p.ApplyLinearImpulse(
(ox * MAIN_ENGINE_POWER * m_power, oy * MAIN_ENGINE_POWER * m_power),
impulse_pos,
True,
)
System info
N/A
Additional context
N/A
Checklist
- I have checked that there is no similar issue in the repo
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
motion slowness error glitch :: It Lurks Below General ...
ever since august my it lurks below game has become too slow to play. the motion is moving like a lunar landing game...
Read more >Issues · Farama-Foundation/Gymnasium - GitHub
A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym) - Issues · Farama-Foundation/Gymnasium.
Read more >First private Moon lander crashed when British engine failed ...
The world's first private mission to the lunar surface ended in a crash landing on Thursday night after the craft, called Beresheet, failed...
Read more >A lunar lander is making its descent to a moon base and ...
A lunar lander is making its descent to a moon base and descends slowly under the retro-thrust of its descent engine. The engine...
Read more >Star Citizen Alpha 3.17.4 Known Issues
Upon exiting from Quantum Travel to a location near a moon, pilots may find that their altitude meter will freeze and no longer...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m currently at
if self.render_mode is not None
. That seems to cover all cases.If the rendering is deterministic, could you save the rendered frames then make the change and see if the rendered frames are the same (using the same actions and reset seed). Don’t think we want this added to the actual tests, could include the test code for someone to replicate. Then add a quick performance test to show the difference in fps?
I don’t think we can add anything to the actual tests in the project as the old version won’t exist after the fix.