# Algorithm Theory

## How does the custom core algorithm work?

The custom core algorithm looks at the shape of your corridor, and tries to find natural connecting lines to the facade walls of your building. It also checks to make sure that each apartment has access to a corridor within your circulation core, and is not only connecting to the elevator or stairs.

The algorithm will try to hit the unit sizes and ratio you have requested through out the whole building. There will usually be one apartment "left over/ sacrificed" that is too big or too small, due to the mathematical division of areas. It is up to you as the architect to further edit and refine.

## How does the blank slate (beta) algorithm work?

The generate stairwells from scratch algorithm divides your building up into "buckets" of stairwells and apartments. If you request 3 stairwells, you will have 3 buckets.

Within each of these buckets, the algorithm will try to hit the unit sizes and ratio that you have requested.

## How do the weights / scoring work?

Each iteration is scored for how well it hits certain metrics after inputting "non-negotiable" variables.

Non-negotiables are requirements applied right out of the gate before the scoring takes affect, such as circulation entrance access, minimum width, and stairwell count.

After hitting the non-negotiables, the user can then influence the direction that the algorithm iterates. By changing the weights, the user can tell the algorithm what is important and what is less so. This process can be described as making trade-offs.

For example, if you would like to hit the unit sizes exactly, you can increase that weight, but that may result in a less accurate ratio or slightly worse daylight access.

Scoring with Unit Size prioritized**Iteration A**

Unit size score = 4 (x3 multiplier due to weights) Daylight score = 4

Ratio score = 3
**Total score = 19**

**Iteration B**

Scoring with equal priortization

Unit size score = 3 Daylight score = 6

Ratio score = 5
**Total score = 13**

**Iteration A would be selected due to the priority multiplier.**

Moving all weights to the highest priority is the same as having them all at the lowest- they will be scored equally.

Last updated