Roomie is a room optimization and visualization toolkit that leverages browser graphics rendering and a simulated annealing algorithm. Roomie is great for trying out new room layouts that are mathematically optimal.
The algorithm was inspired off the paper “Make it Home: Automatic Optimization of Furniture Arrangement” in which furniture room layout are calculated using a relatively simple simulated annealing algorithm. On a high level, the algorithm generates random states / furniture layouts, evaluates them, and returns the best evaluated layout. The two most interesting components to the algorithm are the cooling and the state evaluation function.
The cooling is a variable that decreases over the course of the algorithm. It reduces the variance in the randomness in new states it generates. In other words, the pieces of furniture move less and less over time as the algorithm becomes more certain it has found a good state. In addition, the probability it accepts a new state that is worst is proportional to the cooling factor.
The state evaluation was a particular challenge for us. We tried our best to quantify the pairing of objects (e.g. chairs should go near tables), maximize the amount of accessible space, and penalize overlapping. In the paper there are additional strategies that could be used to improve the layout output.
Overall, though our algorithm is far from perfect it is rather impressive how such a relatively simple algorithm can produce alright output.
Instructions to run locally
// Install Yarn sudo apt-get install npm sudo npm install -g yarn // Start Yarn yarn install yarn start