karinemiras / evoman_framework

53 stars 173 forks source link

Made visual rendering steps optional for major runtime enhancements #13

Open Tamrell opened 3 years ago

Tamrell commented 3 years ago

I am currently following the course "Evolutionary Computing" at the VU Amsterdam, using snakeviz (a python profiler) I noticed that even when using the suggested code:

headless = True
if headless:
    os.environ["SDL_VIDEODRIVER"] = "dummy"

the majority (90% + ) of the runtime is caused by the drawing/rendering on what seems to be a "dummy" screen/gpu.

I added in a flag (visualmode) for the environment class that disables purely the (non-functional) drawing components for a noticeable speed enhancement.

Hopefully this can still be accepted during this edition of the course so the other groups can also spend more time on analysis rather than running experiments :)

Regards, Angelo