Spaces:
Runtime error
Runtime error
File size: 31,731 Bytes
a03fc9e |
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 |
"""
Test Cases for Layout Evaluation
- 10+ test cases designed for realistic Infinigen capabilities
- Focus on achievable constraints and key features
"""
from typing import List
class TestCase:
"""Production-ready test case"""
def __init__(self, id: str, prompt: str, ground_truth: dict, description: str = ""):
self.id = id
self.prompt = prompt
self.ground_truth = ground_truth
self.description = description
TEST_CASES: List[TestCase] = [
# ======== SIMPLE LAYOUTS (Easy: 85-95%) ========
TestCase(
id="basic_studio_01",
prompt="Create a compact studio apartment (45m² total) with cozy living area (20m²), small kitchen (10m²), and one bathroom (5m²). Minimalist layout.",
description="Most basic layout - should score very high",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "kitchen", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "kitchen"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "LivingRoom", "count": 1, "tolerance": 0},
{"type": "Kitchen", "count": 1, "tolerance": 0},
{"type": "Bathroom", "count": 1, "tolerance": 1}, # 1-2 OK
]
}
}
),
TestCase(
id="one_bedroom_apt_01",
prompt="Design a comfortable one-bedroom apartment (70m² total) with living room (30m²), kitchen (15m²), bedroom (20m²), and bathroom (5m²). Open floor plan with living room adjacent to kitchen.",
description="Classic 1BR layout",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "kitchen", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "kitchen"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 1, "tolerance": 0},
{"type": "LivingRoom", "count": 1, "tolerance": 0},
]
}
}
),
# ======== MEDIUM LAYOUTS (Medium: 80-90%) ========
TestCase(
id="two_bedroom_apt_01",
prompt="Create a spacious two-bedroom apartment (100m² total) with living room (35m²), kitchen (18m²), dining room (15m²), two bedrooms (25m² and 20m²), and two bathrooms. Kitchen should connect to dining room.",
description="Standard 2BR family apartment",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "bedroom_1", "type": "Bedroom", "required": True},
{"id": "bedroom_2", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "kitchen", "to": "dining", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1}, # 2-3 OK
{"type": "Bathroom", "count": 2, "tolerance": 2}, # 2-4 OK
]
}
}
),
TestCase(
id="open_plan_loft_01",
prompt="Design a modern open-plan loft (85m² total) with spacious combined living/dining area (40m²), open kitchen (18m²), one bedroom (22m²) with ensuite bathroom (5m²). Contemporary style.",
description="Modern loft with open concept",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "kitchen", "required": True},
{"from": "bedroom", "to": "bathroom", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "kitchen"], "must_be_adjacent": True},
{"rooms": ["bedroom", "bathroom"], "must_be_adjacent": True},
]
}
}
),
TestCase(
id="family_home_01",
prompt="Create a large family home (140m² total) with living room (40m²), dining room (20m²), kitchen (20m²), three bedrooms (30m², 25m², 20m²), and two bathrooms (8m² each). Kitchen adjacent to dining room.",
description="Family home with multiple bedrooms",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom_1", "type": "Bedroom", "required": True},
{"id": "bedroom_2", "type": "Bedroom", "required": True},
{"id": "bedroom_3", "type": "Bedroom", "required": True},
{"id": "bathroom_1", "type": "Bathroom", "required": True},
{"id": "bathroom_2", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "kitchen", "to": "dining", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 3, "tolerance": 1}, # 3-4 OK
{"type": "Bathroom", "count": 2, "tolerance": 2}, # 2-4 OK
]
}
}
),
TestCase(
id="master_suite_home_01",
prompt="Design a comfortable home (110m² total) with living room (35m²), kitchen (18m²), spacious master bedroom (35m²) with ensuite bathroom (8m²), and one additional bedroom (20m²). Master bedroom must be adjacent to its bathroom.",
description="Home with master suite",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "master_bedroom", "type": "Bedroom", "required": True},
{"id": "master_bath", "type": "Bathroom", "required": True},
{"id": "bedroom_2", "type": "Bedroom", "required": True},
],
"edges": [
{"from": "master_bedroom", "to": "master_bath", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["master_bedroom", "master_bath"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1},
]
}
}
),
# ======== COMPLEX LAYOUTS (Challenging: 75-85%) ========
TestCase(
id="four_bedroom_house_01",
prompt="Create a large family house (180m² total) with spacious living room (45m²), dining room (25m²), kitchen (22m²), four bedrooms (35m², 30m², 25m², 20m²), and three bathrooms (10m², 8m², 6m²). Living room and dining room should be adjacent. Kitchen adjacent to dining room. Traditional family layout.",
description="Large family house",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom_1", "type": "Bedroom", "required": True},
{"id": "bedroom_2", "type": "Bedroom", "required": True},
{"id": "bedroom_3", "type": "Bedroom", "required": True},
{"id": "bedroom_4", "type": "Bedroom", "required": True},
{"id": "bathroom_1", "type": "Bathroom", "required": True},
{"id": "bathroom_2", "type": "Bathroom", "required": True},
{"id": "bathroom_3", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "dining", "required": True},
{"from": "kitchen", "to": "dining", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "dining"], "must_be_adjacent": True},
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 4, "tolerance": 1}, # 4-5 OK
{"type": "Bathroom", "count": 3, "tolerance": 2}, # 3-5 OK
]
}
}
),
TestCase(
id="separated_zones_01",
prompt="Design a modern apartment (95m² total) with separate day and night zones: day zone has living room (35m²) and kitchen (15m²) adjacent to each other, night zone has two bedrooms (25m² and 20m²) and bathroom (8m²). Bedrooms should NOT be adjacent to kitchen. Contemporary functional layout.",
description="Functional separation of spaces",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom_1", "type": "Bedroom", "required": True},
{"id": "bedroom_2", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "kitchen", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "kitchen"], "must_be_adjacent": True},
{"rooms": ["bedroom_1", "kitchen"], "must_be_adjacent": False},
]
}
}
),
TestCase(
id="guest_suite_home_01",
prompt="Create a luxury home (150m² total) with main living areas (living room 40m², kitchen 20m², dining room 20m²), spacious master bedroom (35m²) with bathroom (10m²), and a separate guest suite with bedroom (25m²) and its own bathroom (8m²). Master and guest bedrooms each adjacent to their respective bathrooms.",
description="Home with separated guest suite",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "master_bed", "type": "Bedroom", "required": True},
{"id": "master_bath", "type": "Bathroom", "required": True},
{"id": "guest_bed", "type": "Bedroom", "required": True},
{"id": "guest_bath", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "master_bed", "to": "master_bath", "required": True},
{"from": "guest_bed", "to": "guest_bath", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["master_bed", "master_bath"], "must_be_adjacent": True},
{"rooms": ["guest_bed", "guest_bath"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1},
{"type": "Bathroom", "count": 2, "tolerance": 2},
]
}
}
),
TestCase(
id="dual_master_suite_01",
prompt="Design a luxury apartment (160m² total) with two master bedrooms (40m² and 35m²), each with its own ensuite bathroom (12m² and 10m²). Include spacious living room (45m²), elegant dining room (22m²), and gourmet kitchen (25m²). High-end finishes throughout.",
description="Dual master suite configuration",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "master_1", "type": "Bedroom", "required": True},
{"id": "bath_1", "type": "Bathroom", "required": True},
{"id": "master_2", "type": "Bedroom", "required": True},
{"id": "bath_2", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "master_1", "to": "bath_1", "required": True},
{"from": "master_2", "to": "bath_2", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["master_1", "bath_1"], "must_be_adjacent": True},
{"rooms": ["master_2", "bath_2"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1},
]
}
}
),
# ======== SPECIAL LAYOUTS (Medium-Hard: 75-90%) ========
TestCase(
id="home_office_layout_01",
prompt="Create a work-from-home apartment (90m² total) with living room (30m²), kitchen (15m²), bedroom (25m²), bathroom (6m²), and a dedicated home office room (14m²) for remote work. Modern professional layout.",
description="Work-from-home layout",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
{"id": "office", "type": "HomeOffice", "required": True},
],
"edges": [],
"constraints": {
"room_counts": [
{"type": "HomeOffice", "count": 1, "tolerance": 0},
{"type": "Bedroom", "count": 1, "tolerance": 1},
]
}
}
),
TestCase(
id="balcony_apartment_01",
prompt="Design a modern apartment (80m² total) with living room (32m²), kitchen (14m²), bedroom (22m²), bathroom (6m²), and a balcony (6m²) accessible from living room. Indoor-outdoor living style.",
description="Apartment with outdoor space",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
{"id": "balcony", "type": "Balcony", "required": True},
],
"edges": [
{"from": "living", "to": "balcony", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "balcony"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Balcony", "count": 1, "tolerance": 1},
]
}
}
),
TestCase(
id="compact_efficiency_01",
prompt="Create a highly efficient compact apartment (48m² total) with small living room (18m²), compact galley kitchen (10m²) adjacent to living room, cozy bedroom (15m²), and efficient bathroom (5m²). Maximize every square meter.",
description="Tests compact/minimal space layouts",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "kitchen", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "kitchen"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 1, "tolerance": 0},
{"type": "Bathroom", "count": 1, "tolerance": 1},
],
"max_areas": {
"Kitchen": 12.0, # Compact kitchen
}
}
}
),
TestCase(
id="multigenerational_home_01",
prompt="Design a spacious multigenerational home (200m² total) with main living room (45m²), kitchen (22m²), dining room (20m²), master bedroom (35m²) with bathroom (10m²), two additional bedrooms (25m² each), shared bathroom (8m²), and a separate accessible suite for elderly parents with bedroom (30m²) and bathroom (10m²) adjacent to each other. Three-generation family layout.",
description="Tests complex multi-suite layouts",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "master_bed", "type": "Bedroom", "required": True},
{"id": "master_bath", "type": "Bathroom", "required": True},
{"id": "bedroom2", "type": "Bedroom", "required": True},
{"id": "bedroom3", "type": "Bedroom", "required": True},
{"id": "bathroom2", "type": "Bathroom", "required": True},
{"id": "parent_bed", "type": "Bedroom", "required": True},
{"id": "parent_bath", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "kitchen", "to": "dining", "required": True},
{"from": "master_bed", "to": "master_bath", "required": True},
{"from": "parent_bed", "to": "parent_bath", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 4, "tolerance": 1},
{"type": "Bathroom", "count": 3, "tolerance": 1},
]
}
}
),
TestCase(
id="luxury_penthouse_01",
prompt="Create an ultra-luxury penthouse (220m² total) with expansive living room (60m²), formal dining room (28m²), gourmet kitchen (30m²) adjacent to dining, spacious master bedroom (45m²) with walk-in closet and luxurious ensuite bathroom (15m²), elegant study room (18m²), and comfortable guest bedroom (28m²) with guest bathroom (10m²). Premium materials and high ceilings throughout.",
description="Tests luxury/high-end layouts with special rooms",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "master_bed", "type": "Bedroom", "required": True},
{"id": "master_bath", "type": "Bathroom", "required": True},
{"id": "closet", "type": "Closet", "required": False}, # Optional
{"id": "study", "type": "Office", "required": True},
{"id": "guest_bed", "type": "Bedroom", "required": True},
{"id": "guest_bath", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "dining", "required": True},
{"from": "kitchen", "to": "dining", "required": True},
{"from": "master_bed", "to": "master_bath", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "dining"], "must_be_adjacent": True},
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1},
{"type": "Bathroom", "count": 2, "tolerance": 1},
],
"min_areas": {
"LivingRoom": 20.0, # Spacious living room (18m² typical gets partial credit)
}
}
}
),
TestCase(
id="student_apartment_01",
prompt="Design a budget-friendly student apartment (42m² total) with compact living area (15m² max), small kitchenette (10m² max), small bedroom (15m²), and basic bathroom (5m²). Affordable and functional layout for students.",
description="Tests minimal/basic student housing",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
],
"edges": [],
"constraints": {
"room_counts": [
{"type": "Bedroom", "count": 1, "tolerance": 0},
{"type": "Bathroom", "count": 1, "tolerance": 0},
],
"max_areas": {
"LivingRoom": 20.0, # Compact living area (18m² typical fits)
"Kitchen": 12.0, # Kitchenette (10m² typical fits)
}
}
}
),
TestCase(
id="entertainment_home_01",
prompt="Create an entertainer's home (150m² total) with large open living (40m²) and dining area (22m²) open to each other, spacious gourmet kitchen (25m²) adjacent to dining, dedicated media/theater room (20m²), two bedrooms (25m² each), and two bathrooms (8m² each). Perfect for hosting guests.",
description="Tests entertainment-focused layouts",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "media", "type": "MediaRoom", "required": False}, # May be recognized differently
{"id": "bedroom1", "type": "Bedroom", "required": True},
{"id": "bedroom2", "type": "Bedroom", "required": True},
{"id": "bathroom1", "type": "Bathroom", "required": True},
{"id": "bathroom2", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "dining", "required": True},
{"from": "kitchen", "to": "dining", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1},
{"type": "Bathroom", "count": 2, "tolerance": 1},
],
"min_areas": {
"LivingRoom": 18.0, # Open living area (meets typical size)
"Kitchen": 12.0, # Spacious kitchen (10m² typical gets partial)
}
}
}
),
TestCase(
id="single_floor_accessible_01",
prompt="Design an accessible barrier-free single-floor home (130m² total) with open living (38m²) and dining area (18m²), kitchen (20m²) adjacent to dining, spacious master bedroom (32m²) with accessible ensuite bathroom (10m²), one additional bedroom (25m²), and another accessible bathroom (8m²). Wide hallways and easy navigation for wheelchair access.",
description="Tests accessibility-friendly layouts",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "master_bed", "type": "Bedroom", "required": True},
{"id": "master_bath", "type": "Bathroom", "required": True},
{"id": "bedroom2", "type": "Bedroom", "required": True},
{"id": "bathroom2", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "living", "to": "dining", "required": True},
{"from": "kitchen", "to": "dining", "required": True},
{"from": "master_bed", "to": "master_bath", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["living", "dining"], "must_be_adjacent": True},
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 2, "tolerance": 1},
{"type": "Bathroom", "count": 2, "tolerance": 1},
]
}
}
),
TestCase(
id="work_from_home_layout_01",
prompt="Create a professional work-from-home apartment (92m² total) with living room (30m²), kitchen (15m²), bedroom (24m²), bathroom (7m²), and dedicated home office (16m²) with good sound separation from living areas and bedroom. Quiet workspace prioritized.",
description="Tests home office integration and zoning",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom", "type": "Bedroom", "required": True},
{"id": "bathroom", "type": "Bathroom", "required": True},
{"id": "office", "type": "Office", "required": True},
],
"edges": [],
"constraints": {
"adjacency": [
{"rooms": ["office", "bedroom"], "must_be_adjacent": False}, # Separated
{"rooms": ["office", "kitchen"], "must_be_adjacent": False}, # Separated
],
"room_counts": [
{"type": "Office", "count": 1, "tolerance": 0},
{"type": "Bedroom", "count": 1, "tolerance": 1},
],
"min_areas": {
"Office": 9.0, # Adequate office space
}
}
}
),
TestCase(
id="three_bed_family_townhouse_01",
prompt="Design a three-bedroom family townhouse (145m² total) with living room (40m²), separate dining room (18m²), kitchen (20m²) near dining room, three bedrooms (30m², 25m², 22m²), and two bathrooms (10m² and 7m²). Traditional townhouse layout for growing family.",
description="Tests standard family townhouse layout",
ground_truth={
"nodes": [
{"id": "living", "type": "LivingRoom", "required": True},
{"id": "dining", "type": "DiningRoom", "required": True},
{"id": "kitchen", "type": "Kitchen", "required": True},
{"id": "bedroom1", "type": "Bedroom", "required": True},
{"id": "bedroom2", "type": "Bedroom", "required": True},
{"id": "bedroom3", "type": "Bedroom", "required": True},
{"id": "bathroom1", "type": "Bathroom", "required": True},
{"id": "bathroom2", "type": "Bathroom", "required": True},
],
"edges": [
{"from": "kitchen", "to": "dining", "required": True},
],
"constraints": {
"adjacency": [
{"rooms": ["kitchen", "dining"], "must_be_adjacent": True},
],
"room_counts": [
{"type": "Bedroom", "count": 3, "tolerance": 1},
{"type": "Bathroom", "count": 2, "tolerance": 1},
]
}
}
),
]
def get_test_cases() -> List[TestCase]:
"""Get all production-ready test cases"""
return TEST_CASES
def get_test_case(test_id: str) -> TestCase:
"""Get a specific test case by ID"""
for tc in TEST_CASES:
if tc.id == test_id:
return tc
raise ValueError(f"Test case {test_id} not found")
def print_test_summary():
"""Print summary of test cases"""
print("="*80)
print("TEST CASES - Production Ready")
print("="*80)
print(f"\nTotal: {len(TEST_CASES)} test cases\n")
categories = {
"Simple (85-95%)": ["basic_studio_01", "one_bedroom_apt_01", "student_apartment_01"],
"Medium (80-90%)": ["two_bedroom_apt_01", "open_plan_loft_01", "family_home_01",
"master_suite_home_01", "compact_efficiency_01", "three_bed_family_townhouse_01"],
"Complex (75-85%)": ["four_bedroom_house_01", "separated_zones_01",
"guest_suite_home_01", "dual_master_suite_01", "multigenerational_home_01"],
"Special (75-90%)": ["home_office_layout_01", "balcony_apartment_01", "work_from_home_layout_01",
"luxury_penthouse_01", "entertainment_home_01", "single_floor_accessible_01"],
}
for category, ids in categories.items():
print(f"\n{category}")
print("-"*80)
for test_id in ids:
try:
tc = get_test_case(test_id)
print(f" • {tc.id}")
print(f" {tc.description}")
except ValueError:
print(f" • {test_id} (not found)")
print("\n" + "="*80)
if __name__ == "__main__":
print_test_summary()
|