Emotive Decision Making (2)

Note:
This is a somewhat technical programming section which carries on from ideas and techniques developed at length in "Lingo Sorcery"
You might, for a moment, care to reflect upon what it is you consider emotions to be. Do you think of them as some metaphysical experience which defies explanation? If you do, then think about how an alien life form might view your emotions.

An alien might have no conception at all, of the uniquely human experience of emotions or pain, and would just be looking at the resultant chemical/electrical activity which was going on inside your brain if it poked you in the eye with a sharp stick.

The alien would not consider your pain to be mysterious or metaphysical at all. To the alien, it would just be changes happening to values of chemical gradients, electrical charge or something.

You may protest. You may want to tell the alien that it shouldn't just look at pain and emotions in terms of physical changes within the brain. You'll want to tell the alien about the inner feelings you get which make you want to do certain things; feelings which not only result in physical actions but which also trigger thought processes.

"I know exactly what you mean", the alien will say to you. "Just like that software object called Joe".

From this view point, can you really be certain that this object called Joe is not experiencing the emotions you are assigning to him? To object Joe, the contents of the eagerness lists are just as real as any human emotions are to a human They will affect and influence object Joe's behavior (and thinking mechanisms) just as much as any emotional patterns might affect and influence a human.

It may seem a weird way of thinking, but, it is important to get this kind of paradigm going in your mind.

Note: There is an interesting confirmation of this paradigm, in the CD-ROM "How God Makes God". There, a number of software objects are programmed to compete with each other for survival with the most successful being allowed to mate and produce offspring.

In this competitive situation, the actions of the software objects were dependent upon values given to sets of "emotions" - similar to the way Joe has just been programmed. Using list structures and the technique of genetic algorithms, the values of these 'emotions' evolved to cause the objects to "learn" how best to play the competitive game.

Even more astounding, when these software objects were put into an artificial "real life" environment to compete with each other, they developed a set of emotions which caused them to want to be near each other, to cooperate and even to display acts of self sacrifice. Even more scary, the emotional patterns they developed came very close to what might well be described as "conscience".

Now take a look at the various values assigned to Joe's eagerness for each of the factors and the activities shown in the feelWhatToDo handler shown in fig 20/5. Do not worry about the apparent arbitrariness of the values chosen, these can be modified through other mechanisms later if necessary.
 


Joe --Parent Script

on feelWhatToDo me,weather,dogBarking
  set options to [#cycling:1,#walkDog:1,#shopping:1,#stayHome:1,#playCards:1]
  set eagerness to [0,0,0,0,0]
  repeat with i in [weather,money,lonely,dogBarking,needExercise]
    case i of
      "broke":       set eagerness to eagerness + [0,0,-maxInteger(),0,-maxInteger()]
      "rich":        set eagerness to eagerness + [0,0,20,0,0]
      "lonely":      set eagerness to eagerness + [-10,-5,10,-30,20]
      "not lonely":  set eagerness to eagerness + [0,0,0,0,0]
      "energetic":   set eagerness to eagerness + [10,0,0,-30,10]
      "lazy":        set eagerness to eagerness + [-20,-10,0,20,10]
      "sunny":       set eagerness to eagerness + [10,10,0,-10,-10]
      "raining":     set eagerness to eagerness + [-30,-20,0,20,20]
      "barking":     set eagerness to eagerness + [-30,+50,10,-50,-50]
      "not barking": set eagerness to eagerness + [0,-10,0,0,0]
    end case
  end repeat
  put eagerness  
end

Figure 20/5 Joe's emotions influence his decision


To see the effect of this feelWhatToDo handler and to test Joe's decision making mechanism, we can try it out from the message box. Fig 20/6, shows Joe waking up broke, lazy but not lonely in various circumstance (i.e. weather and the dog).
 


From the message box:

wakeUp joe
-- "broke"
-- "not lonely"
-- "lazy"

options = [#cycling:1,#walkDog:1,#shopping:1,#stayHome:1,#playCards:1]


feelWhatToDo joe,"sunny","not barking"
-- [-10, -10, -2147483647, 10, -2147483647]

feelWhatToDo joe,"sunny","barking"
-- [-40, 50, -2147483637, -40, -2147483599]

feelWhatToDo joe,"raining","not barking"
-- [-50, -40, -2147483647, 40, -2147483617]

feelWhatToDo joe,"raining","barking"
-- [-80, 20, -2147483637, -10, -2147483629]

Figure 20/6 Broke Joe's emotions exposed


The first situation Joe wakes up to is when it is sunny and the dog is not barking to go out. All the various applicable eagerness are added together (within the case statement) to give negative values for going cycling and taking the dog for a walk.

Extremely large negative values for Joe's eagerness to go shopping or play cards - the minus maxInteger() - reflects the fact that if Joe is broke it is impossible for him to do either of these things. The single positive value will determine Joe's "emotional" decision to stay at home.

Similarly, if it is sunny, and the dog is barking to go out, Joe decides to take the dog for a walk (+50). He even decides to take the dog out in the rain, rather than stay at home with a barking dog.

The Joe that wakes up in fig 20/7, is a different Joe. This Joe is rich, energetic, but, lonely.


From the message box:

wakeUp joe
-- "rich"
-- "lonely"
-- "energetic"

options = [#cycling:1,#walkDog:1,#shopping:1,#stayHome:1,#playCards:1]


feelWhatToDo joe,"sunny","not barking"
-- [10, -5, 30, -70, 20]

feelWhatToDo joe,"sunny","barking"
-- [-20, 55, 40, -120, -30]

feelWhatToDo joe,"raining","not barking"
-- [-30, -35, 30, -40, 50]

feelWhatToDo joe,"raining","barking"
-- [-60, 25, 40, -90, 0]

Figure 20/7 Rich Joe's emotions exposed


With the dog not barking to go out and the weather sunny, Joe decides to go shopping, but, if the dog barks, Joe will take the dog out for a walk in the park.

If it rains, and the dog is not barking, Joe will decide to invite his friend round to play cards, but, if the dog is barking he will take the dog out shopping with him.

You can readily see, even with this extremely simple programming structure, this "emotional" programming is making Joe appear to be making a combination of rational and emotive decisions. Joe seems to be carefully considering all the factors, yet leaving his "feelings" to come up with the most suitable compromise.

Can you really say that Joe is not acting intelligently and displaying some kind of human qualities? After all, this is exactly the same way that humans make their decisions.

[Index]
[Next - Emotive decisions (3)]
[Back - Emotive decisions (1)]


Peter Small August 1996

Email:
peter@genps.demon.co.uk

Version 1.00

© Copyright 1996 Peter Small
No reproduction in whole or part without prior permission