lunedì 29 febbraio 2016

I present myself

Hi all! 
I'm John Guarino, 48, over 25 in the computing world. I reckon to be eclectic, but not by choice, or at least not intentionally.

I sailed a long time in the computer world, before realizing where I would really like to do. 
As often happens, the work does not always coincide (all the time) with the one to which you aspire. 
It happened to me with writing novels, which are appreciated by many of those who have come to know, has happened with the creation of animated video, which several publishers liked and purchased (see Mondadori), or video games on demand. 

It happens even more with Artificial Intelligence, the technological place I care very much. When I was a child, actually when I was six, I realized what I wanted was a small "virtual" living being. I used the trunk 1 Kg box of pasta, I also remember that I used the shoe laces to "simulate" veins. 

Eventually I showed this to my brother (he was twenty), which obviously laughed at my creation. I remember just now my answer: if not today, I'll find the way to let it live. I am sure that the desire to create a virtual being "really living" has remained with me all my life, and I led eleven years ago to study more subjects, after work: Artificial Intelligence, Game Development, "classic" Psychology and  Evolutionary Psychology. 

As a result, I imagined and partly implemented (in Alpha version) a series of models that allow intelligent agents or NPC (Non Playable Characters) to behave like a human or animal with a vey high credibility.

The models affecting the decision management (decision-making), the path finding, the game system optimization (permormance-oriented), an innovative version of the neural network to store memories, the action management system, and more.

The next months for me are very important, because my main project, Phanes (the first virtual mind ever developed so far) will come to life in its alpha version.

martedì 16 dicembre 2014

Introduction to the Continuous/Discrete Model of Emotions (CDE) for Intelligent Agents



This is an article relative to a tricky, very delicate topic. The new frontier of the Artificial Intelligence in Videogames and Simulations goes toward a greater consciousness of the complexity of the human and animal behaviour. So far, very few videogames tried to use advanced AI models for defining the NPC behaviour (NPC stands for Non Playable Characters, that are alla the characters in a videogame not managed by players), and even in those cases, the distance of the results respect to a real human behaviour was higher than we would mention.

Fortunately, in the last years new AI models are appearing thanks to a greater confidence with the psychological studies. The subject of this set of articles is a new proposal for making better Intelligent Agents (used as NPCs for videogames), working on their ability to feel emotions in a similar way to humans and animals. New studies are pointed out the fact that emotions are the main factor of the human cognitive system that current AI systems don't have. This is then the new frontier of the Artificial Intelligence science, and the new videogames (and new human simulations systems) will largely take benefit of them.

This article try to help in making a new point of view about the possible AI models for simulating the psychological models of emotions.


In the last decades several psychologists made up some, different models with which try to reproduce the human (and animal) emotions. They started, often, from different approaches, like the Cognitive Appraisal theory (Lazarus and others, 1970), the anatomical point of view (Damasio A., 1994)(LeDoux J.E., 1996 and 2000),the Bi-Polar Dimension theory (Russell, 1980), the Three-Dimension emotions (Schlosberg, 1954) without mentioning old theories like the James-Lange’s and the Cannon-Bard’s.

Although all these theories come from scientific evidence, there is not a common point of view. There are at least two main approaches completely opposite one each other:
1) Discrete Emotions: the group of theories stating that emotions have to be discrete, differentiated among them by emotional reactions (Lazarus and others, 1970), in the body (excitatory phenomena) (Arnold, 1950) and how they arise (Lazarus and others, 1970).
2) Continuous Emotions: the group of theories stating that emotions can’t be seen as discrete labels (Russell, 1980, Schlosberg, 1952).
Both approaches are able to claim issues for the other one. As remembered by Basile (2012), the discrete emotions approach fails to explain phenomena such as the frequent comorbidity observed between different psychological disorders, nor does it solve the vexed question of the correspondence between emotions and a specific neurophysiological substrate. A criticism has moved for both approaches by anthropologists and scientists who study the differences of perception and reaction to emotions for the different human cultures.

Going in the opposite way respect to the other scientists, Roseman (1996), with his psychological model, shown that appraisal information “can vary continuously, but categorical boundaries determine which emotion will occur”. This is a point in favour of a commune representation of emotions, both continuous and discrete. Scherer (1984a) wanted to affirm that the distinction between continuous and discrete approach should be resolved by placing discrete emotional categories (i.e. happiness, sadness, etc.) while continuous models represent the varieties, styles, and levels of these already defined distinct emotions. Both Roseman’s and Shrerer’s point of view are something like saying that “outside emotions, they are seen as discreet, but inside they work in a continuum space”. This idea reminds me to the great diatribe between the classical physics and the quantic one, where the physical subatomic elements react as particle and/or as a wave.

I think that this point of view, the one with which we consider emotions having two different kinds of natures, one discreet and one continuous, strictly depends on the way with which we use or measure them. I suspect that this solution could be the right one to have better results in the AI implementation of the human and animal behaviours. Indeed, we need to remember that, if there is a continuous space between the level of arousal and the valence (positivity or negativity) for an emotion represented by the circumplex theory, the human reaction to emotions cannot have continuous values, but discreet kinds of reactions. This is the real problem between the two approaches: they see the same phenomena, but one (the continuous approach) sees it from its inside, relatively to its nature. The other (the discrete approach) sees it from outside, relatively to the consequences of its values and then the events/thoughts whom arose them as much as the actions made as a consequence of them.

Remembering that emotions are fundamentals for humans (and animals too) for taking decisions (Ambady N, Gray HM. 2002, Barsade SG. 2002, Bechara A, Damasio H, Damasio AR, Lee GP. 1999 only to mention some), and also that humans and animals take decision for making any sort of (more or less) reasoned reaction to an external event, we can say for sure that it’s not possible to face with a continuous space of possible emotions when we have to do with events. This is an impassable limit of the continuous approach in its generation (from events) and in its goal (the decision of a reaction). Contrarily, it’s not possible to state precisely which kind of emotion can be triggered by an event associated to a third individual who elicits a specified sentiment into the agent, without using a continuous approach.

As evolutionary psychology stated (and other psychologists agree with them), emotions are the result of the organisms evolution, real mind programs (or modules) able to trigger physical and mental responses in a way strictly dependent to the meaning of the event/thought whom arose them. The Arousal, the Valence and the Pleasure/Pain binomial are the means with which our mind triggers emotions. The natural evolution of species promoted the use of specified ranges of Arousal/Valence and Pleasure/Pain value to better predispose the organism to face with each particular event.

This means, for me, that both discrete and continuous approach are to use in the proper way and in the right context.

References


Ambady N, Gray HM. (2002). On being sad and mistaken: Mood effects on the accuracy of thin-slice judgments. Journal of Personality and Social Psychology 83:947-61
Barsade SG. 2002. The ripple effect: Emotional contagion and its influence on group behavior. Administrative Science Quarterly 47:644-75
Basile B. (2012). Un modello dimensionale delle emozioni: integrazione tra le neuroscienze dell’affettività, lo sviluppo cognitive e la psicopatologia. Cognitivismo.com 
Bechara A, Damasio H, Damasio AR, Lee GP. (1999). Different contributions of the human amygdala and ventromedial prefrontal cortex to decision-making. Journal of Neuroscience 19:5473-81 
Damasio A. (1994). Descartes' Error: Emotion, Reason, and the Human Brain, Putnam Publishing.
Lazarus, R. S., Averill, J. R., Opton, E. M. Jr. (1970). Toward a cognitive theory of emotions. In Feelings and Emotions, ed. M. Arnold, pp. 207-32. New York: Academic
LeDoux J.E .(1996). The Emotional Brain. New York: Simon and Schuster.LeDoux JE (2000). Emotion circuits in the brain. Annu Rev Neuroscience 23:155-184.
Russell, J. (1980). A circumplex model of affect Journal of Personality and Social Psychology 39: 1161–1178. doi:10.1037/h0077714
Scherer, K.R. (1984). On the nature and function of emotion: a component process approach. In Klaus R. Scherer and Paul Ekman (Ed.), Approaches to emotion (pp. 293–317). Hillsdale, NJ: Erlbaum.
Schlosberg, H. (1954). Three dimensions of emotion. Psychological Review 61: 81–8. doi: 10.1037/h0054570
Schlosberg, H. (1952). The description of facial expressions in terms of two dimensions. J. exp. Psychol., 1952, 44, 229-237

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.