Spaces:
Sleeping
Sleeping
| """Configuration objects for MiniGridEnv.""" | |
| from dataclasses import dataclass, field | |
| from typing import Optional | |
| class RewardConfig: | |
| """Reward-shaping controls for environment step rewards.""" | |
| mode: str = "binary" # "binary" | "shaped" | "efficiency" | |
| completion_reward: float = 1.0 | |
| failure_reward: float = 0.0 | |
| step_penalty: float = 0.0 | |
| invalid_action_penalty: float = 0.0 | |
| efficiency_bonus_weight: float = 0.5 | |
| class EnvConfig: | |
| """Episode, observation, and reproducibility settings.""" | |
| # Level selection | |
| level_name: str = "GoToRedBall" | |
| # Episode limits | |
| max_steps_override: Optional[int] = None | |
| # Reward configuration | |
| reward: RewardConfig = field(default_factory=RewardConfig) | |
| # Observation configuration | |
| include_history: bool = True | |
| max_history_length: int = 20 | |
| include_raw_grid: bool = False | |
| # Reproducibility and optional metrics | |
| seed: int = 42 | |
| compute_optimal: bool = False | |
| track_carrying: bool = True | |