Project 3: Flower Garden

You are planting your flower garden, and have a choice of three species to choose from: Rhododendrons, Geraniums and Begonias. Within each species, there are different varieties of the species available, each with slightly different characteristics. Your goal will be to place a selection of plants from among available varieties within your 16m by 10m garden to optimize certain criteria, detailed later.

You will be placing plants by specifying locations for them, i.e., an (x,y) point within the garden for each plant. Each plant variety v has a root radius rv, which can be 1, 2, or 3 meters. No plant of variety v can be placed less that rv meters from any other plant. Two plants of different species are said to interact if their root systems overlap, which happens when the distance between the two plants is less than r1+r2, where r1 and r2 are the root radii of the two plants. It is fine if the root radius extends beyond the walls of your garden.

There are three micronutrients that all three plant types require for growth, which we'll call ``R'', ``G'' and ``B''. Rhododendrons can synthesize R, but this process consumes some G and B. Similarly, Geraniums can synthesize G while consuming some R and B, and Begonias can synthesize B while consuming some R and G. Fortunately for you, all varieties produces a net increase of total micronutrients, i.e., the amount produced exceeds the total amount consumed. Thus each plant variety v can be specified by (a) its species sv, (b) rv, and (c) a vector (R,G,B) of micronutrient coefficients with the following constraints:

Plants of variety v have the capacity to store a small reservoir of size 10rv of each micronutrient. Once a reservoir capacity is reached, no additional micronutrient of that type can be received in exchange or produced.

When plants of different species interact, they have the opportunity to exchange micronutrients. During an exchange, a plant will give away only the micronutrient it generates, and even then it will only offer one quarter of its current inventory of that micronutrient. So if a variety of rhododendron currently has 16 units of R, it will offer exactly 4 units total, split evenly among all interaction partners. If two interacting plants provide micronutrients for exchange, then the exchange goes ahead at the level of the minimum of the two offered quantities. Thus if plant 1 offers 1.2 units and plant 2 offers 2.3 units, then only 1.2 units of the two corresponding micronutrients are exchanged between the plants.

Plants grow when there are sufficient micronutrients. When the inventory of each micronutrient is at least 2rv, a plant will consume exactly rv units of each micronutrient to grow by rv size units. Once a plant reaches 100rv2 size units, it has reached full size and will no longer grow. Nevertheless, it will continue to produce and exchange micronutrients.

Once plants have been placed, the simulation proceeds as follows:

  1. Daytime: Plants produce micronutrients if possible. The inventories are adjusted according to the (R,G,B) increments for the particular plant variety, as long as no inventories would become negative.
  2. Evening: Plants exchange micronutrients according to the exchange protocol described above.
  3. Overnight: If there are sufficient micronutrients, plants grow.
At the initial time of placement, we'll assume that the plants have been exposed to fertilizer at the plant store, and that their reservoirs of each micronutrient are half full.

The trace of a simulation will be a sequence g1,g2,... where gt is the total plant growth at turn t across the whole garden. Some potential metrics for your solution include:

Some metric qualifiers that might make each of the above metrics more challenging include:

As the gardener, you will have decisions to make about the plants to plant, and where to plant them. Once those decisions are made, you just sit back and watch what happens. We will place a CPU time limit of one minute on the selection and placement process. (The value of this limit could be adjusted depending on class discussions.) The time limit prevents you from simply running billions of brute-force simulations. There is no intrinsic limit on the number of plants you can plant, but the root radius constraints imply a finite capacity. (Exercise: What would that capacity be if all plants had root radius 1?) The list of available plant varieties at the nursery is a parameter of the simulations. You may assume that there is at least one variety of each species available. Early in the project we'll ask groups to come up with sets of available species that they think will be interesting to explore. The simulator will also be able to generate randomly seeded sets of available species.

Since gardening is subjective, you can choose the metric among those listed above, according to your preference, and optimize your code accordingly. We'll run a variety of tournaments at the end of the project to cover as many of your chosen metrics as possible.

Ken Ross 2025-09-05