Feature Update
March 1, 2023

KOPE: optimisation for everyone

by Radu Gidei
Example H2

Intro

A few months ago now, matterlab co-founder Mark Thorley publicly presented KOPE.ai for the first time, at the Connect conference organised by our friends at Speckle.

One hour was simply not enough to cover the context, motivations and journey behind KOPE.ai as well as demo all the technical capabilities of the new platform, so we'll be writing short posts to highlight some of these innovations.

We'll start off with my personal favourite : multi-objective optimisation (MOO) for everyone!

MOO you know and love

MOO stands for Multi-Objective Optimization. It's an algorithm that uses an evolutionary solver to optimise outcomes for different objectives at once.

There's a good description of what optimisation is all about in the Generative Design for Revit Primer we wrote in collaboration with Autodesk a while back. For any Daniel Shiffman fans in the audience, a brilliant series on GAs and how they work can be found in Chapter 9 of Nature of Code.

If you've tinkered with Grasshopper, Dynamo, Processing etc for a computational design task, chances are you've used one of the very popular packages that enables optimisation in these apps: packages like Galapagos/Octopus/etc in Grasshopper or Refinery/Optimo in Dynamo. These highly popular packages might be described as genetic/evolutionary solvers, single/multi objective optimisation frameworks or a few other technical terms, but at a high-level they all enable you to do the same things :

- describe one or more measurable goals you want to achieve
- evaluate a result against those goals
- randomise/evolve the inputs to your process
- repeat until your results get as close as possible to your goals

Optimisation in KOPE largely has feature parity with these tools and works much the same way conceptually - with some very important distinctions & improvements.

Optimisation made accessible

We've worked hard to make the user interface as intuitive as possible, guiding you through setting up an optimisation workflow and helping avoid common issues. The general flow goes something like this: create a new optimisation Workflow, select an Activity to run, then select which inputs KOPE should vary and what your goals are and press Run. It's 1-2-3-go, and all in your browser.

KOPE will then start running your optimisation workflow in the cloud, orchestrating hundreds of runs in parallel over many generations, until it's happy the solutions it's presenting to the user are optimal. Running in the cloud makes this fast and safe for users, in stark contrast to other solutions, whether desktop apps which require you to install special software and learn how to operate it (node spaghetti anyone?), or online ones that might require you to keep your browser window open not to lose data/progress and only go as fast as your internet connection allows.

Getting optimisation right in a complex design space like the built environment can be difficult. But provided you've thought through the inputs and how they meaningfully relate to the design outcomes, KOPE makes it easy to run your optimisations.

Optimisation made easy

In my view, the following technical innovation in KOPE is equally important, as it enables the same great user experience, but for authors of KOPE Activities.

First, let me provide a bit of context on my own experience with computational design tools. Back in 2016, one of the things that inspired me to start coding again was the ZeroTouch (ZT) feature in Dynamo. It wasn't the Revit API, or the fancier UI of Grasshopper or the popularity of Python in those days that attracted me, it was the instant satisfaction of writing some C# code and seeing that appear as a node in Dynamo, without having to use a Dynamo SDK, implement a specific abstract class like in Grasshopper, read lengthy docs or worse, do archaeology to figure out how to use undocumented APIs.

We wanted to make it as easy as ZT for anyone to optimise things in KOPE and believe we've managed that: you can run optimisation on any activity in KOPE, with no need for "special" activities that have been specifically coded for optimisation.

The only requirement for an activity to be eligible for optimisation is that it should have at least one numeric input & one numeric output - math only works with numbers after all.

For people who create the Activities that run on KOPE, it means:

- no special code frameworks that require changes to your code, or interfaces to implement
- no knowledge of chromosomes, genes, mating pools etc required to get started
- no 10 pages of "getting started" docs or math books involved (we read those for you)

Optimisation with multiple objectives

What's more, this isn't simply optimising a single output either, it's full multi-objective optimisation, allowing you to specify multiple goals, often competing with each other. We couldn't find an open-source library that fit our requirements, so we built our own multi-objective framework that is based on the popular NSGA-II research paper, the same algorithm that Refinery uses.

There's further KOPE innovations to talk about here  such as our uniform coverage of input space, returning multiple pareto fronts and others, but we'll leave those for another blog post. Until then, enjoy this preview of our filtering UX, which of course wouldn't be complete without a parallel coordinates plot.

Of course, like with any technology platform, there might be very specific use-cases where you might want complete control of how optimisation runs. For those cases, KOPE Activity authors are free to implement optimisation inside their own code, but for the other 99% of cases, we do the heavy lifting for you.

Optimisation has been live in KOPE since September 2021, enabling our customers to run thousands of "what if" scenarios and come up with solutions that are optimised for their projects. In addition to the better project outcomes, what makes us extremely happy is that now, any KOPE user can achieve this in minutes instead of days/weeks and without any computational or generative design knowledge.

We can't wait to see how our customers build better and faster by leveraging optimisation in KOPE. Have your own ideas? Get in touch!