Generation of Ego
    Will have a model of the self. The robot's self-image will contain a catalog of what the robot can and cannot do (or has been able to do and has not been able to do—i.e., a record of its successes and failures). Gaining an insight will improve the robot's opinion of itself. This will take the form of improving the robot's self-image and creating a temporary, small-to-medium increase in voltages, clock speeds, with a reduction in gravidity and internal critique. Might be motivated to work in ways that improve some internal box score, providing feedback at an abstract level. In other words, improving its self-image box score may be an important motivator for the robot.
    There will be competing urges (drives). The ego (control unit) will balance and make choices, and will develop different response patterns depending upon its experiences.The ego or controller will evaluate the situation and will try to project the effects of alternate courses of action upon its welfare. The controller will constantly evaluate its performance and will feel good when it decides that it has done well and bad when it concludes that it has done poorly.—i.e., a critical parent. It will generate a catalog of its successes and failures in order to know what it can do (or at least has done) and what it can't do. When it succeeds in doing something new or challenging, it will reward itself with good feelings. (The tensions between the parent parts, the ego, the child parts, and all the drives, emotions, and evaluation processes are a crucial part of what makes us human.) The efficacy of the advice provided by the parent part will also be evaluated over time.
    The parental part would probably first be characterized by tallying and making available statistics regarding prior outcomes. Anticipations of unpleasant outcomes generated by abbreviated reruns of prior, painful experiences could come from the "parental part" program subsection.
    From a programming standpoint, how the robot responds will depend upon choices which reflect all of the various influences which emanate from different parts (subprograms) within its psyche.

How It Might Work:
    When the robot sets out to achieve a goal and "bumps its shins", it may be puzzled (the first time), it may cry, or it may react with angry determination. At the same time, the parental program would record a failed sequence. It would raise a level of caution in the robot, influencing its responses on the cautious side. If the robot started to do the same thing again, the parent program would replay the tape from the last similar occurrence. And how would the robot know when a similar occurence is about to occur? That's a good question. Objects have well-defined boundaries but animation tracks (video tapes) don not. One way to do it is to maintain a record of the camera's location and to associate film clips with camera location. A time track is certainly necessary. Starting points for short "film clips" may be stored and associated with objects. Repetitive events like the diurnal cycle could lead to generic expectations, with daily-event tags such as when the robot enters the kitchen for the first time that day. If nothing unusual happens, the details of the day's events could soon be expunged, while the unusual would be recorded for longer retention (i.e., at a greater weight).
    Now how do we program all this?
    The capabilities record might take the form of a record of the "success scores" the robot assigned itself for the most recent experiences in which the robot tried to do whatever it was that is relevant to current demands.
    How do we simulate pain? There are many ways to punish the robot, including intermittent failure of subsystems or confusion at critical times. However, physical pain is still a mystery to me. I'm thinking that pain must be electrical because we feel pain instantly. If it were chemically-transmitted, a few seconds would be required before the chemical messengers reached the brain. Granted that pain messages may release neurotransmitters in the brain, but how do they make a neural network hurt?
    For that matter, how do we make the robot care what happens to it?
    The role of play (let's pretend). Strong appetites. Tendency to imitate. Imprinting.