Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] Lunar Lander Runs Slowly

See original GitHub issue

Describe 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
    )  # particles are just a decoration
        (ox * MAIN_ENGINE_POWER * m_power, oy * MAIN_ENGINE_POWER * m_power),

System info


Additional context



  • I have checked that there is no similar issue in the repo

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

mbertheaucommented, Dec 13, 2022

I’m currently at if self.render_mode is not None. That seems to cover all cases.

pseudo-rnd-thoughtscommented, Dec 13, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found