Spaces:
Running
Running
| """OpenEnv types for the Origami RL environment.""" | |
| from typing import Any, Optional | |
| from openenv.core import Action, Observation, State | |
| from pydantic import Field | |
| class OrigamiAction(Action): | |
| """LLM submits a FOLD crease pattern as its action.""" | |
| fold_data: dict[str, Any] = Field( | |
| ..., description="FOLD-format crease pattern JSON" | |
| ) | |
| class OrigamiObservation(Observation): | |
| """Result of simulating the LLM's crease pattern.""" | |
| task: dict[str, Any] = Field(default_factory=dict) | |
| fold_data: dict[str, Any] = Field(default_factory=dict) | |
| final_positions: list[list[float]] = Field(default_factory=list) | |
| target_positions: list[list[float]] = Field(default_factory=list) | |
| shape_similarity: float = 0.0 | |
| max_strain: float = 0.0 | |
| is_stable: bool = True | |
| error: Optional[str] = None | |
| class OrigamiState(State): | |
| """Internal state for an origami episode.""" | |
| task_name: str = "" | |
| shape_similarity: float = 0.0 | |
| is_stable: bool = True | |