Farama-Foundation / SuperSuit

A collection of wrappers for Gymnasium and PettingZoo environments (being merged into gymnasium.wrappers and pettingzoo.wrappers
Other
446 stars 56 forks source link

Use custom functions of CustomEnv #167

Closed domist07 closed 2 years ago

domist07 commented 2 years ago

I've created a custom environment with all the necessary functions like init, step, reset,... and also with extra function for example like

def print_reward(self):
    print(self.reward)

After initializing my CustomEnv I could use this own functions, but after I applied the function ss.concat_vec_envs_v1(CustomEnv, 1) it isn't possible anymore.

Is there any possibility to make it available again?

jjshoots commented 2 years ago

PettingZoo (and by default SuperSuit wrappers) run by the convention that any functions created during init that are not in the parent Env are considered as private functions, so there is currently no easy way to get non-API-compliant functions out unfortunately.