This is a NetLogo implementation of the El Farol model
that I described in the previous videos.
This version is a slightly modified version
of the one that's in the Models Library
and this one you can download from our course materials page.
You can see that there's sliders here for memory size,
that's how many weeks each agent
can remember the attendance,
the number of strategies each agent has,
and the overcrowding threshold.
So let's do Setup,
and we can see that
there's a hundred people
and here's the El Farol bar.
And when we start the model, we'll see people deciding to attend,
or not attend, each week.
So let's start out by setting the memory size to one.
That is we can only remember the previous week,
and the number of strategies to one.
There's only one strategy per agent.
Let's do Setup again,
and then
we'll make the speed a little bit slower,
and Go.
This red line here is the overcrowding threshold of 60.
This is the attendance, over time,
and this is the bar attendance.
And this here shows the percent of days
on which the bar is crowded.
So we can see that
if the memory size is only one
and the number of strategies is one,
things are just terrible.
The bar is always overcrowded.
OK, so let's try
increasing the number of strategies.
Let's see if that helps, at all.
Let's increase it to ten,
and do Setup.
We still only remember one week back.
And now,
we get this big oscillation,
where we go from, the bar goes from, completely crowded
to completely or almost completely uncrowded.
The percent of crowded days is less,
so we have an improvement,
but you'd think that the population
would be able to learn better
what to do.
So let's increase the memory size.
Let's increase it to five.
Do Setup and Go.
And
things are getting a little bit better.
The bar is never completely crowded,
that is a hundred percent of the people going there.
The percent of crowded days is leveling off
at about 48 to 49 percent.
OK
Well what if we increase the,
leave this at ten,
and increase the memory size to ten,
so remember ten times back.
Let's see if that improves things.
OK
So here we're getting a much better result
in terms of the percent of crowded days,
and much closer attendance to
just at the threshold,
which is really what we want.
So somehow
when we have enough strategies
and enough memory
the population as a whole
without communicating,
without, with no communication
among the agents,
can get to a state
where they are very close
to the optimum
where the optimum would be.
Always having a non-overcrowded bar,
but enough people so that it's
right up to the overcrowding threshold
without going over it.
You can see it's getting very close.
The homework assignment will
allow you to experiment with this even further.
Let's recap what the El Farol model is all about.
It assumes bounded rationality
and limited knowledge,
different from the assumptions of traditional economics.
It includes adaptation,
that is, the agents can learn from experience,
using induction,
they observe past attendance values.
They use that to decide what strategy to use
at each time step.
The learning isn't very sophisticated here,
so you can imagine
with even more sophisticated learning,
the population could do even better,
and that's something that
you might want to try
in the homework assignment.
The question was: Does self-organized efficiency,
that is the best situation for all,
emerge under these conditions?
Well, we said the best situation for all
would be if the bar was never overcrowded,
but the maximum number of people, that is 60,
would attend each week.
And we saw that, yes, to some extent,
with a little bit of error,
it does emerge.
This is a proof of principle
that Brian Arthur proposed to show that
you could get such behavior,
without the very unrealistic assumptions
of traditional economics.
In conclusion, the El Farol model
has demonstrated that self-organized
cooperation and efficiency
are possible without the perfect rationality,
complete knowledge and deductive reasoning.