AAAI Technical Report FS-12-02 Artificial Intelligence of Humor Hansel and Gretel for All Ages: A Template for Recurring Humor Dialog Faisal L. Kadri ArtificialPsychology.com Dollard Des Ormeaux, QC, Canada tences have systematic change of preference depending on the age of the participant. Since the categories are based on the context of sentences, the existence of humor is not a necessary condition for the categorization; therefore there is basis for extending the age dependence to non-humorous sentences. The purpose of this work is to demonstrate the utility of contextual age dependence of sentences using dialog from the fable of Hansel and Gretel. The next section contains description of the humor classification and compares it with another validated humor classification (Martin et al. 2003). Then the statistical evidence from the internet humor appreciation survey is compared with fuzzy logic distribution curves (Zadeh 1965) as used in selecting sentences by a patented software dialog player (Kadri 2010). The third section introduces the initial dialog of Hansel and Gretel and describes how the dialog can be augmented in order to appeal to all age groups. Abstract The fable of Hansel and Gretel describes the plight of two children over two types of threat; harm to their immediate survival and pain from hunger. The two contexts of selfpreservation and feeding are evident from the flow of the story dialog, therefore an automatic re-playing of dialog can be realized by picking sentences from two lists; one containing sentences in the context of self-preservation, the other in the context of feeding. Theory and Internet humor appreciation surveys suggest that humorous sentences in the context of self-preservation have relatively constant preference with respect to age, while in the context of hunger and protection of feeding turf to decline with age, reflecting the reduced need for food with aging. Sentences in the context of sociosexual relationships increased in preference until adulthood then declined with maturity. Also, sentences in parenting context, such as when caring for offspring, society and the environment were found to increase in preference with age and maturity. Therefore in order to construct a recursive Hansel and Gretel dialog for audience of all ages, two lists of sentences are added to feeding: In sociosexual and parenting contexts. The self-preservation list is paired with one of the remaining three, representing three stages of age; youth, adulthood and maturity. The single thread story of Hansel and Gretel serves as a template for recursive dialog, making it possible to create alternative threads and unbound possibilities for plots, thereby duplicating the story structure without repeating the narrative. Classifying Humor Sentences The artificial personality model is made of a sentence repertoire of four motivational dimensions; the dimensions are a representation of states of insecurity, from extreme insecurity to extreme assuredness. Furthermore, each dimension is split in two cognitive divisions depending on how the insecurity is expressed, either fear or aggression. The fear internalizes insecurity while aggression externalizes it. The dimensions are: 1. Emotional sentences: In the context of selfpreservation in the immediate sense. Sentence examples of insecurity externalizing: You are a patronizing bully! And internalizing: I don't like being patronized! A sentence in between could be: Don't patronize me! 2. Feeding sentences: In the context of protecting (internalizing) or expanding (externalizing) resources. For example: Illegal immigrants should Introduction Statistical evidence from Internet humor appreciation surveys supported the validation of an artificial personality model (Kadri 2011), the model is composed of a repertoire of four motivational dimensions, and each dimension contains humorous sentences in categories described by motivational context. The humor survey confirmed that the senCopyright © 2012, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. 26 be forced out (Externalized). New immigrants should not be allowed in (internalized). 3. Sociosexual sentences: In the context of relationships. Examples of sociosexual insecurity: Typical male aggressive jealousy (externalizing), typical female defensive jealousy (internalizing). 4. Parenting sentences: In the context of altruism and raising children. Example sentences attacking threats to offspring (externalizing) or tending to the needs of young offspring (internalizing). In creating a parallel classification for humorous sentences, humor was classified in four motivational categories; each category was divided into contextual externalizing and internalizing humor. A short humor appreciation survey with 16 humor sentences was published on-line. The sentences were distributed equally so that each motivational category receives four sentences with two each in externalizinginternalizing divisions. Table 1 below shows the humor sentences and their classification. crease in preference with age and maturity and to gradually displace attention from feeding and sociosexual preferences. Figure 1 below shows the changing age preference of humor as found in the 16-item internet survey, which used Likert style scoring to measure humor appreciation and attracted 2703 participants. Scores met the consistency criterion of Cronbach robust alpha (Christman et al. 2006) factor of 0.854. Notice that parenting humor has an unpredicted high preference with the youngest participants; this is explained by the perception of aggression (favored by young males) in the presented self-defeating humor. A well-known four way classification based on the use of humor for the psychological well-being was proposed by Martin et al. The four classes are: To enhance the self (selfenhancing), to enhance one’s relationships with others (affiliative), to enhance the self at the expense of others (aggressive), and to enhance relationships at the expense of self (self-defeating). In comparison with the dimensions of the artificial person- Class. Humor sentence SS.E Sign on the door of a Moscow hotel room: If this is PT.E your first visit to the USSR, you are welcome to it. It's better to let someone think you are an idiot than to open your mouth and prove it. FD.I Some days you are the bug other days you are the FD.E windscreen. The darkest hour is just before dawn; so if you are going to steal your neighbor's milk do it then. SS.I Sign in a Copenhagen airline ticket office: We take FD.I your bags and send them in all directions. Better the devil you know. EM.E Puppies still have bad breath even after eating a tic PT.I tac. Don't sneeze when someone is cutting your hair. PT.I Today's mighty oak is just yesterday's nut that held its ground. A child's wisdom: Never do pranks at a police station. Sign in a Norwegian cocktail lounge: Ladies are EM.I requested not to have children in the bar. Never hold a dust buster and a cat at the same PT.E time. Sign in the office of a Roman doctor: Specialist in FD.E women and other diseases. My opinions may have changed but not the fact that I'm right. My mind not only wanders, sometimes it leaves completely. EM.I SS.I EM.E SS.E Class. Humor sentence Three miser friends went swimming, they betted whoever dives the least pays for supper; they all ended up dead. Table 1: Sentences of 16-item Internet humor preference survey. Legend: Emotional/Feeding/Sociosexual/Parenting = EM/FD/SS/PT and Externalizing/Internalizing = .E/.I ality, the parallels are obvious between all four dimensions: emotional/feeding/sociosexual/parenting on one hand, and self-enhancing/aggressive/affiliative/selfdefeating respectively on another. However, the parallels do not extend to the externalizing-internalizing divide, which is not represented in the psychological well-being classification. At first glance, the psychological well-being classification may seem exhaustive but a careful examination would reveal types of humor with no obvious place in the classification. While self-enhancing humor could possibly describe internalizing and externalizing sentences, the other three are strictly externalizing. Aggressive humor ex- Self-preservation is a motivation that exists in all ages; theory (Kadri et al. 1995) suggests that sentences in the context of self-preservation have relatively constant preference with respect to age. In contrast, sentences in the context of hunger and protection of feeding turf were predicted to decline with age, reflecting the decreasing need for food that is highest while growing up during childhood, then gradually falling with age. Sentences in the context of sociosexual relationships which were expected to increase in preference until adulthood then to decline with maturity, and in parenting context sentences were predicted to in- 27 ternalizes insecurity and is described without context. Affiliative humor presumes the existence of social relationship, a type of humor that is not included yet shares the social context is Nonsense humor (Ruch et al. 1990), and self-defeating does not include humor that enhances offspring and society without defeating the self. Nevertheless, a reminder of the parallel is useful as a check on the validity of the statistical results in fig. 1; Martin et al. did find that aggressive humor declined in preference with age and self-defeating was favored increasingly with age, like their respective parallels, feeding and parenting humors. Fig. 2 Fuzzy logic membership curves used to select sentences in simulated age. The software user selects an age for an artificial personality, which sets values of probabilities associated with each dimension along the curves. When the personality receives a prompt or a sentence from the opposite personality it selects a sentence from target dimensions according to the probabilities of its age. Fig. 1 Group average humor appreciation change with age. Augmenting Hansel and Gretel Utilizing Humor-Age Dependence The dialog of Hansel and Gretel is carried on mainly between the two personalities, Hansel who is young, playful and hungry, and Gretel who senses the threats and tries to protect both. The varying degrees of insecurity and the two contexts of self-preservation and feeding are evident from the flow of the story dialog. The first and second columns of table 2 below constitute the first scene of the dialog. If only two contextual lists of sentences were created, one in the context of self-preservation the other in feeding, an automatic re-playing of dialog can be realized by picking alternative sentences from the two lists. A U.S. patent was granted in 2010 for software artificial psychology dialog player utilizing the subject artificial personality. The software selects sentences according to fuzzy logic rules (Zadeh 1965) from a repertoire of four dimensions. The four dimensions are organized in three pairs: Common emotional dimension and one of the three feeding, sociosexual or parenting dimensions. The pairing reflects three age groups where the sentences are picked with maximum probability. The distribution of probabilities is shown in fig. 2 below and is intended to reflect the smoothed empirical distribution of fig. 1. Act 1: Gretel - Emotional La..LaLaLa. .. Waiting song.. Quiet; father said When all doors are shut a window will open. Mom will make pudding for our neighbour tonight, we will share. Get back to work and keep busy until then. Young Hansel - Feeding Food glorious food.. I wish Mother is back. Words won't fill my stomach, I'm hungry. Yeah, creamy pudding. I don't want to work, lets play a game. Table 2a First scene of Hansel and Gretel. 28 Adult Hansel - Sociosexual This forest is creepy, it makes me feel so lonely. He got married so soon after our real mother died. I am not hungry, I miss Inge my girlfriend. I don't want to work, lets play a game. References Mature Hansel - Parenting I wish I could do something useful instead of wasting time. He works everyday, we should carry the burden. I collected these berries for the neighbor's cake. I can't find any more berries, now we can play. Christmann, A. and Van Aelst, S. 2006. Robust estimation of Cronbach's alpha. Journal of Multivariate Analysis 97, 1660-1674. Kadri, F. L. and Duncan, I. J. H. 1995. A New Nonlinear Model of Mechanisms of Motivation. Behavioural Processes Vol. 33, No. 3, pp. 273-288. Kadri, F. L. 2010. Artificial Psychology Dialog Player with Aging Simulation. United States Patent number 7644040. Table 2b Adulthood and maturity augmentation. A dialog thread is played by picking a start line and following linked sentences. If there is more than one link to the target sentences then more than one thread is possible. For tailoring the story to wider age audience the feeding dimension must be augmented; a sociosexual and parenting dimensions should be added for full age coverage. The third and fourth columns contain sentences in sociosexual and parenting context representing three stages of human aging. A fine selection of age creates precise ratios between the three and leads to probabilistic selection from the three age sensitive dimensions. Thus, the single thread story of Hansel and Gretel serves as template for recursive dialog, adding more sentences to create alternative threads and unbound possibilities for plots, thereby duplicating the story structure without repeating the narrative. Kadri, F. L. 2011. The Design and Validation of an Artificial Personaity, Kybernetes Vol 40, No. 7/8, pp. 10781089. Martin, R. A., Puhlik, D. P., Larsen, G., Gray, J., & Weir, K. 2003. Individual differences in uses of humor and their relation to psychological well-being, Development of the humor Styles Questionnaire. Journal of Research in Personality 37, 48-75. Ruch, W., Mcghee, P. E. and Hehl, F. J. 1990. Age Differences in the Enjoyment of Incongruity-Resolution and Nonsense Humor during Adulthood. Psychology and Aging 5: 348-355. Zadeh, L. A. 1965. Fuzzy sets. Information and Control 8: 338–353 Conclusions There is explicit statistical evidence linking age and humor sentence preference, the link implicitly extends to nonhumor age preference since the classification is contextual and does not require the existence of humor. A patented dialog player which implements the same age preference makes it possible to select sentences to match the age of the user. The initial dialog of the fable of Hansel and Gretel was used to illustrate how the original plot, which appeals mainly to children, could be augmented in order to appeal to all ages. The application of matching dialog with the age of target audience could be on several fronts, such as a marketing tool to match the right sales pitch with potential purchasers, or as a tool of man-machine user interface to make the interface more user friendly, leading to higher productivity and shorter learning curves, or as an educational tool to match specific requirements of learning audience. 29