miniworld-maze 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of miniworld-maze might be problematic. Click here for more details.
- miniworld_maze/core/miniworld_gymnasium/unified_env.py +6 -13
- miniworld_maze/environments/base_grid_rooms.py +5 -1
- {miniworld_maze-1.3.0.dist-info → miniworld_maze-1.3.2.dist-info}/METADATA +1 -1
- {miniworld_maze-1.3.0.dist-info → miniworld_maze-1.3.2.dist-info}/RECORD +5 -5
- {miniworld_maze-1.3.0.dist-info → miniworld_maze-1.3.2.dist-info}/WHEEL +1 -1
|
@@ -349,8 +349,8 @@ class UnifiedMiniWorldEnv(gym.Env):
|
|
|
349
349
|
for obs_level in self.info_obs:
|
|
350
350
|
# Generate observation with the specified level
|
|
351
351
|
info_obs = self._generate_observation(observation_level=obs_level)
|
|
352
|
-
# Use the observation level
|
|
353
|
-
info[
|
|
352
|
+
# Use the observation level enum as key
|
|
353
|
+
info[obs_level] = info_obs
|
|
354
354
|
|
|
355
355
|
# Return first observation with info dict for Gymnasium compatibility
|
|
356
356
|
return obs, info
|
|
@@ -584,19 +584,14 @@ class UnifiedMiniWorldEnv(gym.Env):
|
|
|
584
584
|
|
|
585
585
|
def _calculate_step_results(self, observation):
|
|
586
586
|
"""Calculate reward, termination, and info for step."""
|
|
587
|
-
# Generate topdown view for info if needed
|
|
588
|
-
topdown = None
|
|
589
|
-
if self.obs_level != 2: # Not TOP_DOWN_FULL
|
|
590
|
-
topdown = self.render_top_view(POMDP=False, frame_buffer=self.topdown_fb)
|
|
591
|
-
|
|
592
587
|
# Generate additional observations for info dictionary if specified
|
|
593
588
|
info = {}
|
|
594
589
|
if self.info_obs is not None:
|
|
595
590
|
for obs_level in self.info_obs:
|
|
596
591
|
# Generate observation with the specified level
|
|
597
592
|
info_obs = self._generate_observation(observation_level=obs_level)
|
|
598
|
-
# Use the observation level
|
|
599
|
-
info[
|
|
593
|
+
# Use the observation level enum as key
|
|
594
|
+
info[obs_level] = info_obs
|
|
600
595
|
|
|
601
596
|
# Check termination
|
|
602
597
|
if self.step_count >= self.max_episode_steps:
|
|
@@ -604,8 +599,7 @@ class UnifiedMiniWorldEnv(gym.Env):
|
|
|
604
599
|
reward = 0
|
|
605
600
|
info.update(
|
|
606
601
|
{
|
|
607
|
-
"pos": self.agent.pos,
|
|
608
|
-
"mdp_view": topdown if topdown is not None else observation,
|
|
602
|
+
"pos": np.array([self.agent.pos[0], self.agent.pos[2]]),
|
|
609
603
|
}
|
|
610
604
|
)
|
|
611
605
|
else:
|
|
@@ -613,8 +607,7 @@ class UnifiedMiniWorldEnv(gym.Env):
|
|
|
613
607
|
terminated = False
|
|
614
608
|
info.update(
|
|
615
609
|
{
|
|
616
|
-
"pos": self.agent.pos,
|
|
617
|
-
"mdp_view": topdown if topdown is not None else observation,
|
|
610
|
+
"pos": np.array([self.agent.pos[0], self.agent.pos[2]]),
|
|
618
611
|
}
|
|
619
612
|
)
|
|
620
613
|
|
|
@@ -230,10 +230,14 @@ class GridRoomsEnvironment(UnifiedMiniWorldEnv):
|
|
|
230
230
|
obs, reward, terminated, truncated, info = super().step(action)
|
|
231
231
|
|
|
232
232
|
# Check if goal is achieved
|
|
233
|
-
|
|
233
|
+
goal_achieved = self._is_goal_achieved()
|
|
234
|
+
if goal_achieved:
|
|
234
235
|
terminated = True
|
|
235
236
|
reward = 1.0 # Positive reward for achieving goal
|
|
236
237
|
|
|
238
|
+
# Add success indicator to info dictionary
|
|
239
|
+
info["success"] = 1.0 if goal_achieved else 0.0
|
|
240
|
+
|
|
237
241
|
# Add agent and goal positions to info dictionary
|
|
238
242
|
agent_pos = self.agent.pos
|
|
239
243
|
info["agent_position"] = np.array([agent_pos[0], agent_pos[2]]) # x, z
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: miniworld-maze
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: Multi-room maze environments from the DrStrategy paper. Provides NineRooms-v0, SpiralNineRooms-v0, and TwentyFiveRooms-v0 gymnasium environments.
|
|
5
5
|
Keywords: reinforcement-learning,environment,gymnasium,multi-room-maze,drstrategy,maze-navigation,partial-observability,3d-environments
|
|
6
6
|
Author: Tim Joseph
|
|
@@ -260,18 +260,18 @@ miniworld_maze/core/miniworld_gymnasium/textures/white_1.png,sha256=wRrgs92I_Ids
|
|
|
260
260
|
miniworld_maze/core/miniworld_gymnasium/textures/wood_1.png,sha256=XRZyIN34HFo14olbxRcsHGrzCAFqUlowc6nLR22IFBE,184713
|
|
261
261
|
miniworld_maze/core/miniworld_gymnasium/textures/wood_2.png,sha256=qSDHB-ZO11JJLQuiQse-0edpbuTg1YO-eIBhdTvNUhc,93121
|
|
262
262
|
miniworld_maze/core/miniworld_gymnasium/textures/wood_planks_1.png,sha256=E4SNN1s4yOtkLfZFQy905eip6KvDWnnPUrpS82FxMAg,847259
|
|
263
|
-
miniworld_maze/core/miniworld_gymnasium/unified_env.py,sha256=
|
|
263
|
+
miniworld_maze/core/miniworld_gymnasium/unified_env.py,sha256=_xkznGIzXQpZOULgK-XFZaXZbhsouEupByf-4cfZLZc,46607
|
|
264
264
|
miniworld_maze/core/miniworld_gymnasium/utils.py,sha256=9cfpg4qYz-Esxvu8nTMPFJc-Tl0TRxTrX6cfg0YuK_o,1007
|
|
265
265
|
miniworld_maze/core/miniworld_gymnasium/wrappers.py,sha256=cD0nGSJYNU96zoWv63aEiKd986POhtHfGGEpNpRL5ec,122
|
|
266
266
|
miniworld_maze/core/observation_types.py,sha256=Co8mEIXzIgk0MLx6tqeBd1EE0PuZOL1gbZwobiEde08,1316
|
|
267
267
|
miniworld_maze/environments/__init__.py,sha256=DKld5MQU7x9eNL6BlxIettA44bCiIn2zIpYECDCNxoQ,331
|
|
268
|
-
miniworld_maze/environments/base_grid_rooms.py,sha256
|
|
268
|
+
miniworld_maze/environments/base_grid_rooms.py,sha256=ZYB2uTEXhifbXdg2qqJ9LC6r57_kjDfgvYqW7qoWmHg,15031
|
|
269
269
|
miniworld_maze/environments/factory.py,sha256=Zk26JawsMgSLMgvSnQxFhQCD8yMH76HgqFtogzWFfqY,1333
|
|
270
270
|
miniworld_maze/environments/nine_rooms.py,sha256=Ct96cKtSt1_nLNI5RBUhwqdNUQq1rHfBJ3aB5Igbdow,1794
|
|
271
271
|
miniworld_maze/environments/spiral_nine_rooms.py,sha256=a_pUuv-ghez8h76Z7YsHkQoLXsQ-w9azKLjEjO4uKmA,1749
|
|
272
272
|
miniworld_maze/environments/twenty_five_rooms.py,sha256=MewKPDHDilscQGTT3aGRrSHvo4uFgHHAOrnJMrHaezQ,2598
|
|
273
273
|
miniworld_maze/tools/__init__.py,sha256=XiReXrJIcBKvDVyPZrKPq1mckJs0_WC7q_RmdXXcKHs,55
|
|
274
274
|
miniworld_maze/utils.py,sha256=HTOkfRq72oOC844gVXjWMH1ox7wdSxfCS6oTrWBw05Q,7523
|
|
275
|
-
miniworld_maze-1.3.
|
|
276
|
-
miniworld_maze-1.3.
|
|
277
|
-
miniworld_maze-1.3.
|
|
275
|
+
miniworld_maze-1.3.2.dist-info/WHEEL,sha256=Jb20R3Ili4n9P1fcwuLup21eQ5r9WXhs4_qy7VTrgPI,79
|
|
276
|
+
miniworld_maze-1.3.2.dist-info/METADATA,sha256=PDoE_djeG02mqcAxRAxLSPlqDZbvW5xynx9O1QAA0g4,9657
|
|
277
|
+
miniworld_maze-1.3.2.dist-info/RECORD,,
|