liveBook · Manning

Positive feedback

As explained in Algorithms Every Programmer Should Know

A reinforcing process in which an outcome strengthens the conditions that produce more of that outcome.

Positive feedback is a reinforcing process: an outcome strengthens the conditions that produce more of that outcome. In Ant Colony Optimization (ACO), successful routes gain pheromones, making them more attractive to later ants. section 8.0 section 8.1

The reinforcement is balanced by evaporation. Ants choose paths probabilistically using pheromone levels and distance; completed tours deposit pheromones on traversed edges, while unused trails fade. Repeated rounds favor efficient routes without requiring an exhaustive search. section 8.1

A tour and a changing network

In a four-node example, an ant’s 60-mile tour raises pheromone on traversed edges from 1 to 2.17, while ignored edges fall to 0.5. In a telecom network, if a fast route slows or fails, its pheromones decline and traffic can shift to a backup route. section 8.1 section 8.2

Figure 8.1 Initializing the graph for Ant Colony Optimization. The left graph shows the physical distances (d) between the Nest and the Crumbs, which determines the heuristic desirability. The right graph shows the baseline digital pheromone weights, initialized to a flat 1 across all paths before the swarm is deployed.

Compare the graph’s physical distances with its initially equal pheromone weights. section 8.1

How Algorithms Every Programmer Should Know covers it

How deep it goes
Traces weighted path selection, pheromone reward, and evaporation through a four-node tour.
Examples
Uses a four-node crumbs tour and a telecom route slowdown to illustrate reinforcement and shifting preferences.
What you can do after
Understand how repeated route success shifts preference and how evaporation lets traffic move to alternatives.
How it connects
Connects Ant Colony Optimization with pheromone evaporation, heuristic desirability, and probabilistic path selection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Algorithms Every Programmer Should Know. The section links point to the parts of the book it draws on.