Chemotaxis
How bacteria find food without brains
Bacteria need to eat, and often, that means they need to get somewhere to find food. But they cannot see, they have no brains, and they are actually too small to even tell whether a tasty something is in front of them or behind them.
Instead, they use a trick based on memory: bacteria such as E. coli just keep swimming, and compare the concentration of food now to the concentration that it was a moment ago.
As Howard Berg put it, they have a nice philosophy of life: if life is getting better, keep going, and if life is getting worse, switch directions.
The new direction, though, is random, so the result is a "biased random walk." Considering the tiny size of most bacterial cells (a thousand of them could easily fit inside many of your human cells), this strategy still works out well overall.
In the simulation below, the orange triangle is chemotaxis-blind — it tumbles randomly with no memory of where it has been. The green oval uses chemotaxis, and you can adjust how sensitive it is.
The Mathematical Model
This version follows the teaching notebook's simple run-and-tumble loop. Bacteria alternate between run and tumble states, and use only one comparison: is concentration improving or worsening at the next step?
Let s be sensitivity (0 to 1, controlled by the slider). We use a run-time bias factor:
bup = 1 + s
bdown = 1 / (1 + s)
if concentration is increasing, use bup; otherwise use bdown
During runs, the countdown to next switch is updated as:
Δtswitch = Δt / b
larger b means longer runs; smaller b means shorter runs
So at max sensitivity, favorable motion makes runs about 2x longer and unfavorable motion makes runs about 2x shorter, matching the notebook logic.
| Sensitivity |
bup |
bdown |
Behavior |
| 0% (blind) |
1 |
1 |
No bias |
| 50% |
1.5 |
0.67 |
Moderate bias |
| 100% (max) |
2 |
0.5 |
Strong bias |
Run and tumble durations are still sampled from exponential distributions, as in the notebook.
The graph below shows the two run-time bias factors versus sensitivity.
Because this model is intentionally simple, it emphasizes the core idea: "if things get better, keep going; if things get worse, reorient sooner."
This is a simplified model. Real E. coli chemotaxis involves a few more bells and whistles. See Segall, Block, and Berg (1986) and Murray (2006).