Spaces:
Sleeping
Sleeping
File size: 939 Bytes
17a5579 a373fb7 17a5579 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | from pydantic import BaseModel
from typing import Dict, List, Tuple
class Furniture(BaseModel):
id: str
width: int # units (e.g. 1 unit = 0.5 meter)
height: int
rules: List[str] = []
class PlacedFurniture(BaseModel):
id: str
x: int
y: int
rotation: int # 0 or 90
class Action(BaseModel):
action_type: str # "place_item", "remove_item", "no_op"
item: str = ""
x: int = 0
y: int = 0
rotation: int = 0 # 0 or 90
class Observation(BaseModel):
room_size: Tuple[int, int]
door_position: Tuple[int, int]
windows: List[Tuple[int, int]] = []
unplaced_items: List[Furniture]
placed_items: Dict[str, PlacedFurniture]
solar_grid: List[List[bool]] = []
thermal_grid: List[List[float]] = []
feedback_logs: List[str]
step_count: int
max_steps: int
class EpisodeResult(BaseModel):
task_id: str
success: bool
score: float
steps_taken: int
|