Integer Gradient for Cellular Automata: Principle and Examples
Abstract
When programming a spatial computing medium such as a cellular automaton, the hop count distance to some set of sources (particles) is an often used information. In particular, we consider the case where the sources themselves are moving. Due to the locality of communication, only an estimation of the distance can be made at each time step, and each location. When no assumption is made on the size of the medium, that distance takes its values in N, which is not desirable, because it does not lead to finite state. This paper shows how to use the modulo operation to project that set of N-fields into a finite set of Z/nZfields. Using the modulo stored at each site, we show that we are still able to compute the local differential of the original field, allowing to manipulate the former as a directional gradient. It allows us to evaluate the direction of the nearest source, provided the sources move at bounded speed, less than one site per time unit. This information can be used to solve several problems of spatial nature. In the particular case of cellular automata, we present two rules using the modulo representation of distance field: Voronoi Diagram and Convex Hull. The two rules applies for moving sources, although at the moment, the convex hull has been implemented only for static sources.