diff --git a/README.md b/README.md index fdf0567..9a17244 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ env = NuconGoalEnv( # Keep policy within the simulator's known data distribution. # SIM_UNCERTAINTY (kNN-GP posterior std) is injected into obs when a simulator is active. # Tune start/scale/threshold to taste. - objectives=[UncertaintyPenalty(start=0.3, scale=1.0)], # L2 penalty above soft threshold + additional_objectives=[UncertaintyPenalty(start=0.3, scale=1.0)], # L2 penalty above soft threshold terminators=[UncertaintyAbort(threshold=0.7)], # abort episode at hard threshold ) # Or use a preset: env = gym.make('Nucon-goal_power-v0', simulator=simulator) diff --git a/nucon/rl.py b/nucon/rl.py index 0a93b1c..5cd54ef 100644 --- a/nucon/rl.py +++ b/nucon/rl.py @@ -280,8 +280,8 @@ class NuconGoalEnv(gym.Env): seconds_per_step=5, terminators=None, terminate_above=0, - objectives=None, - objective_weights=None, + additional_objectives=None, + additional_objective_weights=None, ): super().__init__() @@ -351,9 +351,9 @@ class NuconGoalEnv(gym.Env): self.action_space = spaces.Dict(action_spaces) self._terminators = terminators or [] - _objs = objectives or [] + _objs = additional_objectives or [] self._objectives = [Objectives[o] if isinstance(o, str) else o for o in _objs] - self._objective_weights = objective_weights or [1.0] * len(self._objectives) + self._objective_weights = additional_objective_weights or [1.0] * len(self._objectives) self._desired_goal = np.zeros(n_goals, dtype=np.float32) self._total_steps = 0