Closed SiggyF closed 2 years ago
This is actually likely to be caused by the lux ai 2021 environment itself. The backing engine is written in Typescript and runs on Nodejs, so all "actual" state is stored in a separate process.
I also tested it for the connectx environment. There the issue is also occuring.
>>> env_a = kaggle_environments.make('connectx')
>>> env_b = kaggle_environments.make('connectx')
>>> env_a.logs is env_b.logs
True
I made a PR (#157) that fixes this issue and another issue in the rewards instantiation. I tested it with the following code:
>>> env_a = kaggle_environments.make('connectx')
>>> env_b = kaggle_environments.make('connectx')
>>> env_a.logs is env_b.logs
False
If I create multiple environments they will share variables (logs, steps, info). I believe this is not intended, or is it?
If this is not intended it is likely caused by the following code: In the following code python variables are initiated with empty lists and dictionaries. But this happens during function definition time and not during the running of the function.
See the discussion at stackoverflow or the warning in the python docs for details.