Make ORI_IND optional and adjust the size of maze for swimmer
This commit is contained in:
parent
409ee44568
commit
d043a35e6c
@ -11,7 +11,7 @@ from gym.utils import EzPickle
|
||||
class AgentModel(ABC, MujocoEnv, EzPickle):
|
||||
FILE: str
|
||||
MANUAL_COLLISION: bool
|
||||
ORI_IND: int
|
||||
ORI_IND: Optional[int] = None
|
||||
RADIUS: Optional[float] = None
|
||||
|
||||
def __init__(self, file_path: str, frame_skip: int) -> None:
|
||||
|
@ -331,7 +331,7 @@ class SubGoalTRoom(GoalRewardTRoom):
|
||||
|
||||
class NoRewardRoom(MazeTask):
|
||||
REWARD_THRESHOLD: float = 0.0
|
||||
MAZE_SIZE_SCALING: Scaling = Scaling(4.0, 4.0, 4.0)
|
||||
MAZE_SIZE_SCALING: Scaling = Scaling(4.0, 4.0, 1.0)
|
||||
|
||||
def reward(self, obs: np.ndarray) -> float:
|
||||
return 0.0
|
||||
|
@ -37,7 +37,6 @@ class SwimmerEnv(AgentModel):
|
||||
def step(self, action: np.ndarray) -> Tuple[np.ndarray, float, bool, dict]:
|
||||
xy_pos_before = self.sim.data.qpos[:2].copy()
|
||||
self.do_simulation(action, self.frame_skip)
|
||||
|
||||
forward_reward = self._forward_reward(xy_pos_before)
|
||||
ctrl_cost = self._ctrl_cost_weight * np.sum(np.square(action))
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user