PDA

View Full Version : ALICE and EQE


Malevolent
05-02-2002, 03:03 AM
I've been experimenting with ALICE (http://www.alicebot.org/) and use of it in the emulator. Unfortunately, finding a pure C++ implementation proved difficult. I stripped down a few versions that were done in C and toss them into a class. I've attached the core files and a basic test case to use with the engine, should you be interested in it.

Some lessons learned:

0. This is a dirty and not quite useful hack.

1. Pattern matching, when said to be buggy in the readmes, is questionable whether it works at all at times.

2. Alice->respond2 needs an overhaul if you plan on using it with the emulator. One thing you'll need to do is strip all whitespace, as sometimes respond2 will kickback an entire enumerated list.

3. Instantiating the class per mob doesn't work so well. Doing it per zone, or when you need it works well enough.

Other notes:

I have it running on My lab on the public server list. Go say hello to any npc in any zone. They all share from the same botmaster files.

If anyone is interested in picking this up, then you have your work cut out for you. I have to wonder if the ALICE folks are even alive anymore, having diverged over to java and seemingly pretty low on technical communication, but heavy on political. Bureaucracy killed another cool idea, it seems.

I've two other solutions in mind that could be used with the existing quest engine that could be worthwhile to pursue.

One, put in pattern matching for trigger text. And then implement idle chat scripts. One of the things that I picked up while messing [up] with the engine is the AIML format. I'm thinking that if the quest engine could do more pattern recognition and allow referencing within it, then you would have largely duplicated how the ALICE engine works. And, as I think about it, the pattern recognition is largely already in place, all one needs is to add a few new types of commands.

Here is a sample AIML script:

<category>
<pattern>AN *</pattern>
<template><think><set_it><settopic><person/><settopic></settopic></set_it></think>
<random>
<li>What is it? </li>
<li>I have never heard of an <person/>. </li>
<li>Be less specific. </li>
</random></template>
</category>


The equiv in the eqe script engine might be

NPCTYPE_ID 4723 {
TRIGGER_TEXT:AN $OBJECT{
RANDOM {
SAY: What is an $object?
SAY: I understand there are many such $object's in Freeport.
SAY: Be less specific.
}
}
}

And if there could be object lookup too:

$OBJECT = BOTTLE

player says, 'What is a bottle?'

NPCTYPE_ID 4723 {
TRIGGER_TEXT:WHAT IS * BOTTLE{
LOOKUP: BOTTLE
}
}

Where LOOKUP: searches for

NPCTYPEID 4723{
MEMORY{
DEFINE: BOTTLE
AS: Something you bash with.
TYPE: ITEM
}
}

orc snow trooper says, 'Something you bash with'.

The idle chat might work in the same fashion. Essentially, you would setup a global idle chat per faction, race, zone, or whatever. Then, give the 65% answer from that file based on similar matching used above.

That, in a tiny nutshell, would largely duplicate much of what alice can do. And it would do so within the existing framework, which means not so many new changes and with an engine that already is known to work better than the buggy alice version.

Malevolent
05-02-2002, 03:05 AM
Edit: Added link to complete project

Malevolent
05-02-2002, 03:11 AM
Annoying file limit prevents me from uploading the scope of the project. So, download the core files and all the associated data files you'll need from my site (http://www.enkanica.com/data/files/AliceCPP.zip)

--MV