Abstract:
The spontaneous animation methods disclosed herein generate apparent emotions and apparent willful actions in artificial characters using mathematical formulae. Because these animations are spontaneously calculated, they are precisely tailored to interactive input. This is in contrast to current methods for creating interactive characters, in which the computer selects among predetermined animation sequences to approximate an appropriate reaction. 
     In addition to spontaneously generating emotional states and actions, this method is further capable of spontaneously evolving a progression of emotive states and actions, thereby simulating an evolving emotional relationship and/or creating extended interactive sequences with a plot-like structure. 
     Because spontaneous animation replaces stored behaviors with realtime calculations, it can require thousands of times less data than animation methods currently used in animation and gaming.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]    Not Applicable 
       STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT 
       [0002]    Not Applicable 
       REFERENCE TO A COMPUTER PROGRAM LISTING COMPACT DISC APPENDIX 
       [0003]    The computer program submitted with this disclosure is java script that is called by a fully functional application which runs in HTML5 using webGL. This application presents a 3D graphical character animated solely using mathematical equations. 
         [0004]    The code presented here controls the degree to which all parameters controlling character movements and emotions are applied. The particular mechanisms by which these parameters are applied to the character, which are well known in the art, are handled elsewhere in the application&#39;s code. 
         [0005]    In addition, this java script example contains a full mechanism by which controlling equations can be dynamically linked to a user&#39;s behavior, which demonstrates the coupling of oscillators in the mathematical dynamical system of an artificial character, to oscillators in the physical dynamical system of a human user. 
       BACKGROUND OF THE INVENTION 
       [0006]    The present invention pertains to automated methods for the animation of two and three-dimensional images, as well as mechanical robots. More particularly, the present invention relates to methods of mathematically generating the appearance of emotional states and willful actions in the object being animated, including apparent emotional and physical responses of said object to interactive situations. 
         [0007]    Methods for transforming two and three-dimensional images are described in my earlier patents U.S. Pat. Nos. 6,147,692 and 6,320,583. These patents pertain to using additive morphs as a method of changing an animated character&#39;s appearance to portray emotional states and other behaviors. These patents also disclose the use of mathematical formulae to control these morphs in order to create apparent “moods” or emotional states in the animated character. During these moods, one or more mathematical formulae may autonomously change one or more features of the character with a frequency and amplitude that has been set to reflect the mood being portrayed. 
         [0008]    In spite of the fact that the methods revealed in these patents can generate a character&#39;s mood, and the fact that the character is moving during these moods, each mood of the character is generated by pre-set parameters. Therefore, interactive methods that transition from one of these pre-set moods to another fall into the general category of Stored Interactivity, as defined below. 
         [0000]    We pause now to define two forms of interactivity: 
         [0009]    1. Stored Interactivity will refer to methods which create interactivity by storing reactions in memory and programming the computer to select them according to user actions. 
         [0010]    2. Calculated Interactivity will refer to methods which create interactivity by calculating responses to user input without resorting to stored responses. 
         [0011]    Most interactive games today combine both methods to some degree, using Calculated Interactivity to duplicate the freedom of experience that real life provides, and Stored Interactivity to provide more complex behaviors and game structure. 
         [0012]    In current computer games, Calculated Interactivity methods enable game players to freely navigate in virtual worlds by continuously calculating the player&#39;s field of view within the virtual world, so any user choice can be precisely accommodated. This precise responsiveness generates an exciting feeling of reality. The overwhelming success of navigational interactivity has led to game characters which function almost entirely as navigational vehicles to orient the user in virtual space. 
         [0013]    Non-navigational functionality in game characters is created primarily using Stored Interactivity methods, due to the difficulty of mathematically modeling and spontaneously calculating human behavior. The advantage of using Stored Interactivity is that human writers or animators can script meaningful, articulate character responses. The disadvantage is that Stored Interactivity&#39;s ‘canned’ responses result in a comparatively stilted, limited interactivity in the exact area where freedom and spontaneity are most appreciated and valuable: inter-human communication. 
         [0014]    This lack of appeal of non-navigational interactivity favors games which are action-oriented. Even “social” games like Second Life emphasize navigation and utilize characters which are unable to emote realistically, or to speak naturally. 
         [0015]    Even efforts to synthesize simple emotive behaviors, such as U.S. Pat. No. 7,333,969—“Apparatus and method for synthesizing emotions based on the human nervous system” rely on Stored Interactivity methods, as revealed when this patent&#39;s “emotion generator” functions by “generating an predetermined emotion” and its “emotional behavior generator” functions by “generating at least one emotional behavior through a predetermined physical reaction.” 
         [0016]    A number of methods, including those revealed in U.S. Pat. Nos. 8,390,680; 7,202,886, and 5,734,794 create emotions and actions in a graphical character or physical robot which are independent of any stored data by having said character or robot imitate a human performer. These procedures are useful when the character is acting as a stand-in, or avatar, for a human controller. However, they do not enable the computer to control characters autonomously. 
         [0017]    U.S. Pat. No. 8,909,370 reveals a robotic companion designed to interactively simulate an emotional relationship for uses such as comforting people with severe autism. This robot can autonomously engage in basic emotive behaviors such as “nuzzling.” Such basic emotive reactions are closer to those which will be proposed in the current invention. However, this robotic companion&#39;s interactions are selected from a set of predetermined behaviors, which make them a form of Stored Interactivity. 
         [0018]    A “physics engine” is the name given to code that spontaneously calculates the movement of physical elements like hair and cloth in current computer games. In such simulations, a progressive parenting of physics equations results in movements being passed down a shaft of hair, or a flag, or a dress, in a way that can be both convincing and beautiful. These physics engines bring an element of spontaneity to user interactions with physical objects. The method of this disclosure parallels these physics engines with a Psychology Engine that brings spontaneity to the emotions and behavior of characters. 
       BRIEF SUMMARY OF THE INVENTION 
       [0019]    The purpose of this invention is to bring the freedom and spontaneity of Calculated Interactivity to simulated interpersonal communication. This requires a set of mathematical formulae capable of spontaneously generating human-like behavior. 
         [0020]    It is clearly impossible at this time for a computer to duplicate the full breadth of human behavior. Accordingly, the method presented here mathematically models only the most basic behavior patterns. We will refer to these patterns as Physiologically Derived Behaviors, or PDB&#39;s. Although they lie outside the more complex “higher” or “rational” contributors to human behavior, Physiologically Derived Behaviors have an overall effect on our behavior that is arguably stronger than the more vaunted aspects of humanity. The profundity and interrelated action of PDB&#39;s is observed when a human subject is under the influence of a drug. 
         [0021]    When a human subject is under the influence of a strong stimulant or depressant, the effect of the drug in question can be observed in the subject&#39;s physical movements, their speech patterns, their conscious and subconscious thoughts, as well as their digestion, heartbeat and other anatomic functions. Furthermore, these separate effects on all these highly diverse systems all exhibit a marked similarity in their observable patterns (e.g. fast, erratic heartbeat; fast, erratic thought processes; fast, erratic body movements). These broad-based, underlying behavior patterns appear not only under the blatant effects of powerful drugs, but also in response to much gentler drugs like coffee, and—more importantly for our purposes—in response to the emotional state of the human character being observed or modeled: These broadly influential underlying behavior patterns are what the method of this patent defines as PDB&#39;s, and what this method&#39;s psychology engine is designed to spontaneously duplicate. 
       BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING 
       [0022]    Not Applicable 
     
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0023]    The example code presented in the appendix of this disclosure spontaneously animates the behavior of a pre-verbal infant. An infant was chosen because its behavior represents the purest and simplest functioning of the Physiologically Derived Behaviors that our Psychology Engine models. The general method of the invention is detailed below with references to the specific infant example as illustration. The description below is broken into steps for logical clarity, so that each explanation builds on information revealed in preceding steps. In actual practice of the method of this invention, the order of these steps may be changed, or they may be performed concurrently, as long as the interconnection of the functionalities described in stepwise fashion below remains intact. 
         [0024]    Step #1—Create an Array of PDB Oscillators. 
         [0025]    This example begins by setting up an array of independent mathematical formulae, including equations capable of generating parametrically adjustable oscillations. These equations may be capable of specifying changes in a system over time in response to forces, or force-like factors, in the manner of the dynamics branch of physics. These formula will be used to mimic the artificial character&#39;s Physiologically Derived Behaviors, including emotional factors, body movements, and physiological processes. Oscillators are chosen because the Physiologically Derived Behaviors we are modeling tend to cycle and dwell within a certain range. 
         [0026]    It is tempting to use more sophisticated mathematical formula which are independently able to generate complex behavior—such as chaotic attractors—to model physiological components. However, for the sake of clarity, this introductory example will present an array consisting of simple damped springs, approximated (and further simplified) with the following mathematical formula: 
         [0000]    
       
      
       x+=v*dt;  
      
     
         [0000]        v+= ( k *(target− x )− d*v )* dt;  
 
         [0027]    By adjusting two parameters of these approximations, spring constant, k, and damping d, one can generate crude renditions of the rapid, shaky behaviors of the earlier-mentioned subject on a powerful stimulant (high k, low d), and the sluggish behavior of the subject on a depressant (high d, low k), as well as other combinations the reader can easily imagine. In addition, the transitions between these extreme states are continuous, allowing every shade of grey. 
         [0028]    Although extremely basic, these spring approximations have the advantage of being clearly understandable, nondistracting, and—as we will see in the following steps—they can be combined to create complex and nuanced behavior. 
         [0029]    Step #2—Link PDB Oscillators to Behavioral Characteristics 
         [0030]    The next step in our method is to link these independent component oscillators to separate mechanisms representing components of our artificial character&#39;s behavioral state, so that each unique oscillator drives a unique component. Components may include the following: 
       Facial Expressions— 
       [0031]    These can be generated a number of ways, but our particular example uses morph targets—e.g. “smile”, “frown”, “trusting” vs. “suspicious” eyes (lids shrouding the pupil from the top vs. the bottom), and the often-neglected but highlyevocative characteristic of “facial asymmetry”. The relative importance and meaning of these separate characteristics can be discussed elsewhere and is easily alterable by future programmers using this method. The salient point here is that the attack, duration and decay of each individual characteristic is determined by a separate mathematical formula. 
       Body Movements— 
       [0032]    Separate body movements (and separate rotational components of a particular body movement) can be assigned to separate oscillators, just as was done with the separate emotional representations above. 
       Vocal Patterns— 
       [0033]    Separate vocal parameters such as pitch, volume, speed, and hat rise (the musical structure of a sentence or phrase) are uniquely assigned to separate oscillators as above. 
       Respiration— 
       [0034]    Breathing is assigned to a separate oscillator. In this case, our example adds a small element of complexity to the simple two-parameter spring approximation to allow the character to go from ventilation to hyperventilation. This modification will be further described in step 4. 
         [0035]    Step #3—Link Together the Tuning Parameters of the PDB Oscillators 
         [0036]    The goal in this step is to recreate the global uniformity of behavioral patterns that exists across various physiological systems, as noted in our earlier description of PDB behavior of subjects under the influence of a drug or an emotional state. This uniformity is achieved by linking the parameters of the separate PDB oscillators. In the code presented in the appendix of this disclosure, the variable “awake” ranges from 0 (character asleep) to 1 (wide awake). This variable smoothly adjusts the k and d parameters of every PDB, so that all springs become increasingly sluggish (lower k higher d) as “awake” approaches 0. However, the degree to which various PBD oscillators are effected by the “awake” variable differs, so that when awake==0, the character&#39;s breathing, although slowed, continues, whereas it&#39;s physical movements are shut down. 
         [0037]    In an interactive situation, as “awake” decreases and reaches zero, all the details of the character&#39;s swoon and its final sleeping position are instantaneously calculated, with no input from any recalled animation. This means that a character&#39;s behaviors are always original, and—by linking control variables like “awake” directly to user input—characters can create wholly original responses based entirely on the user&#39;s input. The increase in realism achieved by this method&#39;s infinitely-variable, absolutely-responsive characters is readily apparent and highly satisfying to users. The interactive linking of users to control variables will be further described in step 5. 
         [0038]    Step #4—Couple the separate PDB Oscillators in the array 
         [0039]    Coupling oscillators—connecting them in such a way that energy can be transferred between them—is a well-studied phenomenon of physics known to produce patterns of behavior that can be highly structured, yet unpredictable. The method disclosed here couples the separate PDB equations of a character to create such patterns in the emotions and physical behavior in the character. The coupling of oscillators can be hierarchical, such as when a second pendulum is attached to the swinging bob of a “parent” pendulum. The method of this disclosure uses such hierarchies to add organization and structure to the separate character attributes controlled by separate PBD&#39;s. 
         [0040]    In the Appendix&#39;s code for an interactive infant, the PBD that governs the infant&#39;s breathing is the root parent of the other PBD equations. Although we are attempting to keep the formulae in this example as simple as possible, this breathing PBD has been slightly enhanced. The effect of this modification can be simply described by detailing the behavior of the breathing PBD as it responds to its control variable, “excitement.” 
         [0041]    When excitement==0, the character&#39;s breath rate is very slow and rhythmic. As this control is increased toward excitement==1, the breath rate climbs smoothly to a very fast rhythmic pace. At excitement==1, breathing breaks a barrier, similar to that seen when laminar flow becomes turbulent, such that when excitement&gt;1, the character&#39;s previously methodical ventilation becomes hyperventilation, wherein both the depth and the duration of each breath becomes random. This creates an emphatic, gagging output of the breathing PDB, which is used to power both laughing and crying in the character. In both cases the PBD&#39;s that govern the motion of the character&#39;s head, the openness of the jaw, and other related characteristics are all children of the PBD that governs breathing. The result is that the effects of hyperventilation are passed to these other characteristics. Additionally, in our example the parameters of the affected PBD&#39;s can be adjusted so that they either stifle or amplify the original breathing effect. Again, this is all calculated spontaneously, requires zero recalled animations, and generates behavior that is precisely customized to the user, and never repeats. 
         [0042]    Another advantage of this hierarchic coupling is that naturalistic transitions tend to spontaneously emerge in the code, such as an overexcited laugh flipping into a cry. These sorts of complex, unexpected, and human-like behaviors emerge because—even though our example relies on a trivially simple mathematical approximations of a damped spring—coupling these approximations creats sophisticated, complex behavior. 
         [0043]    As a hierarchical chain of dynamic oscillators grows longer, or becomes otherwise more complex (e.g. wider, like in a cloth simulation), the unpredictability of the position of any particular point tends to increase. Yet, in the overall system, recognizable patterns of motion may emerge in which the frequencies of multiple coupled oscillators resonate in a stable and recognizable manner. These stable patterns of motion are seen, for example, in the emergence of visible patterns on the surface of water in response to varying sound waves, and in numerous formal experiments including Swinney and Gollub&#39;s study of the emergence of highly structured chaotic patterns Taylor-Couette flow. 
         [0044]    When dynamically-linked equations are used to drive emotional and behavioral components of an artificial character, these sorts of stable and recognizable patterns of motion become analogous to moods or emotional states—emerging spontaneously, enduring in a mutable form, and then disappearing under changing conditions, as they do in life. 
         [0045]    Step #5—Enable Interactivity 
         [0046]    We have created a character with emotional states derived from a tuned system of interconnected oscillators. Our next step is to create an interactive scenario—or virtual relationship between the character and the human user. To do this, we must link our character&#39;s artificial emotional state to the emotional state of the user. 
         [0047]    This requires an interface capable of transmitting emotions from the user. Recent technologies provide a plethora of opportunities to input user emotions, including combining the now-prevalent user-facing camera with facial recognition software to analyze facial expressions. Such interfaces provide excellent data on the user&#39;s particular expression at any time. In fact, a number of recent researchers claim to have developed software that can surpass a human in analyzing facial emotions. 
         [0048]    The method disclosed here differs from that approach in that it focuses on the kinetic elements of emotion and body language rather than analyzing endpoints. For example, by focusing on kinetic elements like the attack and decay of a smile, rather than it&#39;s exact shape, the method disclosed here can classify a face that smiles slowly, then very quickly returns to neutral (nervous), as different than a face that that smiles quickly, then very slowly returns to neutral (relaxed). 
         [0049]    Because the method revealed here is more dependent on patterns of motion (body movements as well as facial expressions) and less dependent on the accurate measurement of endpoints, a simple mouse or touchpad can provide useful emotive data. The java script code in the appendix of this disclosure extracts emotive data from the user in this way. 
         [0050]    This mouse or touchpad typically extracts rational user decisions, as determined from the position of the cursor on the screen. To extract emotive, rather than rational, information from the user, the current method calculates kinetic factors including velocity of cursor movement, steadiness of path, periodicity of movements, attack, and decay, which reveal instinctive behavioral patterns within the user&#39;s movements. These patterns of user behavior represent the output of the highly complex jumble of interlinked physiological oscillators within the user. 
         [0051]    The interlinked synthetic oscillators, which drive the behavior of the artificial character in the current method, create a dynamical system that is far simpler than the user&#39;s PDB&#39;s. Despite this difference in complexity and the software/wetware gap, these vastly different dynamical systems can be coupled by using the patterns of behavior the interface measures in the user to drive the synthetic oscillators of the character. 
         [0052]    Furthermore, once these highly divergent systems are coupled, characteristic behaviors of coupled oscillators emerge, including those described above. In the simplest form of coupling, the patterns of motion coming from the user become a primary root for the hierarchy PBD equations in the character, as described above. This allows for phenomenon, including frequency entrainment and harmonic resonances, to create complex patterns of behavior in the artificial character in response to the user. These complex responses by the artificial character include emotional progressions and apparent willful actions which can be generally recognizable and repeatable enough to “make sense” to a human observer, and yet (being non-deterministic) are different every time. As a result, these responses feel more natural, and less mechanical. 
         [0053]    This method also enables changing the nature of the artificial character&#39;s response to the user in a manner independent of the user&#39;s input. Different responses can be created independently by parametrically tuning the natural resonances of the artificial character&#39;s oscillators to reflect, amplify or contrast the patterned behavior measured from the user. The java script code presented in the appendix of this disclosure uses this method to alter the responses of a virtual infant as described below. 
         [0054]    The parameter “awake”, introduced in Step 3, affects the spring constant and the damping of springs that control the baby&#39;s behavior, including emotional responses, apparent willful actions, and physiological behaviors such as breathing. As “awake” approaches zero, it lowers the spring constant (slow acceleration) and increases the damping (resistance) of all these springs. As result, the baby appears to become drowsy as its responses are slowed and dulled until they reach the point where they no longer respond at all to the linked motions coming from the user interface, and the baby appears to fall asleep. 
         [0055]    At the opposite end of the emotional spectrum, another broadly-applied parameter introduced in Step 3, “excitement” can raise the strength of these springs and drop their damping beyond their normal range. When this happens, the baby&#39;s responses become hyper (super-quick spring) and can be made to spiral out of control (negative resistance). 
         [0056]    Step #6—Add Verbal and Rational Behaviors 
         [0057]    Now that we have coupled the synthetic oscillators of our character to the organic oscillators of the user, our character can appear to reflect and respond to the user&#39;s emotional state. The next step is to augment this emotion-centric system so that it can generate adult verbal behavior. At this point we re-introduce the Stored Interactivity method. 
         [0058]    When the character being animated is an adult, the method described here can run simultaneously with Stored Interactivity methods, such as those already known in the art which account for speech and other “higher” thought processes in current game characters and conversational agents. 
         [0059]    Moreover, the PDB&#39;s modeled in this process may be used to moderate and control the “higher” processes being presented by the Stored Interactivity partner in this alliance. Mechanisms for achieving this control include using the emerging patterns of motion described in Steps 4 and 5 above as ‘triggers’ to initiate mood-appropriate Stored Interactivity sequences. 
         [0060]    Other mechanisms for linking the two methods include a hierarchical structure which assigns the artificial emotions of this invention&#39;s spontaneous animation the role of parent, and any artificial intelligence method the role of child. One might argue that the validity of slaving artificial intelligence to artificial emotions in modeling human behavior is quickly confirmed by a casual observation of world history. But that, of course, would be outside the scope of this disclosure. 
         [0061]    What this disclosure does reveal is the creation of entertaining and dramatic interactive characters by slaving methods depicting the “higher” and more “rational” human behaviors to the more “emotional ” Physiologically-Based Behaviors, rather than the other way around.