**3.8 DDCHA**

The Distributed, Data-Centric, Hierarchical Ant algorithm (*DDCHA*) is a combination of a data-centric protocol with ants developed for *WSNs*. To aggregate data, the sensor field is divided into subnets where the biggest distance between nodes is still within communication range. Nodes are location-aware and join a subnet based on their location relative to the sink. In each subnet, a core head and a gateway are chosen with the Distributed Energy-Core Generating Algorithm (DECGA) described in the same paper as follows:

	- If there is no core head in a subnet, then the node with the largest surplus energy becomes the core head.
	- If *p* is neither a core head nor gateway but neighbor with at least one node of a different subnet then *p* becomes a gateway.

The authors prove that this generates an energy-core Ψ in the network graph. **Routing** is done with the *DDCHA* ant algorithm on top of this network structure as follows: initially, all pheromone values are 0. Every core head can be seen as an ant nest (source) which sends forward ants towards the sink of the *WSN*. Forward and backward ants both mark their path with pheromones immediately. Unlike *ARA* (and closer to ant behavior in nature), the ants do not mark the path back to the source/destination but simply drop a fixed amount þΔ of pheromone on the forward path. Ants also do not follow a probabilistic routing table but choose the path with the highest amount of pheromone. If an ant can not move on anymore (i.e., it got caught in a loop) it backtracks its path, decreasing the amount of pheromone by �Δ on the way until it finds a new path. Loop detection is achieved by keeping a forbidden-list of already visited nodes in the ant. Each member node sends its data to the core head first which aggregates the data. The core head then sends the data onto the sink of the *WSN*.
