The persistent expansion of urbanization poses a significant threat to wildlife populations. One under-explored facet of this impact concerns the genetic health of these populations. Genetic diversity, measured by the variation within a gene pool, is crucial for resilience and adaptation. This project utilizes Grashopper-led simulations to explore the dynamics between habitat fragmentation, animal movement, and genetic exchange in urban environments. By focusing on encounter rates between individual animals, the simulation sheds light on how urban development disrupts gene flow and genetic connectivity.


The simulation employs a virtual population of 200 individuals that move through space. To track the impact of encounters on gene flow, one individual is designated a distinct color (red), acting as a representative for a specific genetic variant. By monitoring how many other individuals this “marked” individual encounters within its movement range across the three scenarios, the simulation can display the impact of habitat fragmentation and connectivity on the spread of this variant throughout the population. This approach provides a measurable indicator of how urbanization disrupts gene flow and genetic connectivity within wildlife populations.

The simulation unfolds across three distinct scenarios:

  • Pristine Habitat: This serves as a control, representing an environment untouched by urbanization. Here, expansive natural habitats allow for unrestrained animal movement, fostering free gene flow across populations.
  • Dense Urban Landscape: This scenario depicts a heavily urbanized environment dominated by buildings and roads, creating fragmented green spaces. This fragmentation creates a maze of obstacles that impede animal movement, potentially isolating populations and severely limiting genetic exchange.
  • Wildlife Corridors: This scenario introduces a potential mitigation strategy – designed corridors that reconnect fragmented habitats. These corridors aim to provide safe passage for animals, facilitating gene flow and promoting population resilience in the face of urbanization.

By analyzing encounter rates across these scenarios, the simulation seeks to display the critical role of habitat connectivity in shaping gene flow within urban landscapes. The ultimate goal is to inform conservation efforts and urban planning initiatives. By safeguarding habitat connectivity, we can promote the long-term survival of wildlife populations in an increasingly urbanized world.


Pristine Habitat:

In this scenario, individuals move randomly and unimpeded across the entire area. As expected, the marked individual reaches a high number of others in all quadrants, reflecting unrestricted gene flow.

Urban Landscape:

In this exercise, the number of points was decreased to match the population density of the first simulation. While the marked individual encounters some close neighbors, encounters across roads separating green spaces are entirely absent. This contrast highlights the disruptive impact of fragmentation on gene flow.

Wildlife Corridor:

This scenario reintroduces the previous population size and incorporates corridors reconnecting fragmented habitats. The marked individual’s reach is still lower compared to the pristine scenario, but it now encounters individuals in a larger area, suggesting that corridors partially restore connectivity and promote gene flow.


From this simple exercise, it’s clear that dense urban landscape severely restricts encounters, particularly across fragmented areas. The introduction of wildlife corridors in the final scenario offers a glimmer of hope, suggesting they can partially mitigate the negative effects of fragmentation and promote a more connected population.

It’s important to acknowledge that this simulation is a simplified model. While it provides valuable insights, real-world wildlife populations are influenced by a multitude of factors beyond just movement patterns. Predation, resource availability, and disease all play crucial roles. This study serves primarily as an invitation to explore the potential impact of habitat connectivity on gene flow, highlighting its importance for consideration in conservation and urban planning efforts.