[alicebot-developer] Subconscious Alice

Helio Perroni Filho alicebot-developer@list.alicebot.org
Tue, 24 May 2005 21:39:08 -0300 (ART)


--- Dave Sienkiewicz <daves1@ptd.net> escreveu:

> Say for example, I have ALICE running on a PC that
> is interfaced to an OOPIC controller that can raise
> or lower an actuator that we'll call an arm.
> 
> I can code a pattern of RAISE ARM with a template
> composed of the utterance "OK" plus a system call to
> the OOPIC of a code that commands the actuator to
> be raised.
> 
> I can then program the OOPIC controller to return a
> string of characters when the arm is raised. The
> string could essentially be a status word, e.g.
> "ARMISRAISED" which the user does not see, but could
> for example trigger a template with the utterance,
> "Uh, my arm is raised as high as it can go." It
> kind of works like "think" but the data is being
> externally input from an unseen source instead of
> directly from the user.

Well, I hope this won't frustrate you -- it certainly
doesn't diminish the value of thinking of it by
yourself -- but AIML already provides a mechanism for
doing what you described. It's called the <srai> tag,
and it works by feeding its contents back to the input
parser, then returning the output.

Let's code your example of the robot arm in a way
compatible with my ChatterBean AIML interpreter:

<category>
  <pattern>RAISE ARM</pattern>
  <template>
    Ok.
    <srai>
      <!-- In ChatterBean, the system tag feeds its
      contents to a BeanShell interpreter. This is not
      against the AIML standard, but it's unusual
      enough that I thought necessary to notice it.
-->
      <system>
        Arm arm = new Arm();
        /* the tag will return the contents of the
        system variable converted to string. */
        system = arm.raise();
      </system>
    </srai>
  </template>
</category>

<category>
  <pattern>ARMISRAISED</pattern>
  <template>
    Uh, my arm is raised as high as it can go.
  </template>
</category>

If the arm.raise() call returns the "ARMISRAISED"
string, the following dialogue would be possible:

<user> Raise arm.
<bot> Ok. Uh, my arm is raised as high as it can go.

> Another example, let's say I have a crontab or some
> other scheduling resource. Theoretically, I could
> use that to signal an event. For example at 2100
> hours, perhaps I could send a secondary input of a
> pattern SLEEP 2100, which can have a template
> assigned, "It is 9 PM. It's time to go to sleep."

Now that's something I can't think of doing with AIML
alone -- but then again, it has more to do with the
interpreter application than with the language itself.
If my interpreter, say, left a socket open for
accepting remote inputs, but printed the corresponding
outputs to the user interface, then I could have
another application (like a cron daemon) sending it
some warn about an event, and it would in return send
some message to the user.

> I'm not advocating that we rip all our existing code
> apart to add this interface, but I think this is
> something that is well worth considering in future
> versions.

AIML scope is to provide a good way for representing
stimulus/response information; deciding how or when
this information will be accessed is someone else's
job. What you propose are alternative channels for
stimuli to get to a bot's brain; it's a good idea, but
it has to do with AIML interpreters and the system
around them, not the AIML language.

Bloat kills. Different AI technologies are best suited
for different classes of problems; it's by combining
them together, and not by trying to apply the same
tool in all tasks, that more intelligent systems will
become possible.

-- 
Ja mata ne.
Helio Perroni Filho



	
	
		
____________________________________________________
Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br