[MUSIC] As I introduced you at the beginning of this lecture, ants exhibit interesting behavior when they are in presence of dead ants of the same species. They will try to gather them in a single bunch. As you can see in this experiment, after a few hours they already seem to make some pile of corpse, and if you wait enough you will find a single pile. In real ant hills, there are some rooms that are dedicated to piling corpse. Kind of ant cemeteries. And the important question people studying the behavior of social insects is how do they decide where they have to pile corpse? And they are several attempt to try to describe it. This attempt, try to detail the behavior of single ants and then to validate this behavior by having a whole simulation with several ants. I will present you two different approaches and see that at the end. Both are able to solve the problem. The first model is the one of Deneubourg. Deneubourg is a scientist working on ant behavior. I will give you some references the end of the talk. The idea is that in this model every ants, so the ant leaving the regular grid, so they are presented in every sense a kind of Eulerian view. And they can walk in a forward direction. Northeast, southwest, there are no diagonals in that model. And usually, they will do a random walk. It means that at every direction they choose the next direction and they move there. So the walk is purely random. [COUGH] And there, here we use a sequential asynchronous updating scheme. So now, [COUGH] the idea is this one, when a worker finds a dead ant, it has a probability P of p of picking its corpse. If the corpse is isolated or in a small cluster. [COUGH] But, with probability P of d, the worker will deposit a corpse, a load of work of course, in a large cluster of dead bodies. That seem intuitive but the question is how does the ant evaluate the cluster size? Because the ant has really limited perception and these piles can be quite big. So in the Deneubourg approach, we will give every ant memory, M, called M of size n. And the memory represents if the ant have seen corpse in the last n iteration. So if Mi is one. It means that a time, t-i, where t is the current simulation time. They were the ants have seen a corpse and zero otherwise. You can see as a circular buffer, where every iteration ants adds value, depending of the what shift seen. And using this buffer, we can compute this probability quite easily. So first we sum the buffer, so f is a kind of average of, if they were that ants or not is the density of that ants seen at random in last iterations. And with this f we can then compute these two probabilities, Pp and Pd, where k1 and k2 are model parameters. And results are quite interesting. Here you can see the initial condition. Every small green dot is a single dead ant. And if you wait, and wait more, you will see some cluster appearing. And if you wait quite a long time, you would see a single cluster at one direction. So it seems to work, it works quite well. Basic mechanism is intuitive, but it requires lots of intelligence from ants, and we cross them to remember the last ant step [INAUDIBLE] and to compute some probabilities and to draw some number. So is it possible to find something simpler? And simpler approach was proposed by in 2000. And is really simple model. So the idea stiller regular grid, but here the ants have ate the possible direction that improves the diffusion, so the stiller random walk so stiller diffusion process, but since we have a direction the diffusion coefficient is larger. And the thing is still asynchronous. But the model is really really simple. So first of all in that model, in that approach the ants have to avoid all obstacles. They avoid the ant corpse, other working ants, and boundaries and walls. And an unloaded ant will work at random, and as soon as it found the corpse he will load the corpse on his back and continue to move at random. And when unloaded ant finds another corpse, he will always drop the current corpse. It means that model is quite deterministic except for their movements. And so if an ant has only one thing to remember, is it loaded or not? Is it carrying a body. A dead ant, or not. That's the only state. It's a Boolean. And all the rest of the behavior is really simple. So, if we try the same experiment, at first we have ants. And if we wait, we see small cluster appearing and more cluster and more cluster. What is interesting here is that since the ants cannot walk on dead, all of that answers quite astringent of stacking condition closer almost boss. But, we clearly had one final cluster. So the Simpro model works also, but it's interesting to understand why because it's completely at random. The ant you've deformed a corpse that pick it, whether it's already in the cluster or not. And the idea why it works is because there are two phenomena, first of all, if a cluster is completely emptied it will never reappear. Because an ant can drop a body only close to another one. So if a cluster disappear for any reason it will never reappear at this position. The other thing to understand is that the ant have the same probability to remove a corpse for my cluster, or to add a new corpse to my cluster. But they will only interact with the interface of the cluster because they, in that model they cannot work where they want. So the idea is that if they interact on human interface, large cluster have better ratio between the volume interface, so they have less chance of being eaten of disappearing, but a small cluster has more chance of disappearing. And because all the ants, they move at random, there are lots of fluctuation and so every cluster may eventually reach zero size. And the small cluster will reach as your size and average before, it means that, at the end, only one cluster will appear. There are some quantitative result too, we can compare both models. Here is the number of cluster, the logarithmical number of cluster in function of the logarithmic time. So the x axis, the logarithmic time. The y axis is the logarithmic number of cluster has a function of time. And every different color represent a configuration with several ends. So 8 ends, 32 ends, 122 ends, and 512 ends. And you can see the more ends, the faster it gets. There's a first phase and then it drops soon. You can see that's both model managed to arrive to a single cluster. Here the log of 1 being 0. But of course, the more end you have, the faster it is. The Deneubourg model with just one billion of memory, it takes more time because it's more random even if the rules is more deterministic. And what is interesting here is that we don't really have a cooperation effect, the collecting effect because in fact if you double the number of ant, you will roughly it's the same thing as doubling the number of time, or doubling the number of ants is the same thing. So there's no real cooperation between the ants here. A single ant can do it. In a time but it's interesting to see that in both model it will work. And we don't need a lot to explain that. If we look at the final cluster of course, here it's the Deneubourg model but with the direction to speed it. And so the final cluster in the model in is clearly more sparse, because the ants, they won't cross across an existing body. But at the end, it will be a single cluster. What is more interesting now is if we had an obstacle. So here is a kind of U shape, which is a real obstacle that the ant cannot cross. And that's with the initial model, so we can see it's already in a later stage, because we can see so much more cluster but if you wait, you will see that cluster will be more often around the object. And if you wait a little bit more, the cluster will be inside the obstacle. And again, it's because it's an idea of the ratio between surface and volume. Here, is that the surface is really small because here it's protected by the obstacle. So the surface of contact, where ants can destroy the cluster, and brink is really small. So, naturally, it will emerge, the fact that if you have an obstacle it will kind of break the symmetry of all possibilities and you will always see the cluster inside the obstacle. So this obstacle can be any room in an ant hill, for example. So in conclusion, we can explain this corps pile construction just by statistical fluctuation, but of course, if we add some intelligence it can speed the process. And this model show that it's not really a collective effect, it's just a collaboration with a linear speedup. It means that, yeah, the two ants make the work of two ants, not more, which is already great. Another thing that we can ask ourselves is, are the ants marching off to compute probabilities, to draw random numbers, and to remember the concentration of corps that the ants are sim. And the question to answer is, yes, of course. Because, first of all, even computing probability can seem difficult. The ant doesn't need to know arithmetic to do it. Remember that the shells of not to use our other symbols, sea snail for example, have a perfect logarithmic spiral in them. We can dealt to that this kind of animal can do some logarithmic computation. So the ant could intuitively compute these probabilities without noticing it. The fluctuation, the randomness, the random is an element of most molecular biology system when they are not stable and they can change between two states. And the communication of neurotransmitter can explain the kind of memory of the ants. So both model could be real. To distinguish between the two only by logical experiment can impose. But what is interesting is that we can show here that I think that global knowledge is not needed, having a lot of intelligence is not needed. This body will appear quite naturally. To conclude this small model, just an example. So that's an example that I found in the net logo software. It's software that I would recommend to you. That allows you to play with the Edgemont model with a really simple language. I will put in the reference the links. And that's a good example and this one is an example of Moving woodchips is quite similar to the example of ants and symmetry. To the simplest model that I'll show you. The difference here is that's the termites, they can work on woodchips but not on other termites. And the white points are the termites, and the yellow points are woodchips. And if I let the model go, you will see that, so the orange are loaded ants. It's a bit fast, and I can just first slow it a bit to see the movement. You can see that one termite moves every iteration. So it's clearly a asynchronous update. I will put it at normal speed again, it's really fast. You already can see some cluster appearing. And I try to speed it a bit. So now you see if you focus on small clusters, you see that they will disappear faster. And if you wait a long time, just a single cluster will appear. in the center. So, you can open this model if you don't look at logo, along with lots of other interesting agent based models that you can play with parameters, and so it's nice experimentation to do. That's the end of this module, and the last one I will introduce you to the example of chemotaxy in bacterias, again in the agent base molding. [MUSIC]