aernesto / Lux-Design-S2

Repository for the Lux AI Challenge, season 2
https://lux-ai.org/
2 stars 0 forks source link

Profile our code #18

Open aernesto opened 1 year ago

aernesto commented 1 year ago

resource: https://realpython.com/python-timer/#finding-bottlenecks-in-your-code-with-profilers

On competition server, we only have 3 seconds to submit our actions at each step, and we may excess these 3seconds only up to 60 seconds for the whole episode.

aernesto commented 1 year ago

Try to remove duplicated computations (joblib caching?)

aernesto commented 1 year ago

pretty cool: https://docs.python.org/3/howto/logging.html#optimization

aernesto commented 1 year ago

try to avoid creating duplicate CartesianPoint instances https://realpython.com/python-class-constructor/

aernesto commented 1 year ago

slightly better performance

aernesto commented 1 year ago

As of submission 3.3 we are still way too slow

aernesto commented 1 year ago

One way to speed up spawning is to only score a random sample of potential spawn locations, and select from that sample.... 20?