LISP PROJECTS (20)
most recent version : 3.5 |release date : December 20, 2004

Simply by typing (load "dd"), you can run the LOVERS1 experience from the book Daydreaming in Humans and Machines. Here is how this trace begins:

  > (load "dd")
  ...
  DAYDREAMER 3.5, Common Lisp version of 2004-12-20
  Initialize DAYDREAMER
  Performing first-time initialization
  Creating primal reality...
  ...
  Creating initial reality context...
  State changes from SUSPENDED to DAYDREAMING

Daydreamer first creates an initial reality context: the context designated as containing the state of the simulated "real world" as seen by Daydreamer. Various initial facts are asserted into this context: Daydreamer has a job, is not romantically involved, is currently at home, and so on.

Daydreamer then starts out in daydreaming mode.

  Run inferences in #{CX.6: (CX)}, bp = (#{ME: (FEMALE-PERSON first-name "Sarah"......)})
  ...
  ******************
  LOVERS-THEME LOVERS-THEME fired as inference in CX.6
  -------------------------------------------------------
  IF   self not LOVERS with anyone 
  THEN ACTIVE-GOAL for LOVERS with some person 
  -------------------------------------------------------
  ?SELF = #{ME: (FEMALE-PERSON first-name "Sarah"......)}
  ******************
  Activate top-level goal #{OB.2212: (ACTIVE-GOAL obj (LOVERS actor ......)......)} in #{CX.6: (CX)}
  Assert #{OB.2212: (ACTIVE-GOAL obj (LOVERS actor ......)......)} in CX.6
  ==================================================
   I want to be going out with someone.
   I feel really interested in going out with
   someone.
  ==================================================
  Personal goal concern OB.2212: LOVERS motiv 0.9 status HALTED

Daydreamer activates a top-level LOVERS goal because it is not involved in a LOVERS relationship, and one or more of its need states subsumed by the relationship are unsatisfied. A new concern is created and a positive motivating emotion of interest is created and associated with the new concern. The intrinsic importance of the goal is 0.9. This becomes the magnitude of the motivating emotion, as well as the current value for the motivation of the concern.

Whenever facts are asserted into a context, they are converted into English and produced as output.

  ******************
  ENTERTAINMENT-THEME ENTERTAINMENT-THEME fired as inference in CX.6
  -------------------------------------------------------
  IF   level of satisfaction of ENTERTAINMENT need 
       below threshold 
  THEN ACTIVE-GOAL for ENTERTAINMENT 
  -------------------------------------------------------
  ?SELF = #{ME: (FEMALE-PERSON first-name "Sarah"......)}
  ******************
  Activate top-level goal #{OB.2217: (ACTIVE-GOAL obj (ENTERTAINMENT...)......)} in #{CX.6: (CX)}
  Assert #{OB.2217: (ACTIVE-GOAL obj (ENTERTAINMENT...)......)} in CX.6
  ==================================================
   I want to be entertained.
   I feel interested in being entertained.
  ==================================================
  Personal goal concern OB.2217: ENTERTAINMENT motiv 0.6 status RUNABLE
  Personal goal concern OB.2212: LOVERS motiv 0.9 status HALTED

Next Daydreamer activates an ENTERTAINMENT goal because its need for entertainment is unsatisfied. Another concern and associated motivating emotion are activated.

  Running emotion-driven control loop...
  :Switching to new top-level goal #{OB.2217: (ACTIVE-GOAL obj (ENTERTAINMENT...)......)}
  ...
  ******************
  ENTERTAINMENT-PLAN1 fired as plan 
  for #{OB.2217: (ACTIVE-GOAL obj (ENTERTAINMENT...)......)}
  in CX.6 sprouting CX.7
  -------------------------------------------------------
  IF   ACTIVE-GOAL for ENTERTAINMENT 
  THEN ACTIVE-GOAL for M-MOVIE with self 
  -------------------------------------------------------
  ?SELF = #{ME: (FEMALE-PERSON first-name "Sarah"......)}
  Assert #{OB.2227: (ORDERING)} in CX.7
  Instantiate and activate subgoals
  Activate subgoal for #{OB.2217: (ACTIVE-GOAL obj (ENTERTAINMENT...)......)} obj #{OB.2228: (M-MOVIE actor ME)} in #{CX.7: (CX)}
  Assert #{OB.2230: (INTENDS linked-from (ACTIVE-GOAL...)......)} in CX.7
  Assert #{OB.2229: (ACTIVE-GOAL obj (M-MOVIE actor ......)......)} in CX.7
  ==================================================
   I have to go see a movie.
  ==================================================

The top-level control loop is invoked once Daydreamer has gotten off the ground by applying inferences and, in this case, creating two concerns. The most highly motivated nonhalted concern is ENTERTAINMENT and therefore a unit of planning is performed for this concern. Daydreamer has a rule which states that a goal for ENTERTAINMENT may be achieved by achieving an M-MOVIE subgoal. Thus a new context is sprouted in which the top-level goal for ENTERTAINMENT is connected to a subgoal for M-MOVIE. This context becomes the new reality context.

This trace continues for a long time. At the end of the experience, daydreams are produced. To see the full trace, download Daydreamer and type (load "dd").

Daydreaming in Humans and Machines

Order at Amazon