A layered exploration of Passino's (2002) Bacterial Foraging Optimization (BFO) — this tab isolates the cell-to-cell signaling and chemotaxis that drive each individual bacterium. Tab ② extends the same mechanics to 2-D. Tab ③ adds reproduction and elimination-dispersal to complete the full algorithm.
Cell-to-cell communication is implemented with attractants and repellants that diffuse into the surrounding space. Each bacterium emits an attractant Ja (positive Gaussian, above axis) and a repellant Jr (negative Gaussian, below axis). Their sum Jcc creates a ring of preferred separation: short-range repulsion fading to moderate-range attraction. This emergent spacing is BFO's key ecological advantage over algorithms like PSO — bacteria maintain population diversity automatically through mutual repulsion, without a separate crowding or niching mechanism.
Drag the fixed bacteria (●) or the mobile bacterium (◆ m). Enable the nutrient gradient to add an environmental reward Jenv; toggle all mobile to let every bacterium chemotax simultaneously. In all-mobile mode each bacterium navigates its own personal Jtotal (excluding its own self-signal), so the stable configuration is a Nash equilibrium: no individual can improve by moving given the others' positions. Enable all landscapes to see each agent's private Jtotal curve and observe why their peaks differ.