
Wildlife corridors and habitat connectivity.
The Night Visitors
In a village surrounded by tea gardens in upper Assam, the elephants came every October. They arrived at night — a herd of fifteen or twenty, silent as shadows despite their size — and walked through the village on their way from the hills to the river. They had been walking this path for longer than the village had existed. Longer than the tea gardens. Longer than anyone’s memory.
But the village had grown. New houses stood where forest used to be. Fences crossed the old path. And every October, the elephants and the villagers had the same terrible argument: the elephants wanted to walk through, and the villagers wanted them to go around.
The elephants always won, because elephants are not the kind of creatures you can redirect with a fence. They walked through the fences. They walked through the gardens. Once, a young bull walked through Horen Deka’s kitchen wall.
The Girl Who Watched
Mrinmoyee was eleven, and she was the only person in the village who wasn’t angry at the elephants. She was fascinated by them. She sat on her rooftop every October night and watched them pass — the old matriarch leading, the mothers flanking the calves, the young bulls bringing up the rear.
“They’re not trying to destroy anything,” she told her father. “They’re just walking home. We built our village on their road.”
“Their road was here first,” her father admitted. “But so is our house now. What do we do?”
Mrinmoyee thought about this for a long time. She visited the forest range officer. She read about elephant corridors in a library book. She talked to the tea garden manager, who had his own elephant problems. And slowly, an idea formed.
The Corridor
“We don’t need to stop them or redirect them,” Mrinmoyee told the village meeting. “We need to give them back their road. A corridor — a strip of land through the village that nobody builds on, nobody fences, nobody blocks. The elephants walk through it every year, and we stay out of their way.”
“That means giving up land,” said Horen Deka, who was still upset about his kitchen wall.
“That means keeping your next kitchen wall,” said Mrinmoyee.
The argument went back and forth. Some villagers agreed immediately. Others resisted. But the forest department offered support — solar-powered fences along the corridor edges to guide the elephants and keep them on the path, and compensation for anyone whose land was included in the corridor.
By September, the corridor was ready: a fifty-metre-wide strip running from the tea garden’s edge to the river, lined with gentle fences and marked with signs that said, in Assamese: Hathi Bidhi — Elephant Path.
The First Walk
October came. The village held its breath.
At midnight, Mrinmoyee sat on her rooftop and saw them — dark shapes moving through the tea bushes, silent and enormous. The matriarch reached the corridor entrance, paused, and lifted her trunk to smell the air. Then she stepped onto the path.
The herd followed. Fifteen elephants, walking single file through the corridor, their great feet padding softly on the cleared earth. They didn’t touch a single house. They didn’t break a single fence. They walked the path that had been given back to them, and they walked it with a dignity that made Mrinmoyee’s eyes fill with tears.
The matriarch paused at the river end of the corridor and turned her head back toward the village. Mrinmoyee could have sworn the old elephant nodded. Then the herd disappeared into the darkness by the river.
Two Communities, One Path
The corridor worked. Year after year, the elephants came in October and walked through peacefully. No more broken walls. No more trampled gardens. No more frightened children or angry farmers.
But something unexpected happened too. The corridor, left unfarmed and unfenced, became a strip of wild forest in the middle of the village. Trees grew. Birds nested. Wildflowers bloomed. The children used it as a nature trail during the months when the elephants were away. Birdwatchers came from Guwahati to see the species that had returned.
The village discovered what Mrinmoyee had known all along: sharing space with elephants didn’t mean losing something. It meant gaining a neighbour — a very large, very old, very wise neighbour who had been walking this land since before humans arrived.
“The elephants were here first,” Mrinmoyee told the younger children, who now gathered on her rooftop every October to watch the herd pass. “We didn’t give them a corridor. We gave them back what was already theirs. And they gave us something in return — a forest, right in the middle of our village, for free.”
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
# Model habitat connectivity: can elephants reach water?
import numpy as np
# Land-use grid: 0=forest, 1=farm, 2=road, 3=village
landscape = np.array([
[0, 0, 1, 1, 3, 1, 0],
[0, 0, 1, 2, 2, 1, 0],
[1, 0, 0, 1, 1, 0, 0],
[1, 1, 0, 0, 1, 1, 1],
[3, 1, 1, 0, 0, 0, 0],
])
# Movement cost: forest=1, farm=3, road=10, village=99
cost_map = {0: 1, 1: 3, 2: 10, 3: 99}
costs = np.vectorize(cost_map.get)(landscape)
print("Movement cost grid:")
print(costs)
print(f"Cheapest column path: {costs.min(axis=0).sum()}")
# Can you find the least-cost corridor from top to bottom?This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Design a Wildlife Corridor Using Map Data.
By Level 4, enrolled students build: Design a Wildlife Corridor Using Map Data
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.
Wildlife corridors and habitat connectivity.
The big idea: "The Elephant Corridor" teaches us about Wildlife Corridors — and you don't need to write a single line of code to understand it.
An elephant corridor is a strip of habitat connecting two larger habitat patches, allowing elephants to move between them. Without corridors, habitat becomes fragmented — isolated patches surrounded by farmland, roads, or settlements. Fragmentation is one of the greatest threats to large mammals because it blocks access to resources (food, water, mates) that exist in different patches at different times of year.
Asian elephants in Assam need about 20–30 square kilometres of habitat per individual and travel 10–50 km per day. A single forest patch, no matter how well-protected, is often too small to support a viable population. Corridors allow elephants to access seasonal food sources, reach water during dry periods, and — critically — exchange genes with elephants in other patches, preventing the genetic deterioration that comes from inbreeding in small, isolated populations.
India has identified 101 elephant corridors, and many are just a few hundred metres wide — thin threads of forest or agricultural land that elephants traverse, often at night. If even one corridor is severed by a highway or housing development, the populations on either side become permanently isolated. Conservation biology treats corridors as critical infrastructure, analogous to bridges in a road network — lose one bridge and entire regions become disconnected.
Key idea: Habitat corridors connect isolated patches, allowing elephants to access seasonal resources and exchange genes — losing a single narrow corridor can permanently isolate entire populations.
A metapopulation is a "population of populations" — a set of spatially separated groups of the same species that are linked by occasional migration. The key insight, formalized by ecologist Richard Levins in 1969, is that individual populations may frequently go locally extinct, but the metapopulation survives as long as recolonization from other patches keeps pace with extinction.
Think of it as a game of whack-a-mole in reverse: individual patches blink on and off (colonization and extinction), but the species persists regionally because there are always some occupied patches sending out migrants. The mathematics require that the colonization rate (dependent on corridor quality and distance between patches) exceeds the extinction rate (dependent on patch size and quality). Destroy corridors, and colonization drops to zero — now every local extinction is permanent.
Elephant populations in Northeast India function as a metapopulation. Forest patches in Kaziranga, Manas, Nameri, and surrounding reserves each hold sub-populations. Elephants moving through corridors link these into a functional whole. Metapopulation models help conservationists prioritize which corridors to protect: the ones that connect the most patches and maintain the highest colonization rates have the greatest impact on long-term survival.
Key idea: A metapopulation survives because migration between patches allows recolonization after local extinctions — corridors are the lifelines that keep the colonization rate above the extinction rate.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
**Human-wildlife conflict** occurs when the needs of wildlife and humans overlap in space and time. Elephant corridors increasingly pass through agric...