okay so here we have the ants moms in
the library by the way it's under
biology
it was so when you set up the model what
it does is it creates an ant colony in
the middle which is where all your
little red ants are on the purple dot
and it creates three food sources around
the model right and then as we released
the ants into the world they go randomly
wandering around right and as they go
randomly wandering around they're trying
to find food right and when they run
into food represented better three piles
they pick it up and they head back to
the nest and while they're heading back
to the nest they drop a pheromone in the
ground indicating that they have
actually found some food and it's
interesting they've actually done a
bunch of different tests about ants to
explore how they're able to do it and a
lot of its used this pheromone based
method right where they dissolve a
chemical into the environment and the
other ants basically follow the gradient
of that chemical toward the food right
and another interesting thing is ants
can apparently wander almost all over
the local environment and they keep
track in many ways of what the closest
way back to their nest is and they will
in fact
reroute around obstacles that are put in
the path of them in very interesting
ways and so anyways we let this go what
you see is that this kind of somewhat
random method of collecting and
consuming food results in very
interesting patterns of behavior first
of all you can run the model as many
times as you want and the ants almost
assuredly always find the nearest food
source first and in slowly
to where they're going and then find the
next food source and their neck then the
farthest food source after that right
and they get some interesting here uses
for their leg kind of all they were all
kind of stuck on top of each other there
for a bit because they all still thought
there was food because that's where the
pheromone had just graduated from right
and they just left away from right and
this happens again and again when you
run the model and it actually turns out
that they did this int
algorithm if you will for finding food
and finding paths when it doesn't go the
best paths it is very optimal in a large
situation so in fact to this day they
still use what they call the ant colony
optimization algorithm for doing things
like planting the fastest way to
traverse a network in computer
networking systems and so this this this
model of behavior is really led to a lot
of interesting patterns now what does
this all have to do with
object-oriented programming and as I
mention it's a bit of a stretch in this
particular case but the important thing
here is the ants have very little
knowledge right they keep track of where
we can't individually keep track of
where the nest is but they don't
actually keep track of where did you go
to get the food or anything like that
right they actually just leave this
pheromone in the ground and that
pheromone influences the decisions of
other ants who then use that the final
food as well this by the way is
something sometimes called a sting
merchant interactions the Stinger G is
the process of communicating with
someone else via the environment and the
ants do this quite successfully in this
particular case and so the reason why I
think this is relevant right it's a
quintessential example of what happens
when you kind of embody
data and functions within an entity
right the is our individual entities
that have their own data their own
knowledge about the world they don't
share that knowledge with anyone else to
raptly brain they share it interesting
feel of the environment right they take
actions with the environment so to that
extent I think it's a really good
example of things like object-oriented
programming and the actor model of
programming in many ways and so I think
it has many of the same kind of
properties that you see in those models
by the way this was a few examples in a
logo that uses an interesting primitive
so I thought I'd mention it real quick
there is a primitive
finding quickly this way that is used in
here called diffuse right and we kind of
talked about the fuse too much except
for talking about environmental
departments interaction what the fuse
does is diffuses as well as a little
faster
right just hue is essentially
takes key variables input and diffuses
your amount to that variable to your
neighbors around you right
and so it's friends your your future and
so what this happening right is that the
cell that the ant drops the pheromone in
it that cell diffuses to in speed
neighbors those eight neighbors been
diffused with little dig out and so
forth and so forth kolima which is zero
right and so it spreads out from this
concentration in the very middle and so
over time the feral in a particular
location is going to decrease but then
the pheromone and surrounding locations
is going to increase a little bit at the
pump
and eventually it's all
you know it's a converse pretty well on
expert so so there's a cool model that
will show you some principles object
oriented some principles of the actor
model and that it also think it's a
classic
agent-based modeling modeling