Jayesh1of1/caravan-layout-optimizer
0
1name: CaravanLayoutOptimizer2version: "1.0.0"3 4description: >5 A real-world AI environment where an agent learns to arrange furniture and6 fixtures inside a caravan (600 cm × 300 cm grid, 1 cell = 20 cm) to7 maximise space efficiency, weight balance, zone coherence, walkway8 accessibility, and priority-based usability.9 10author: "Hackathon Submission"11license: MIT12 13server:14 base_url: "http://localhost:7860"15 health_check: "GET /"16 expected_status: 20017 18api:19 reset:20 method: POST21 path: /reset22 body_schema:23 task_id:24 type: string25 enum: [task_easy, task_medium, task_hard]26 default: task_easy27 28 step:29 method: POST30 path: /step31 body_schema:32 item_id:33 type: string34 description: "ID of caravan item to place (e.g. 'bed_main')"35 x:36 type: integer37 minimum: 038 description: "Grid column (0 = left wall)"39 y:40 type: integer41 minimum: 042 description: "Grid row (0 = front of caravan)"43 rotation:44 type: integer45 enum: [0, 90]46 default: 047 48 state:49 method: GET50 path: /state51 52# ---------------------------------------------------------------------53# OBSERVATION SPACE54# ---------------------------------------------------------------------55 56observation_space:57 type: object58 fields:59 task_id: string60 grid_width: integer61 grid_height: integer62 63 placed_items:64 type: array65 item_schema:66 item_id: string67 x: integer68 y: integer69 rotation: integer70 effective_width: integer71 effective_height: integer72 73 unplaced_items:74 type: array75 item_schema:76 id: string77 item_type: string78 width: integer79 height: integer80 weight_kg: float81 zone_preference: string82 83 step_count: integer84 done: boolean85 score: float86 87 metrics:88 feasibility: float89 weight_balance: float90 space_utilisation: float91 zone_coherence: float92 aisle_score: float93 accessibility: float94 items_placed: float95 items_remaining: float96 97 grid_snapshot:98 type: 2d-array99 100# ---------------------------------------------------------------------101# ACTION SPACE102# ---------------------------------------------------------------------103 104action_space:105 type: object106 fields:107 item_id:108 type: string109 x:110 type: integer111 range: [0, 29]112 y:113 type: integer114 range: [0, 14]115 rotation:116 type: integer117 enum: [0, 90]118 119# ---------------------------------------------------------------------120# TASKS121# ---------------------------------------------------------------------122 123tasks:124 125 - id: task_easy126 name: "Basic Placement"127 difficulty: easy128 description: >129 Place 3 essential items (bed, kitchen unit, storage) without overlaps.130 items: [bed_main, kitchen_unit, storage_a]131 max_steps: 20132 score_range: [0.0, 1.0]133 grader: env.graders.grade_easy134 scoring: >135 Feasibility-based scoring. Bonus if all items placed.136 137 - id: task_medium138 name: "Balanced Layout"139 difficulty: medium140 description: >141 Place 5 items optimising for balance and space usage.142 items: [bed_main, kitchen_unit, dining_table, bathroom, fridge]143 max_steps: 30144 score_range: [0.0, 1.0]145 grader: env.graders.grade_medium146 scoring: >147 0.40 × feasibility + 0.30 × weight_balance + 0.30 × space_utilisation.148 149 - id: task_hard150 name: "Full Caravan Design"151 difficulty: hard152 description: >153 Full layout optimisation including zoning, accessibility and aisle logic.154 items: [bed_main, kitchen_unit, dining_table, storage_a, storage_b,155 bathroom, sofa, wardrobe, fridge]156 max_steps: 60157 score_range: [0.0, 1.0]158 grader: env.graders.grade_hard159 scoring: >160 0.22 × feasibility +161 0.18 × weight_balance +162 0.18 × space_utilisation +163 0.16 × zone_coherence +164 0.12 × aisle_score +165 0.14 × accessibility166# ---------------------------------------------------------------------167# REWARD168# ---------------------------------------------------------------------169 170reward:171 type: dense172 description: >173 Valid placement +0.05 (+0.02 zone bonus).174 Invalid placement −0.05 to −0.10.175 Final reward includes grader score.176 range: [-0.1, 1.1]177 178# ---------------------------------------------------------------------179# INFERENCE180# ---------------------------------------------------------------------181 182inference:183 script: inference.py184 runtime_limit_minutes: 20185 required_env_vars:186 - API_BASE_URL187 - MODEL_NAME188 - HF_TOKEN189 llm_client: openai