From c6abf8e98d48c52e2111087b15abad1be3b7c652 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Sun, 12 Mar 2023 18:47:50 +0100 Subject: [PATCH] Made path_decay configurable --- columbus/env.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/columbus/env.py b/columbus/env.py index aff4228..f0530e2 100644 --- a/columbus/env.py +++ b/columbus/env.py @@ -16,7 +16,7 @@ class ColumbusEnv(gym.Env): metadata = {'render.modes': ['human'], 'render_modes': [ '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__() self.action_space = spaces.Box( 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.agent_draw_path = agent_draw_path self.clear_path_on_reset = clear_path_on_reset - self.path_decay = 0.1 + self.path_decay = path_decay if isinstance(agent_cls, str): agent_cls = getattr(entities, agent_cls)