I have started a project to implement both "chat" and "control" of in-world NPC avatars in the opensim metaverse (TSim NPC Mate Genie).
The Genie project includes: "add-ons" for program-o, the AIML for program-o, and the in-world scripts for the controller of the NPC for opensim.
I have edited the standard program-o HTML for the "test your bot" function to emulate the in-world input to program-o. This is so testing can be done on the AIML without the need for having a running opensim environment. This snip-it of HTML can be used as a standalone web page for this testing.
The project gives the in-world USER the ability to use chat commands to have a NPC wearing the controller perform almost any activity a real avatar can do. The NPC is able to respond with chat and animated actions depending on the actual AIML implementation.
I will post the basic login AIML. This single AIML file added to any existing AIML should add the necessary login interface to implement additional AIML provided by the botmaster.
This is a work in progress, and should not be considered complete by any stretch of the imagination.
This implementation is not for the casual user as it requires more than a basic knowledge of the opensim environment and uses new tags within program-o.
I will be posting the opensim scripts on the opensim forum. That part of this project requires the program-o server to have this code implemented to work.
The basis of this AIML implementation is to allow a single set of AIML to control both multiple users and multiple avatars within a single set of AIML.
You only have to load one set of AIML into your root bot in program-o. The in-world experience will be multiple users, and multiple NPC's. Each USER can chat with multiple NPC's.
I have identified the memory retained by program-o based on the USER name and NPC name.
There are two ways to implement how you want your NPC memories to be realized in-world. You can have NPC and USER memory based on individual "USERS", or you can have each totally independent of one another.
Each implementation has it's own set of pro/con issues. The most obvious issue is when you make the NPC and USER autonomous, there is no way to prevent several instances of the same NPC existing in-world at the same time. This causes the memory of that NPC be constantly change for the USERS who are chatting with it. The NPC is "virtually" in multiple places at once which of course is impossible in the real world.
I prefer to have each NPC be unique for each USER which allows multiple USERS to have the same NPC rezzed in-world without this affecting the memories each USER experiences with the NPC. This creates the appearance that each NPC while looking identical is a unique individual NPC's.
At present, a NPC can only chat with one person at a time. This restriction is not caused by any technical reason but rather one placed by me while I figure out how to allow multiple in-world users to chat with a single NPC without causing the NPC to become totally confused with who it is actually chatting with. Each USER is remembered by the NPC, at present I only allow one USER to control a NPC at a time.
The type of implementation between USER/NPC memory is determined by the opensim script, but the AIML must be written to know which type of implementation has been chosen.
Let me give you an example of how the two differ. For this example we have USERA and USERB talking to their own NPC both of which is NPCA.
In the case of implementing individual NPC per USER, the NPC is able to have different memories for each USER, like for instance their favorite color could be different.
In the implementation of totally individual NPC and USER, the memories of the NPC are the same for both USERS. In effect the NPC is like another actual human USER in-world. The difference is that in-world it is impossible to have two USERS by the same name, but it is not impossible to have two NPC's of the same name.
You ask so how does this cause a problem. If I have a NPC called Bob Genie, and on some other region on any grid that is using the same program-o server, they have a Bob Genie NPC, we both use the exact same NPC memory. They are in two places at once.
I hope this project of using AIML to "chat" and "control" an NPC will be useful to others.
(Currently I am unable to add files to my posts for some reason. I will contact Dave to see why that is)
If you use this code, I would appreciate mentioning it was based on my work. Other than that, you are free to use it in any way you desire.
For you technical folks the following tag's have been added to the AIML set by this add-on.
<getgenie> <setgenie> <getuser> <setuser> <math> <newpattern>
The set tags are identical in usage to the existing set tag. The math tag allows for some basic math functions and the newpattern tag can be used in your global catchall to format a new category to use as a template to add a new response for that stimulus.
The file Genie Files.zip contains three zip files each containing the specific files for that function
Statistics: Posted by slow putzo — December 20th, 2014, 4:23 pm