martedì 29 aprile 2014

Cognitive Path Finding

For decades, players enemies, in all videogames, walked and ran over to take the PC (the avatar of the player) appearing more or less like robots. Any type of NPC (Non Playable Character, that is the character of the game is not run by a player) rarely goes in search of other NPCs or objects. Its innate goal is the player.

His behavior in the game, when it's well done (my experience tells me it’s more rare than imagined at first glance), is permeated by an iron logic. In doing this, the NPC "pretends" to be a person. Thinking to games like "I am alive", "Assassin 's Creed", "Prince of Persia" or other ones in which the player character is able to climb, jump and do other unusual actions, several considerations about the robot-like, or at least unnatural behaviour of the NPCs remind me how far we are from a correct human simulation in video games.

One of the most obvious of those considerations comes when they want to capture or kill the player and, to do that, "decide" not to follow it by climbing (as the player's avatar does). They expect that the player ends his actions climbing to attack him, or try to shoot from a walkable area, when the PC is still performing his jumps or movements on the walls.

Take as reference, for example, in the movie "Prince of Persia, The Sands of Time". During any run, in that film, crowds of guards follow the prince by climbing after him (for what is possible for them!). Apart from the bad figure made ​​by most of them by falling miserably, or when, in any case, can not keep up with him, their behavior is plausible: "I am a king's guard , I can not be put in check by a thief" or, "if I catch him, I’ll receive much money", and so on.

So, why only the PC can escape by jumping from one building to another? Maybe guards are not so in habit to climb as well as the player's avatar does, but they are humans, and humans can climb. It's clear to even the most inexperienced soldiers of the king knows that leaving alone the fugitive climbing the walls of the city, the risk that he escape entering a house or descending on an unreachable path is very high. To have a proper human behaviour by NPC/guardians, they should use the tactics of the pincer: some of them follow the PC by climbing after him, while others try to follow him from the ground to block his way out. Let us not forget, in fact, that guards are part of a trained body, governed by some leaders who also require teamwork.

Fortunately, some of the most used videogame engines are now able to let developers create more complex path findings than in the recent past, but this is not the only problem with NPCs and their simulation of the human behavior.


The fact is that the Path Finding systems adopted by developers are exclusively based upon the logic: A* is one of the most used, and it calculates the best and faster path for let NPCs reach their current destination. Are you really sure that humans (and animals too) have time and the willingness to study the map of the place in which they need to move, lose time to calcule a lot of possible paths and check then which of them is the fastest?

Even during the preparation of a modern battle there is no commander that lose time in trying to calcule the length of each possible path for his soldiers and the find the fastest, in order to tell them which to use.

The Cognitive Path Finding (CPF) differs from the classical approaches that are the basis of the current Science of Artificial Intelligence, as it doesn’t start from pure logic, but from human and animal psychology. It is, therefore, a new way to treat the issue.

The psychology comes toward us saying: in many situations, especially for environments not known in detail, the memory information can be recorded in various forms, and some of them do not have regular contours at all. Some of the information is or will be organized into a single cognitive structure. In these cases, however, rather than look like a real map, our internal representation seems to be more akin to a collage (Tversky, 1993).

CPF is the first model that uses studies made in the field of psychology about the way humans think and act it in a real path searching (path finding). I have carried out studies for several months, to extract, dial the "biologically correct" way to simulate the mental approach used during a real path.

The topic is vast, and it would not be possible to condense all in some articles. In any case, a valid CPF must, at least, take account that the biological beings, including humans:

  • All "reason" almost the same way during the choice of a path or when facing with an unforeseen along the path
  • Humans are not able to record enough information of a route to be able to reproduce, in memory, the same paths in the form of map (unless they are humans and know well the actual map), unless for some reasons, the map is studied for a while (not usual)
  • We do not EVER use to make calculations when choosing a path
  • We rely on our assessments to figure out which path is shorter
  • We often forgot part of the traits paths, or we confuse the sequence
  • We possess a way of evaluating the distances easily influenced by several factors, including our emotional current state.
As in case of Decision-Making systems built on scientific hypotheses (humanities and animals), there is no unique way to implement the CPF. Being also a whole new world for Artificial Intelligence, there is the need for who wants to build up a complete AI model, to avoid taking possible blunders.
I am available for any requests of further information in this regard.

lunedì 28 aprile 2014

Publication of the Academic Paper on the Biological State of Living

I published the Academic Paper called An Artificial Intelligence Model of the Biological State-of-living.  As far as I know, it is the first AI model able to propose a way to simulate the pulses at the base of each biological life.

The study that led me to make this document has its roots in Evolutionary Psychology and Biology.

What is the important news whom follows this pubblication? So far, every trial made by AI scientists to create an artificial intelligence able to simulate human behaviours gone bad. Why? Apart from the ignorance of most of AI scientists of the fact that Intelligence is not made only by Logic, the previous AI models were conveived with a canonical approach that I baptized "Outside analysis".

This kind of way to try to understand how something is made internally most of the time can't bring good results. This is not the place in which to discuss about this issue, and I propose you to read my paper. Anyway, the evolutionary approach revolutionizes the research phase and substitutes the main question "How that thing works" in a deeper "Why that thing works in that way"?

The “Why” question lets you enter deeply into the problem, letting you investigate the “reason” why things we’re observing work in that way. It’s a way of approaching problems of the mind from their source. As we can’t reproduce the human mind physically, the “Why” question lets us build an AI model that simulates human behaviours based on the natural meaning that each of them owns (An Artificial Intelligence Model of the Biological State-of-living, Guarino 2014).

Humans share more than 90% of the DNA in common with chimpanzees. This fact must lead us to think we are not the only species having a mind able to think, to have emotions, etc. This leads us to suppose that if we examine the “evolutionary significance” of life forms, the reason “why” life is as we know it, we’ll have the very base part of the first sentient minds and, equally, of our mind. It’s easier to understand the biological intelligence of a simple life form than to understand ours.

The Biological State-of-living Model (BSM) comes with the assertion that, inside our intelligence, the basic mechanisms are the same in other life forms. In humans, the cognitive modules of our mind (as evolutionary psychology states) are more specialized and powerful than those of other life forms on Earth. Nevertheless, we share all of our basic needs with animals, and most of our behaviours connect with these basic needs (An Artificial Intelligence Model of the Biological State-of-living, Guarino 2014).

What is common among us and all the sentient animals should be more than what is different, speaking about the main mechanisms of mind (with animals that have a mind), and this common nature will bring us to have an Intelligent Agent Model able to not only simulate humans, but even animals.