In this section we assert that the basic ants of Deneubourg et al. already have some implicit capacity to measure local entropy, and introduce a function, which we will call local complexity, which is more explicitly related to local entropy. Basic ants record in memory the presence or absence of an object at the last lattice sites they have visited. From this record they calculate the local density of objects on the lattice. Entropy is related to the density. At either very high or very low density the entropy is low, while at intermediate densities the entropy is high.
Basic ants pick up or put down objects in a probabilistic fashion according to density thresholds.
If the density is very low or high, then the ant is likely to perform the correct action, picking up in regions of low density and putting down in regions of high density. We build upon this insight by engineering ants which have an explicit capacity to sense complexity. Given a local configuration of states, complexity can be estimated in various fashions. We choose a simple method based on a 9-cell neighborhood about the ant's current location. A 9-cell neighborhood in the square lattice has 12 interior faces between cells.