From a7b1f2fc145a8d46f77801b63f537b4996eb865c Mon Sep 17 00:00:00 2001 From: sp Date: Thu, 26 Sep 2024 16:01:11 +0200 Subject: [PATCH] fixed playground prob passing --- .../Minigrid/minigrid/envs/GSW_Playground.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/notebooks/environments/Minigrid/minigrid/envs/GSW_Playground.py b/notebooks/environments/Minigrid/minigrid/envs/GSW_Playground.py index 612e569..eda1cb6 100644 --- a/notebooks/environments/Minigrid/minigrid/envs/GSW_Playground.py +++ b/notebooks/environments/Minigrid/minigrid/envs/GSW_Playground.py @@ -83,21 +83,21 @@ class Playground(MiniGridEnv): assert width >= 5 and height >= 5 # Create an empty grid self.grid = Grid(width, height) - + slippery_north = SlipperyNorth(probability_intended=self.probability_intended, probability_turn_intended=self.probability_turn_intended) slippery_east = SlipperyEast(probability_intended=self.probability_intended, probability_turn_intended=self.probability_turn_intended) slippery_south = SlipperySouth(probability_intended=self.probability_intended, probability_turn_intended=self.probability_turn_intended) slippery_west = SlipperyWest(probability_intended=self.probability_intended, probability_turn_intended=self.probability_turn_intended) - + # A rectangular wall around the environment self.grid.wall_rect(0, 0, width, height) - - # Change the goal position: + + # Change the goal position: self.put_obj(Goal(), width - 2, 1) - # TODO: Add walls, pools of lava, etc. + # TODO: Add walls, pools of lava, etc. self.grid.horz_wall(2, 1, 3, slippery_north) self.grid.vert_wall(5, 2, 2, slippery_east) l = 4 @@ -120,6 +120,8 @@ class Playground(MiniGridEnv): properties_str = "" if self.faulty_behavior: properties_str += F"FaultProbability:{self.fault_probability}\n" + properties_str += F"ProbTurnIntended:{self.probability_turn_intended}\n" + properties_str += F"ProbForwardIntended:{self.probability_intended}\n" return grid + properties_str