import gym

from stable_baselines.a2c import A2C
from stable_baselines.acer import ACER
from stable_baselines.acktr import ACKTR
from stable_baselines.ddpg import DDPG
from stable_baselines.deepq import DQN
from stable_baselines.gail import GAIL
from stable_baselines.ppo1 import PPO1
from stable_baselines.ppo2 import PPO2
from stable_baselines.trpo_mpi import TRPO

__version__ = "2.0.0"

if not hasattr(gym.spaces.MultiBinary, '__eq__'):
    def _eq(self, other):
        return self.n == other.n

    gym.spaces.MultiBinary.__eq__ = _eq

if not hasattr(gym.spaces.MultiDiscrete, '__eq__'):
    def _eq(self, other):
        return self.nvec == other.nvec

    gym.spaces.MultiDiscrete.__eq__ = _eq

@@ -3,16 +3,35 @@
 port gym
+%0Aimport numpy as np
 %0A%0Afrom s
@@ -407,57 +407,186 @@
 0%22%0A%0A
-if not hasattr(gym.spaces.MultiBinary, '__eq__'):
+%0A# patch Gym spaces to add equal functions, if not implemented%0Aif gym.spaces.MultiBinary.__eq__ == object.__eq__:  # by default, all classes have the __eq__ function from object.
 %0A   
@@ -690,20 +690,8 @@
 %0Aif 
-not hasattr(
 gym.
@@ -714,19 +714,32 @@
 rete
-, '
+.__eq__ == object.
 __eq__
-')
 :%0A  
@@ -773,24 +773,31 @@
      return 
+np.all(
 self.nvec ==
@@ -807,16 +807,17 @@
 her.nvec
+)
 %0A%0A    gy

corrected the __eq__ detection