An Ant-Based Computer Simulator

Collaboration in nature is often illustrated through the collective behavior of ants. Although entomological studies have shown that certain goals are well-served by this collective behavior, the extent of what such a collaboration can achieve is not immediately clear. We extend past work that has argued that ants are, in principle, able to collectively compute logical circuits, and illustrate through a simulation that indeed such computations can be carried out meaningfully and robustly in situations that involve complex interactions between the ants.


Introduction
Among the central questions in studying the collective workings of agents is to understand the ways in which their interaction can produce behavior that surpasses that of the individuals.Nature offers many prototypical illustrations of this phenomenon: the flocking behavior of birds, the exploration of ants, the synchronized contraction of heart cells, all give an agent-collective the ability to perform some tasks that its individual members are unable to carry out by themselves.
We focus in this work on the collective behavior of ants.That ants work together to achieve certain common goals is, perhaps, unquestioned.It is well known, for instance, that ants can find a short route between their nest and a source of food (Deneubourg et al., 1990), sort the food, their young, and their dead into different piles (Deneubourg et al., 1991), or be recruited for some task when pheromone concentration exceeds some threshold (Bonabeau et al., 1998).What is admittedly harder to pin-point is the extent of the goals that are, in principle, achievable by the modus operandi of ants.
Previous work has investigated this exact question, showing that ant-like behavior is capable of universal computation (Michael, 2009), by proposing a biologically and physically plausible model for ants and pheromone, and establishing -through analysis and experimental results -its sufficiency both for the design of the basic components found in modern digital computers, and for the simulation of a logical inverter, the component that lies at the heart of logic circuits.
This work pushes that earlier investigation to its natural conclusion, by showing that the ideas presented therein can be applied to the simulation of full-fledged circuits.In the process of establishing this claim, we are led to identify and clarify aspects of the original model, and answer questions that become important only in complex multi-gate settings.
To the best of our knowledge, this work is the first attempt to establish the principled capabilities of collective ant-like behavior in such a setting.This is not to suggest that others have not investigated related questions.Ant-Based Clustering (Lumer and Faieta, 1994) and Ant Colony Optimization (Dorigo and Stützle, 2004) techniques are, for instance, inspired by the behavior of ants, and are employed at largescale settings with often remarkable results.Unlike those lines of research, our aim is not to develop ant-inspired techniques that solve particular real-world problems, but rather to investigate the capabilities of ant-like behavior itself.
Perhaps closer in spirit to our investigation are attempts to simulate circuits using nature-inspired substrates, such as proteins within living cells (Knight and Sussman, 1998), or fluids running through narrow corridors (Vestad et al., 2004).Unlike the focus of those works on very simple circuits (necessitated, respectively, by the need to employ different proteins or fluid colors across gates), this work seeks to show that circuits with no predetermined number of gates can be meaningfully considered and simulated, and explicitly sets to address the problems that arise in such complex settings.
The design of multi-agent simulators has also been investigated before (see, e.g., (Minar et al., 1996;Luke et al., 2005;Michael et al., 2010) and references therein).Unlike the generality and the generic visualization of those simulators, our aim here is to demonstrate a particular aspect of the behavior of ants, and to visualize them in a manner that would highlight its specifics.The sufficiency of using other general multi-agent environment simulators for our purposes remains an interesting question for future study.

Ant-Based Computing Basics
We start by briefly reviewing in this section the model of antbased computing that we employ herein (Michael, 2009).
According to this model, then, the environment evolves in discrete time steps.During each time step t, any given  ant behaves as in Figure 1: The ant senses the pheromone in locations R(L C , D C ) reachable from its current location L C and direction D C , and selects to move to a new location among the reachable ones, with the new location L N chosen in a non-linear probabilistic fashion (determined by parameter n) according to its pheromone concentration P(L N ).Before moving, the ant secrets s units of pheromone at its current location L C if it so happens that the concentration of pheromone P(L C ) at L C exceeds (by a margin of ε) some threshold T , whereas this is not the case (by a margin of −ε) for some reachable location.In doing so, the ant helps propagate the high pheromone concentration that it has sensed.
In addition to ant movements, the state of the environment evolves also due to changes in pheromone concentrations: The pheromone concentration P t (L) at location L and timepoint t is determined by the concentration P t−1 (L) at that location and the average concentrations W t−1 (L) at adjacent locations at the preceding time-point t − 1 (with diffusion between locations determined by some rate f ), by its dissipation into the environment with some rate d, and by its increase by ant secretions s t−1 (L) (as dictated by the algorithm in Figure 1) and pumps with time-invariant rate p(L).
Based on this model, an inverter design was proposed: Ants are introduced in the inverter at the Source cell.The pheromone concentration at the Pump-B cell is such that it sufficiently exceeds that at the Sink cell, leading these ants towards the Output cell.Therefore, when ants pass the Input cell at sufficiently low rate, ants pass the Output cell at sufficiently high rate.On the other hand, when ants enter at the Input cell, they head towards the Sink cell where they exit.The pheromone concentration at cell Pump-A is such that arriving ants are made to secret additional pheromone.This increases the pheromone concentration at the Sink cell sufficiently, so it exceeds that at the Pump-B cell, leading the ants that are introduced at the Source cell towards the Sink cell.Therefore, when ants pass the Input cell at sufficiently high rate, ants pass the Output cell at sufficiently low rate.
Simulation results of a single inverter in previous work have shown that it is possible to choose appropriate values for the various parameters of the model so that the inverter behaves as expected.Additional components were proposed and had been used to design larger circuits, although no simulation results were given for them.We direct the reader to the work that introduced the model for more details.
Simulating Full-Fledged Circuits Among the directions for future work in (Michael, 2009), and one of the central goals of this work, is the development of a tool for designing and simulating full-fledged ant-based circuits.Figure 3 presents screen-shots of the resulting tool.
We shall not go into details in describing the tool, other than briefly noting some of its main features.Design: Large design surface with the ability to zoom in and out and a minimap showing the visible area, with the ability to easily place components, copy and paste parts of circuits and save them on disk for later use, and easy selection of the model parameters.Simulation: The simulation speed can be specified (including a single-step mode), cells can be probed and the presence of ants and pheromone can be plotted in real time, and snap-shots of the circuit state can be easily created.
We note that the tool's interface and engine offer certain functionality that is not explicitly mentioned in the original model.Indeed, in the process of developing the tool, it was clear that parts of the original model had to be made more precise, since although they sufficed for the simulation of a single inverter, they did not suffice for full-fledged circuits.
The first model extension was a clear specification of what constitutes a reachable location for an ant at an arbitrary circuit position: an ant can reach any of the three (out of all six) adjacent locations that lie directly or diagonally in front of the ant's current location and given its current direction, and only those among these three that are designated as paths.At the same time, this necessitated a clear treatment of the direction of ants, which now has to be explicitly represented and reasoned with.Accordingly, the design tool allows the placement of ants facing in any of the six possible directions.
Given this natural choice on the movement of ants, we found that the assumption of the original model that ants coming into a merge point necessarily exit from the outgoing path (and never from the other incoming path) was not read- ily realizable.This necessitated the introduction of inter-cell walls to prevent ants from crossing from one cell to another.Such inter-cell walls can be placed on any of the six sides of a cell, and can even work as one-way walls (although this was not found to be necessary for the building of circuits).
Although a bridge component (i.e., a special cell that allows two paths to cross without the two ant flows mixing) was proposed and used in the original model, an explicit implementation was not defined therein.In the present work the bridge components were implemented, allowing, even, more flexibility with three paths crossing simultaneously.
The importance of all the preceding extensions not withstanding, by far the most important extension of the original model, which necessitated both conceptual and certain engineering effort, was the proper treatment of collisions between ants.The original algorithm for the behavior of ants, as presented in Figure 1, treats each ant independently, ignoring the possibility of collisions between ants, as this was already sufficient for the simulation of a single inverter. 1 Multiple approaches for tackling this problem were considered, including allowing multiple ants to occupy the same location (i.e., making paths sufficiently wide), or making all but one ant "disappear" when multiple ants collide and claim the same location.Both solutions were found to have drawbacks that led to their dismissal: The first one would open up the possibility for ants to turn around and start moving backwards in a path, which would not be in line with the assumptions of the original model (Michael, 2009) or of experiments with real ants (Deneubourg et al., 1990).The second one is clearly physically flawed, which would compromise 1 Ants collide within an inverter only when they attempt to reach its sink.Exactly because the collision cell is a sink, ants that claim that cell simultaneously can be simply removed from the system without worrying about any cascade effect to the ants behind them.the biological and physical plausibility that was claimed for the particular model that we consider and employ herein.
A third, and the most natural, choice would be to disallow an ant from moving to a location if at the time of its decision making the location is occupied by some other ant.Unfortunately, due to the discretization of time and the sequential consideration of ants, this solution would cause ants to keep away from preceding ants, leading to the formation of gaps in their flows.We considered this choice to be suboptimal by analogy to cars in a slowly moving traffic: cars flow without large gaps, under the assumption that a car currently occupying the position that another car wishes to claim will itself move away by the time the latter car reaches that position; in those cases that a car fails to move, a trickling effect of cars breaking ensues, causing cars further back in the line to remain still.Based on this analogy we have sought to find an algorithm that would produce a similar-looking behavior.
The solution we ended up adopting and implementing, illustrated in Figure 4, effectively amounts to carefully choosing the order in which ants are considered and moved.Each ant behaves as in the original model (cf. Figure 1), except that instead of moving from location A list E is maintained, comprising (at every single instance within the time step being considered) locations that are simultaneously empty and claimed, so that ants claiming such locations are allowed to move first.An ant's movement from L C to L N prevents other ants from moving to L N , by having location L N removed from list E. At the same time, the movement frees up location L C , which, if claimed by an ant, is included in list E to ensure that it is eventually occupied.execution of the algorithm in Figure 4 eventually terminates.Safety: After each execution, every ant will either move to its claimed location, or will stay at its current location, and no ant will move to a location occupied by another ant.Liveness: After each execution, every location that is claimed by at least one ant, will end up being occupied by an ant.
Proof: All claims follow directly from the algorithm.
Given the proper movement of ants, we then considered whether the interaction of ants with pheromone might conceivably lead to a pheromone flood, that would disable the system if a circuit were to be left for a long period in a particular state (say, where ants were secreting pheromone).Such concerns can be dismissed due to the following result: Theorem 2 (Upper-Bounded Pheromone Concentration) Consider any given circuit and any model parameters such that d > 0. Let p max be the maximum rate at which a pump introduces pheromone.Then, for every location L and every time-point t, it holds that P t (L) ≤ (s + p max )/d.
Proof: By induction it holds that both P t (L) and W t (L) are at most equal to (s + p max ) t−1 i=0 (1 − d) i for every location L. The claim follows by the sum of the geometric series.
A last issue considered was the hysteresis of circuits: the time that elapses between setting the circuit inputs until the circuit output computes the correct result.Indeed, even if one knows what output a circuit is supposed to produce, just observing that the output is correct at some time-point is not an indication that it will not fluctuate in the future.A more proper treatment is to wait for time at least equal to the hysteresis of the circuit before observing the output.
Definition 2.1 (Acyclic Circuit Hysteresis) Consider any given acyclic 2 circuit and any model parameters.For each input-to-output path in the circuit, count the number k of inverters, and the number m of cells that appear in paths outside the inverters.Then, the hysteresis of that path is 2 For cyclic circuits the definition of hysteresis is unclear, since it is possible that a cyclic circuit might not stabilize eventually.
hk + m, where h is the hysteresis of a single inverter (the only computational unit in a circuit).The hysteresis of the entire circuit is the maximum hysteresis of its paths.
The hysteresis h of an inverter was obtained empirically, and the employed empirical setting will be presented later.

Experimental Setting and Results
The development of the simulator just described provides the necessary means to pursue the second main goal of this work: the empirical verification that the model described in the previous sections (along with the proposed modifications) works as expected, and scales up to full-fledged circuits.We present in this section a comprehensive series of experiments and empirical results towards this goal.
Through the developed tool, we have designed various circuits, or parts thereof, and have placed probes on certain cells.Each probe is numbered, and measures at each timepoint both the pheromone concentration at that location, and the presence or absence of an ant.Each of the figures that follows presents the probed circuit along with the locations of its probes, followed by graphs plotting pheromone concentration or (the running average of) ant presence at the locations of each of these probes.We discuss certain specifics of each experimental setting when we present it below.
In the first experiment we investigate one of the most immediate concerns when simulating complex circuits: the fact that the diffusion of pheromone from one inverter could potentially reach, and interfere with the operation of, another inverter.This interference is not unlike what happens in actual electronic circuits when components are close together.
Figure 5 shows a single path equipped with a pheromone pump, whose rate is chosen to equal the highest among those used for the pumps of an inverter.The two graphs present the same information in two different ways.Each line in the first graph presents the pheromone concentration for each of the probed locations, at a particular time-point.In combination with the second graph, it is clear that pheromone concentrations are stable by time-point 100.Hence, no matter how much time one waits, cells that are at distance 4 and above from the pump have essentially zero pheromone concentration.By choice of the pump rate, and assuming that inverters are as presented in Figure 2, perhaps with slightly longer Input and Output paths, we can ensure the non-interference between inverters.Of course, if inverters that employ pumps with other rates were to be used, then longer paths would be needed.In all cases, the inverter designer can include as part of the inverter sufficiently long paths to achieve the needed insulation of the inverter from outside interference.
Other important conclusions also follow from the first experiment.First, the pheromone concentrations do not increase unboundedly, as already established more generally by Theorem 2. Second, the first graph shows that the model of pheromone diffusion considered is plausible, with a peek at the pump location, and rapid decay as one moves away.In the second experiment we confirm the characteristic of ants to follow high pheromone concentrations (cf. Figure 1).
Figure 6 shows a choice point for ants, with each outgoing path containing a pump.The (running average) presence of ants at the two outgoing paths is plotted over time.In the first graph both pheromone pumps are deactivated, and ants are shown to uniformly at random select an outgoing path.One may also note that the sum of outgoing ants is always steady, providing some empirical verification to Theorem 1.
In the second graph both pumps are activated, with the red pump having a fixed rate of 0.100, and the yellow pump's rate ranging from 0.100 to 0.113 across different runs.Only the ants choosing the upper path are plotted over time, for each run.As expected, the higher the difference between the two pump rates, the higher the difference of concentrations at the two outgoing cells of the choice point, and the more likely an ant is to choose to follow the upper path.Our choice of model parameters for the experiments presented herein shows that ants are rather sensitive to small changes of pheromone concentrations.As it follows from the second graph, a 15% increase in pheromone is sufficient to attract all ants towards the higher concentration.We emphasize that this sensitivity is due to the particular model parameters that we have used, and that other choices of the model parameters would have produced less or more sensitive ants.
The reader may note that the behavior of ants is mostly time-invariant.Indeed, for this experiment we have purpose- fully chosen the pump rates to be sufficiently low, so that the pheromone concentrations never increase beyond what would cause ants to secrete even more pheromone, and thus, tilt the choice of all subsequent ants towards one direction.
The next natural point of investigation is whether ants will indeed affect each other in the presence of sufficiently high pheromone concentration.The third experiment illustrates that ants that reach the pump secret additional pheromone, which eventually reaches the choice point and affects the behavior of other ants.Thus, the precise phenomenon that we sought to avoid earlier is what is investigated next.
Figure 7 shows a setting rather similar to the previous experiment.The rates of pumps are now those found in an inverter.Thus, if these two pumps are left to operate for some time, the pheromone concentration around the yellow pump will be sufficiently high to cause ants to be recruited and secrete more pheromone.However, due to diffusion and the distance of the pumps to the choice point, the pheromone concentration at the choice point is not as much high.In fact, it is the case here that the lower exit point of the choice point has more pheromone than the upper exit point, and hence that ants are more likely to follow the lower path.But once the (minority of) ants that choose the upper path reach the yellow pump, they start secreting more pheromone.The extra pheromone diffuses back to the upper exit point of the choice point, making it more likely for ants to choose the upper path, more ants reaching the yellow pump, and so on, leading to a phase shift.The two graphs present exactly this phase shift occurring, with the rapid increase in pheromone concentration.In the first graph ants were introduced from time-point 0 into the system, while in the second graph ants were introduced after pheromone concentrations stabilized.
Returning to the point of testing the working of the employed collision handling algorithm, we investigate a setting where ants collide in merged paths.Although our collision handling algorithm (cf. Figure 4) is fully general and works for any configuration (cf.Theorem 1), we present a simple to understand and quantify experimental setting for its testing.
Figure 8 shows a merging point for ants.Through the use of multiple probes, we are able to count the remaining ants in each incoming path for each time-point, and we plot their number over time, as well as the number of outgoing ants over time.The graph shows that the outgoing path consistently contains ants as long as either incoming path has ants, and then stops containing ants.This, in particular, shows that our collision handling algorithm does not suffer from typical gap-forming problems that arise from the discretetime movement of agents.At the same time, the graph illustrates that no ants "disappear" in the process, and that equal preference is given to ants from either incoming direction.
The four experiments described above establish that the basic functionality of the simulator works as expected.The obvious next experiment, then, is that of reproducing what the earlier work had done: to simulate a single inverter.Figure 9 shows a single inverter implemented with the developed tool.A point at its input and a point at its output are probed.Pheromone concentrations at these two points are those that diffuse from the pumps of the inverter.Ants at the input of the inverter are controlled by the experimenter, by opening and closing the switch near the first probe.The graph shows that the output is affected inversely.The flattening out of pheromone concentrations indicates that no matter how much time the inverter spends in any one state, changing to the other state is performed in a fixed bounded time.
This experiment could provide an indication for the hysteresis h of an inverter, but this critically depends on how one interprets the presence of an output signal (e.g., when even a single ant appears at the output, or when the ant flow is uninterrupted for some time).To obtain a less ambiguous upper bound on h, but also to investigate other aspects of complex circuits, we consider next a sequence of inverters.Figure 10 shows a sequence of inverters, with each one's output feeding into the input of the next one.The input of the first inverter and the output of all inverters (and hence their inputs) are probed.The former is controlled by the experimenter.The graph shows the output of the inverters, where once the input is set to 1, the inverters successively, in a cascade style, flip their outputs in their given order.Once the input is set back to 0, again the cascade effect is observed.
Note that this experimental setting might be more appropriate to measure the hysteresis of an inverter.Instead of comparing a single inverter's input and output, where it is not immediately clear at which point a signal changes from 0 to 1 or from 1 to 0, one may compare an inverter's input to the output of the next inverter.As shown in the graph, the two signals change in parallel, with a time shift of about 50 time units.The distance between the two accounts for the change of the state of two inverters, one from 0 to 1 and one from 1 to 0, and for the delay introduced by the path connecting the two inverters.Taking into account that the two state changes may have different hysteresis, one can still safely use 50 as an upper bound of any state change in an inverter.
As a demonstration that our developed tool scales up, both for design and simulation, we consider next a 2-bit adder.Besides providing evidence that the design and simulation of large circuits is possible, this experiment offers the opportunity to validate our proposed formula for circuit hysteresis (cf.Definition 2.1).One may consider all input-to-output paths in the 2-bit adder, and observe that the longest path in terms of its hysteresis is the one from b0 to c1, with k = 6 inverters and approximately m = 200 cells in paths outside inverters.Using h = 50 as an upper bound for the hysteresis of an inverter, we get that a safe upper bound on the hysteresis of the circuit is 50 • 6 + 200 = 500.Indeed, the circuit computes its result before the upper bound is reached.
As a further demonstration of the functionality of our proposed simulation tool, we consider the case of a memory bit.
Figure 12 shows an SR-latch implementation of a 1-bit memory, via the use of cycles in the circuit.The figure plots the two input signals and the output signal.Initially the output fluctuates, as a result of the cyclic nature of the circuit.After some time, the set signal forces the output to become 1, which remains so even after the set signal is removed.Analogously, once the reset signal is given, the output becomes 0 and remains so even after the reset signal is removed.
Finally, we consider the implementation of an oscillator.
Figure 13 shows a single inverter whose output is fed back as its input.Depending on the length of the output-to-input path, the oscillator exhibits different oscillation frequencies.Oscillators can be used as clocks for the synchronization of other circuits, as needed to build an ant-based computer.

Conclusions
We have presented a tool for designing and simulating antbased computers, and have demonstrated its proper working through an extensive suit of experiments.Although one could argue that the circuits considered herein are small, or trivial, compared to those found in modern computers, the model that we have employed seems to suffer from no inherent limitations in terms of scalability to much larger circuits.Admittedly, it is not our intention to suggest that any particular species of ants behaves in any particular manner in real life.Yet, we believe that the results in this and our earlier work (Michael, 2009) provide for the first time evidence that ants are in principle able to collectively behave as presented herein.We would find entomological field work attempting to corroborate this evidence especially intriguing.
Beyond its presumed biological implications, this work may also find applications in education, offering a gentle and entertaining (game-playing-like) introduction to the notions of mathematical logic, digital circuits, and computers.
In terms of future work, our directions of interest include the design and simulation of much larger circuits, and the parallelization of the collision handling algorithm.Beyond the obvious gain in speed that such a parallelization is expected to offer, there is also the more conceptual benefit of bringing the simulator closer to the distributed and asynchronous behavior of real ants, when they go marching on!
CHOOSEACTION(Current Location LC , Current Direction DC ) 1: Identify the set R(LC , DC ) of locations reachable in one step.2: Sense pheromone P(L) for each L ∈ {LC } ∪ R(LC , DC ).3: If P(LC ) ≥ T + ε and there exists L ∈ R(LC , DC ) s.t.P(L) ≤ T − ε, then secrete s units of pheromone at LC .4: Choose LN ∈ R(LC , DC ) w.p.P(LN ) n / L∈R(L C ,D C ) P(L) n .5: Move to location LN with direction DN defined by LC LN .

Figure 1 :
Figure 1: Algorithm for the behavior of each individual ant.

Figure 3 :
Figure 3: Screen-shots of the design (left) and simulation (right) interfaces of the developed tool.

Figure 4 :
Figure 4: Algorithm for avoiding collisions between antswithout the part dealing with the case of bridge components.

Figure 5 :
Figure 5: Pheromone concentrations over time and distance from a pump.Even after pheromone concentrations stabilize, the pheromone diffusion is bounded close to the pump.

Figure 6 :
Figure6: Ants choosing a path based on pheromone concentrations at the choice point.The more distant the two pheromone concentrations, the more steeply ants choose to move towards the higher pheromone concentration.

Figure 7 :
Figure 7: Ants choosing the upper path, reaching a point of sufficiently high pheromone concentration and secreting additional pheromone, leading to a phase shift in ant behavior.

Figure 8 :
Figure 8: Ants merge into a single path, while avoiding collisions.All ants from the two incoming paths eventually reach the outgoing path, and the incoming paths are given equal preference as sources of ants.No gaps between ants are observed due to the natural handling of collisions.

Figure 10 :
Figure10: A sequence of inverters that stabilize over time, producing a cascade effect.Comparing the input of one inverter to the output of its successor inverter is a clean way to identify an upper bound on the hysteresis of an inverter.

Figure 11 :
Figure11: A two-bid adder with its inputs and the resulting outputs.Given the input 3 (a=11) plus 3 (b=11), the circuit produces the output 6 (c=110).During the computation, the outputs fluctuate before stabilizing to the correct values.

Figure 11
Figure11shows a 2-bit adder, with two 2-bit inputs a and b, and a 3-bit output c computing a + b.The graph shows the presence of ants at the circuit inputs and outputs.After about 400 time units the signals on all output wires stabilize to the correct values, after fluctuating during the computation.Besides providing evidence that the design and simulation of large circuits is possible, this experiment offers the opportunity to validate our proposed formula for circuit hysteresis (cf.Definition 2.1).One may consider all input-to-output paths in the 2-bit adder, and observe that the longest path in terms of its hysteresis is the one from b0 to c1, with k = 6 inverters and approximately m = 200 cells in paths outside inverters.Using h = 50 as an upper bound for the hysteresis of an inverter, we get that a safe upper bound on the hysteresis of the circuit is 50 • 6 + 200 = 500.Indeed, the circuit computes its result before the upper bound is reached.As a further demonstration of the functionality of our proposed simulation tool, we consider the case of a memory bit.Figure12shows an SR-latch implementation of a 1-bit memory, via the use of cycles in the circuit.The figure plots the two input signals and the output signal.Initially the output fluctuates, as a result of the cyclic nature of the circuit.After some time, the set signal forces the output to become 1, which remains so even after the set signal is removed.Analogously, once the reset signal is given, the output becomes 0 and remains so even after the reset signal is removed.Finally, we consider the implementation of an oscillator.Figure13shows a single inverter whose output is fed back as its input.Depending on the length of the output-to-input path, the oscillator exhibits different oscillation frequencies.Oscillators can be used as clocks for the synchronization of other circuits, as needed to build an ant-based computer.

Figure 13 :
Figure12: A single-bit memory circuit.Once it is (re)set, its output remains stable even when the input signal is removed.
Theorem 1 (Termination, Safety, Liveness) Consider any given circuit and any model parameters.Termination: Each COLLISIONHANDLING(Current Environment State SC ) 1: Execute steps 1-4 of algorithm ChooseAction(•,•) for each ant.2: Let C(L) include the locations of all ants claiming location L. 3: Set the new state S N to be the same as the current state SC .4: Populate list E with every location L such that C(L) = ∅, and such that L is not occupied by any ant in the new state S N .5: While E is not empty, remove LN from E, and do: