House 1
The main floor of a real house, with sizes estimated. Most rooms come out on the right sides, but the house is too square, the laundry is at the wrong end of the kitchen and the carport is walled in.
// A real house, from the sketch in real-floorplans/house-1.png (up is
// north; the street is to the south): the main floor and the basement.
// Sizes are estimates read off the sketch, then every room made a quarter
// bigger (2026-11-27): the plan's rooms were smaller than remembered. The
// arrangement, not the sizes, is what is known.
//
// Every statement here is true of the real house, so the plan this compiles
// to can be compared with the sketch. Where the two differ, the language or
// the solver falls short, not the program: docs/real-houses.md lists how.
house "House 1" {
// The ground falls to the west, so the main floor is at grade on the other
// three sides, and the basement is at grade on the west.
story lower below grade {
at grade west
// The main body of the house: not under the carport, the laundry or the
// storage closet, which stand on the ground.
under bedrooms, great
room bed_b1: bedroom northwest { area ~ 175sqft, door_to rec }
room bed_b2: bedroom southwest { area ~ 190sqft, door_to rec }
room passage: hall west { // between the bedrooms
area ~ 75sqft, door_to rec cased
door west // out to the low ground
}
room rec: living { // the open middle: a second living room
area ~ 975sqft
open_to stairs // the foot of the stair, which opens west
room bath_b: bathroom at northeast { area ~ 75sqft }
}
room storage_b: closet northeast { area ~ 325sqft, door_to rec }
}
story main {
// The west end: bedrooms and baths round a hall.
wing bedrooms west {
room primary: bedroom northwest {
area ~ 300sqft, door_to hall
// As wide as in the sketch: with only an area it was a 5 ft strip
// the primary's whole depth.
room primary_bath: bathroom along east { width >= 7ft }
// Really west of the hall bath, between it and the outside wall, so
// the primary stays a rectangle. `adjacent bath east` says so, but
// is still a conflict: the hall would have to turn in the bath's
// row, with rooms beside both its pieces, and a hall bends only
// round a room in the corner of a strip of its own.
closet at southwest { area ~ 15sqft, door sliding } // by the hall door
}
room bath: bathroom west { area ~ 65sqft, door_to hall }
room bed1: bedroom southwest {
area ~ 145sqft
// In its east wall, past the closet, so the door swings east-west.
door_to hall east
closet at southeast { depth >= 6ft, door sliding } // along the east wall
}
room bed2: bedroom south {
area ~ 175sqft, door_to hall
// It juts out of bed2's north side, so the hall steps round it.
closet along north { area ~ 25sqft }
}
// A hallway, not a room: an L, straight along the bath and the
// primary, with a short leg down to bed1's and bed2's doors (about
// 56 sq ft in the sketch, then a quarter more). Nothing here says it
// bends: it must, to reach them all round bed2's closet.
room hall: hall { area ~ 70sqft, door_to living cased }
}
// The kitchen and living room are one space, with nothing between them.
open great {
room kitchen: kitchen north { area ~ 540sqft }
room living: living south {
area ~ 525sqft
door south // the front door, facing the street
// In its southeast corner, over the basement's. Going down you walk
// south to a landing near the bottom, then turn west into the
// basement. The landing is left halfway, the engine's choice: written
// low (`landing 3 steps up`), the long flight fills the wall the
// carport's door is in, and the solver finds no plan with that door.
stair stairs: lower -> main at southeast { down south then west }
}
}
// The east end.
room laundry: laundry north {
area ~ 120sqft, door_to kitchen
adjacent storage // side by side along the north
door north // to the outdoors
}
room storage: closet northeast unheated { area ~ 150sqft, door_to carport }
// A carport: a garage, so unheated, with no walls on its south and east.
// The cars park facing the door into the house, not beside it.
room carport: garage southeast {
cars 2 from east, door_to living
open south east
}
}
}