Add SubGoalTRoom
This commit is contained in:
parent
28711cee19
commit
3b8ec64c26
@ -316,6 +316,19 @@ class DistRewardTRoom(GoalRewardTRoom, DistRewardMixIn):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class SubGoalTRoom(GoalRewardTRoom):
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
scale: float,
|
||||||
|
primary_goal: Tuple[float, float] = (2.0, -3.0),
|
||||||
|
subgoal: Tuple[float, float] = (-2.0, -3.0),
|
||||||
|
) -> None:
|
||||||
|
super().__init__(scale, primary_goal)
|
||||||
|
self.goals.append(
|
||||||
|
MazeGoal(np.array(subgoal) * scale, reward_scale=0.5, rgb=GREEN)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class GoalRewardBlockMaze(GoalRewardUMaze):
|
class GoalRewardBlockMaze(GoalRewardUMaze):
|
||||||
OBSERVE_BLOCKS: bool = True
|
OBSERVE_BLOCKS: bool = True
|
||||||
|
|
||||||
@ -444,7 +457,7 @@ class TaskRegistry:
|
|||||||
"Fall": [DistRewardFall, GoalRewardFall],
|
"Fall": [DistRewardFall, GoalRewardFall],
|
||||||
"2Rooms": [DistReward2Rooms, GoalReward2Rooms, SubGoal2Rooms],
|
"2Rooms": [DistReward2Rooms, GoalReward2Rooms, SubGoal2Rooms],
|
||||||
"4Rooms": [DistReward4Rooms, GoalReward4Rooms, SubGoal4Rooms],
|
"4Rooms": [DistReward4Rooms, GoalReward4Rooms, SubGoal4Rooms],
|
||||||
"TRoom": [DistRewardTRoom, GoalRewardTRoom],
|
"TRoom": [DistRewardTRoom, GoalRewardTRoom, SubGoalTRoom],
|
||||||
"BlockMaze": [DistRewardBlockMaze, GoalRewardBlockMaze],
|
"BlockMaze": [DistRewardBlockMaze, GoalRewardBlockMaze],
|
||||||
"Billiard": [
|
"Billiard": [
|
||||||
DistRewardBilliard,
|
DistRewardBilliard,
|
||||||
|
Loading…
Reference in New Issue
Block a user