How Guilds Are Built
For every plant in our library, Olier pre-computes a guild — four companion plants chosen to make it healthier, more resilient, and better for the ecosystem around it. This page explains the algorithm behind those recommendations.
No black boxes. Here’s exactly how every guild is assembled.
A — What’s in a Guild
A guild is a team of five plants that look after each other. You pick the one you want to grow — the anchor. The algorithm then finds four companions that bring something your anchor is missing: pest protection, soil nutrients, pollinator appeal, or structural variety.
Two ground rules
Before anything else, every guild must pass two checks:
Include a nitrogen fixer
At least one companion must be a legume (peas, beans, clover, wisteria) or similar plant that pulls nitrogen from the air into the soil — a built-in fertiliser for the whole guild.
Mix plant shapes
The guild needs at least three different growth forms — say a tree, a shrub, and a groundcover. Different heights and shapes create layers of habitat, like floors in an apartment building.
B — Five Ways to Be a Good Neighbour
Every candidate companion is judged on five qualities. The algorithm doesn’t weigh them equally — it pays most attention to whatever the guild needs most. If pest protection is already strong but pollinator support is weak, pollinator plants get priority.
C — How Related Are Your Plants?
Plants that are closely related tend to share the same pests and diseases. An apple tree and a pear tree are cousins — a fungal blight that strikes one can readily infect the other. But pair that apple with a pine, a fern, or a grass, and the pathogen has nowhere to jump: their leaves, chemistry, and evolutionary history are too different for the same disease to cross over.
We measure this with evolutionary distance — how many millions of years ago two plant families last shared a common ancestor. The further apart, the safer the pairing. Here’s how common plant families relate to the legume family (your guild’s nitrogen fixer):
Pest-sharing risk estimated from Gilbert & Webb (2007). Distances from our 39,000-plant evolutionary tree, verified against the APG IV plant classification (2016).
Most garden plants fall in the middle tiers — daisies, mints, tomatoes, maples. Within those tiers, disease risk only drops a few percent. The real jump comes when you add a grass, a bulb, or especially a conifer or fern — plants from a completely different branch of life.
D — The “Dream Team” for Diversity
If pest protection were the only thing that mattered, the algorithm would pick the most distantly related families it can find. Here are the four combos that maximise evolutionary spread — the theoretical ceiling:
No real guild looks like this. A pine + fern + grass garden might ace pest protection, but it won’t feed pollinators or build rich soil. The algorithm balances all five qualities, so the final result is always a practical compromise — not a theoretical ideal.
E — How It Picks Each Plant
The algorithm adds one companion at a time, always choosing the best available option before moving to the next slot. It’s fast — the whole process takes milliseconds.
Start with your anchor
The algorithm looks at what your anchor already brings to the table: its family, shape, root partnerships, which predators it shelters, and when it flowers.
Spot what’s missing
Each of the five qualities gets a gap score — how far it is from “good enough.” The bigger the gap, the more the algorithm prioritises it. If your anchor already attracts pollinators but offers no pest protection, pest protection gets the spotlight.
Audition every candidate
For each plant in the library, the algorithm asks: “How much would adding you improve the guild’s weakest areas?” The answer is a single score that balances all five qualities:
Pick the winner, repeat
The top-scoring plant joins the guild. The gaps are recalculated — what the guild needs has changed — and Steps 2–4 repeat until all four companion slots are filled.
F — What the Scores Mean
Each metric is scored from 0% to 100%, based on how your guild compares to the full range we see across thousands of real plant combinations. Here’s a concrete example for pest protection (M1):
~10%
M1 score
All flowering plants
e.g. daisy + mint + rose
~60%
M1 score
Add one conifer or fern
e.g. swap rose for pine
Just swapping one plant from a distant branch of life makes a dramatic difference.
A guild doesn’t need 100% on everything. A guild scoring 40% on pest protection but 80% on soil health and pollinators may be stronger in practice than one that chases maximum diversity at the expense of everything else. The algorithm finds the best overall balance.
G — Three Guilds per Plant
Every plant in our library doesn’t get just one guild — it gets three, one for each role it might play in your garden. The algorithm detects the role automatically from the plant’s height and growth form.
Canopy guild — tall trees & palms over 10 m
When your anchor is a large tree, its companions will be living beneath it. Only shade-tolerant plants (Ellenberg light value ≤ 7.47) are considered — species that thrive with filtered sun rather than full exposure. This ensures the guild stays liveable under a closed canopy.
Sub-canopy guild — small trees, shrubs & climbers
For trees up to 10 m, shrubs, climbers, and bamboos, companions are chosen purely on ecological fit — no light filter applied. The mix of light and partial shade at this layer suits a wide range of plants.
Ground layer guild — herbs, geophytes, ferns & grasses
Ground-layer anchors — perennials, bulbs, ferns, and lawn grasses — have companions selected on all five ecological metrics with no light restriction. Every candidate in the library competes on equal footing.
All three guild variants are pre-computed for every anchor plant in our library. When you open a plant page, Olier already knows which guild fits your garden best — no waiting.