Simulating Mycelial Growth and Nutrient Dynamics in a Virtual Ecosystem

Simulating Mycelial Growth and Nutrient Dynamics in a Virtual Ecosystem
Photo by Trent Pickering / Unsplash

I have always been captivated by fungi. Not only that their fruiting bodies are one of my favourite to eat, the underground mycelium activity, their movements, their symbiotic relationships with trees fascinated me. If you are interested in learning more about fungi, Entangled Life: How Fungi Make Our Worlds, Change Our Minds & Shape Our Futures by Merlin Sheldrake is a great start.

In this project, we dive into the fascinating world of fungal networks, recreating the behaviour of a mycelium—the hidden, sprawling underground network of fungi—within a virtual environment. Through this model, we explore how mycelial growth responds to environmental conditions, nutrient availability, and obstacles in its path, offering a glimpse into the complex dynamics of these natural systems.

0:00
/0:58

Visualization

  • Moisture: Blue patches represent areas with high moisture, guiding hyphae growth.
  • Hyphae Trails: Green trails show areas where hyphae have grown, with intensity increasing based on liveliness.
  • Nutrients: Yellow dots represent nutrients in the environment, which hyphae absorb for energy.
  • Obstacles: Gray blocks serve as barriers that hyphae must navigate around.

This simulation represents a digital ecosystem where hyphae, the thread-like structures that make up a mycelium, grow and adapt to their surroundings. The model includes:

  • Moisture Distribution: Blue Patches in the environment have varying levels of moisture, which influence where hyphae thrive.
  • Nutrient Absorption: Nutrients (yellow circles) are scattered throughout the environment, and hyphae must absorb these to sustain their growth.
  • Obstacles: Grey squares that stationary barriers represent physical obstructions like rocks or compacted soil that hyphae must navigate around.
  • Branching and Energy Dynamics: Hyphae branch out and expand, but their growth is constrained by energy and environmental conditions.

Key Features of the Model

  1. Hyphae Growth

Hyphae are the core agents of this simulation. They start at the bottom of the environment and grow upwards, seeking areas with high moisture and available nutrients. Each hypha moves step by step, marking its path with a green trail to show areas it has traversed. This trail represents the buildup of liveliness, a measure of fungal activity on each patch.

  1. Moisture as a Growth Driver

The patches in the environment have randomly distributed moisture levels, visualized as a gradient of blue. Hyphae preferentially grow toward patches with higher moisture, which supports their survival and branching.

  1. Nutrient Absorption

Yellow nutrients are scattered across the environment, simulating organic material in the soil. As hyphae move, they absorb nearby nutrients within their radius. Each absorbed nutrient replenishes the hypha’s energy, allowing it to continue growing and branching.

  1. Branching Behavior

Branching is an essential aspect of fungal networks, allowing them to explore their environment more effectively. In this simulation, hyphae occasionally branch into new directions based on environmental factors like moisture and liveliness. However, branching is controlled by:

  • The energy level of the parent hypha (only energetic hyphae can branch).
  • Random probabilities to prevent excessive growth.
  • A global cap on the total number of hyphae to maintain performance.
  1. Obstacles

Gray obstacles scattered across the environment represent physical barriers. These prevent hyphae from moving directly forward, forcing them to wiggle around or branch in other directions. Obstacles introduce strategic challenges, adding complexity to the simulation.


Simulation Parameters

  1. Moisture: Each patch has a moisture value between 0 and 100, influencing hyphae behavior.
  2. Energy: Each hypha starts with a fixed amount of energy, which decreases with movement. Energy can be replenished by absorbing nutrients.
  3. Branching Probability: Hyphae have a small chance of branching with every step, ensuring organic and non-linear growth patterns.
  4. Obstacles: These act as immovable barriers, redirecting hyphae paths and shaping the overall network.

Insights and Applications

This model highlights the intricate interplay between environmental factors and fungal growth. It showcases how fungi adapt to limited resources, navigate physical challenges, and create efficient networks. The simulation can be used for:

  • Educational Purposes: Teaching about fungal ecology and mycelial networks.
  • Environmental Modeling: Exploring nutrient cycles and the role of fungi in ecosystems.
  • Algorithm Design: Inspiring decentralized algorithms for network optimization, robotics, or distributed computing.