Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, env, handle, away_handle, *args, **kwargs):
BaseModel.__init__(self, env, handle)
self.away_channel = env.get_channel(away_handle)
self.attack_base, _ = env.get_view2attack(handle)
self.move_back = 4
print("attack base", self.attack_base, "away", self.away_channel)
def __init__(self, env, handle, name, subclass_name):
BaseModel.__init__(self, env, handle)
self.name = name
self.subclass_name = subclass_name
def __init__(self, env, handle, attack_handle, *args, **kwargs):
BaseModel.__init__(self, env, handle)
self.attack_channel = env.get_channel(attack_handle)
self.attack_base, self.view2attack = env.get_view2attack(handle)
print("attack_channel", self.attack_channel)
print("view2attack", self.view2attack)
def __init__(self, env, handle, name, subclass_name):
"""init a model
Parameters
----------
env: magent.Environment
handle: handle (ctypes.c_int32)
name: str
subclass_name: str
name of subclass
"""
BaseModel.__init__(self, env, handle)
self.name = name
self.subclass_name = subclass_name
def __init__(self, env, handle, *args, **kwargs):
BaseModel.__init__(self, env, handle)
self.env = env
self.handle = handle
self.n_action = env.get_action_space(handle)
self.view_size = env.get_view_space(handle)
self.attack_base, self.view2attack = env.get_view2attack(handle)