Made path_decay configurable
This commit is contained in:
parent
6095ca6fec
commit
c6abf8e98d
@ -16,7 +16,7 @@ class ColumbusEnv(gym.Env):
|
|||||||
metadata = {'render.modes': ['human'], 'render_modes': [
|
metadata = {'render.modes': ['human'], 'render_modes': [
|
||||||
'human', 'non-human'], 'render_fps': 60}
|
'human', 'non-human'], 'render_fps': 60}
|
||||||
|
|
||||||
def __init__(self, observable=observables.Observable(), fps=60, env_seed=3.1, master_seed=None, start_pos=(0.5, 0.5), start_score=0, speed_fac=0.01, acc_fac=0.04, die_on_zero=False, return_on_score=-1, reward_mult=1, agent_drag=0, controll_type='SPEED', aux_reward_max=1, aux_penalty_max=0, aux_reward_discretize=0, void_is_type_barrier=True, void_damage=1, torus_topology=False, default_collision_elasticity=1, terminate_on_reward=False, agent_draw_path=False, clear_path_on_reset=True, max_steps=-1, value_color_mapper='tanh', width=720, height=720, agent_attrs={}, agent_cls=entities.Agent, exception_for_unsupported_collision=True):
|
def __init__(self, observable=observables.Observable(), fps=60, env_seed=3.1, master_seed=None, start_pos=(0.5, 0.5), start_score=0, speed_fac=0.01, acc_fac=0.04, die_on_zero=False, return_on_score=-1, reward_mult=1, agent_drag=0, controll_type='SPEED', aux_reward_max=1, aux_penalty_max=0, aux_reward_discretize=0, void_is_type_barrier=True, void_damage=1, torus_topology=False, default_collision_elasticity=1, terminate_on_reward=False, agent_draw_path=False, clear_path_on_reset=True, max_steps=-1, value_color_mapper='tanh', width=720, height=720, agent_attrs={}, agent_cls=entities.Agent, exception_for_unsupported_collision=True, path_decay=0.1):
|
||||||
super(ColumbusEnv, self).__init__()
|
super(ColumbusEnv, self).__init__()
|
||||||
self.action_space = spaces.Box(
|
self.action_space = spaces.Box(
|
||||||
low=-1, high=1, shape=(2,), dtype=np.float32)
|
low=-1, high=1, shape=(2,), dtype=np.float32)
|
||||||
@ -62,7 +62,7 @@ class ColumbusEnv(gym.Env):
|
|||||||
self.terminate_on_reward = terminate_on_reward
|
self.terminate_on_reward = terminate_on_reward
|
||||||
self.agent_draw_path = agent_draw_path
|
self.agent_draw_path = agent_draw_path
|
||||||
self.clear_path_on_reset = clear_path_on_reset
|
self.clear_path_on_reset = clear_path_on_reset
|
||||||
self.path_decay = 0.1
|
self.path_decay = path_decay
|
||||||
|
|
||||||
if isinstance(agent_cls, str):
|
if isinstance(agent_cls, str):
|
||||||
agent_cls = getattr(entities, agent_cls)
|
agent_cls = getattr(entities, agent_cls)
|
||||||
|
Loading…
Reference in New Issue
Block a user