So called "Intelligente behaviour" can be defined in a pure thermodinamic languaje, using just "entropy". Formulaes look pretty intimidating, but once you get the idea, coding it into a working AI is quite simple.
Fractalizing the same idea takes away entropy calc form the AI and makes it work much better.
In the last post I showed you "motivations", after it I renamed it, on the code and on my mind, to "goals", much shorter and general!
But in this previous video there were only "personal goals".
Each player (or kart) had its own set of motivations, and that is why only orange kart was able to eat the orange sweet drops on the track: only this kart was able to "see" them.
This time I have added "team goals", so a goal is shared by all of the players in the team. Now, if I add a "sweet drops" goal, all the karts will fight to get the sweet drops on the track:
The intelligence at level 5 is quite nice, almost perfect, or may be perfect, but there is something we can't control: the goals.
We never knows what the AI will decide to do to solve the puzzle we present to it, nor we know witch goal, if any, will it follow.
This is quite nice to have something like this, it could react to unespected scenarios as if it were used to them, but it would also be lovely to be able to "drive" the curse of action towards some more mundane goals: domesticate the intelligence and make it follow our likings.
Redefining goals will make this AI suitable for optimizing -in any sense- any system you could define and simulate, in a "intelligent way". Anything. Amazing.
Level 5 of intelligence seems to be reflecting the actual definition of entropy on the original paper, so before going any further, we will write it in pseudo-code and embed on it the example of the kart seen in video 1 entry:
In this video, yellown kart is using "level 3" intelligence so it score an option with N different futures with Ln(N), and it would be ok if all futures were equiprobable, but they aren't.
In the case not all futures are equipropable you have to switch to another, more complex, way of calculating entropy.
When you have N microstates but each one has a different probability of happening, call it P(i), in the instantaneous or "clasical" entropy, we use:
S = Sum. on all possible microstates(P(i)*Ln(P(i)))
Intelligence "Level 3"
Looking back at level 1 and 2 of our AI, you can notice that in both
cases we are scoring each option using just a count of the different
futures we were able to find.
But this is not a real entropy definition! If a macrostate has N possible and equiprobable microstates, then its entropy is not just N, it is:
S = k*Ln(N)
As k is constant, we can forget about it, and so instead of using N to score each option as in the first videos, we now use Ln(N) for the orange kart:
In video 1
we commented on the simpliest way to implement the entropic
intelligence on a kart: count how many different end points you have in
the futures that start by chosing "+5", and compare with the number you
get for choice "-5", then average and take this as your decision. We
will call this "intelligence level 1".
But as simple as it seems, almost every aspect of the AI explained on video
1 can be redefined so the driving of the AI "looks" more natural, as if
the driver were a real driver doing his best.
By the way, chosing a kart simulation as a test-bed for the algortihm as
proven to be a really good choice, as it is very easy to just observe
two kart driving side by side, each one with a different version of the
AI, and tell witch one of them was doing a better job. It wouldn't have
been that easy with another simulation.
So, steeping over video 2 and 3, that just show intelligence level 1 solving different circuits -you can watch them on the "YouTube" link avobe- we jump to video 4, the first one to really level up intelligence to level 2:
Before going any further on the algorithm itself, we will stop for a moment on the real meaning of those "causal entropic forces" the algorithm is based on.
This is a little technical -but quite interesting- and I will try my best on being easy to follow, but feel free to pass on this and focus on the algortihmic-only articles if you want. You will get as much knowledge of the AI as you will need to apply it, but be warned: when it comes to defining your own system, adjusting the params of the AI and polishing the way you measure how better a new situation is compared to a previous one, the understanding of the underlaying physics will give you an extra insight on the proccess and will help you pin-point the weak points on your implementation.
Disclaimer: I am not a physicist, just an oxidized mathematician and a programmer who loves reading about the subject, so please be benevolent when commenting! I just pretended anyone could have a clear picture of the concept itself and the extreme power under the nice sounding word "entropy".
Entropy
Entropy is a very powerful phisical concept, it is behind almost all laws of the classic phisics. It is quite simple in its definition, but almost imposible to directly use in any real world calculation.