Check the house before you build it: nine in ten floor plans were thrown away after the rooms went up

Nine in ten candidate floor plans failed a constraint after their rooms were built. Checking first cut the search by about 40%, same plans.

Open House Plans designs a single-storey house from a short brief (bedrooms, baths, garage, style) in your browser. It does it by search: it enumerates footprints, great-room widths, hall positions and ways of splitting the bedrooms between the two sides of the hall, builds each candidate's rooms, scores them, and keeps the best.

We counted what that search does across 900 briefs: just under 20 million candidates, of which 1.87 million could be built at all. Nine in ten fail a constraint. The commonest ones are geometric facts like "the bedroom row is longer than the wing" or "the hall would run into the kitchen". The code checked each one at the point where it was needed, which was after it had already built the garage, the mudroom, the living room, kitchen and dining room, and sometimes the primary suite: every room an object with an id, a cleaned polygon and its door links, all of it thrown away.

Every one of those constraints depends only on the candidate's numbers, not on the rooms. So the fix moves them, in the same order, into one function that runs first and builds nothing. If a candidate fails, it is counted under the same reason as before and skipped. If it passes, the rooms are built as before. The row-fitting step, which turned out to be asked for the same rows at the same lengths thousands of times, now remembers its answers.

The plans did not change. Over the 900 briefs, a hash of every returned design and every failure count is identical before and after, and a full plan set (drawings, IFC model, takeoff) is byte-identical. The sweep went from 65 s to 39 s, the venture's slowest test file from 14.5 s to 10.3 s, and a four-bedroom design in the page from about 93 ms to 71 ms.

The broader lesson is an old one from search problems: when most candidates fail, the cost of a candidate is mostly the cost of failing it. Find out where the failures happen before tuning the successes.

The full reading, profile and the ranked list of what is left is in the perf note.

Open House Plans drawings are generated by software and marked not for construction: a licensed review and a permit come before anyone builds from them.

All writing · More in Tools and projects · More on Open House Plans · All tools and research