We are extremely excited to officially announce phase one of our talking mob code. This code will make mobs respond to players using say, tell, and ask to make statements and questions in plain English. It works like this:

1. A player says something aloud in presence of a mob
usually in the form of a greeting, such as "Hi <mobname>" or "Hey <mobname"
2. The mob decides if it's being addressed
3. If yes, the mob translates what the player says to one of a long list of possible things a player might say, like "how are you?" or "where is <person>?".
4. Custom code generates the best response . Each question has many logical responses, such as "East", "Never heard of him" or "That's you."
5. Grammar generator creates a unique phrasing, so the mob might actually say "I think he lives to the east of here." or "I heard he was off to the east." It's quite possible to ask the very same question ten times in a row and get ten different answers.

We have put in some careful checking so that the mob can decide whether you are talking to it or to someone else, so it shouldn't butt into conversations between players.

The greatest aspect of this code is that the majority of the information that can be garnered from talking to mobs can be directly used inside of SlothMUD. Currently, new players to our game will get the most out of this feature but we are busy adding information that our veteran players will be able to use as well. We believe a few shining examples of the usefulness of this can be found in everyday questions that our players hear on gossip, such as “where can I get some water?”, or “can I get some food around here?”, or "where can I rent?". These questions can now be asked to creatures throughout the game and they will helpfully point the way, sometimes even giving you exact directions to the very location you need to travel! Piss off the wrong creatures with meaningless gibberish and you are likely to be killed!

This feature has been tied to our history database which tracks every mob and player’s movement throughout the game so questions such as “Have you seen Splork?” could possibly generate responses such as “He left a few minutes ago.” Or “He was just here a second ago.”

All said in done, this code can probably answer in the upwards of one thousand game related questions currently and we are expanding it every few weeks. One nice aspect of the code is that when speaking with a mob, a player can verse a question or statement in a variety of ways and the creature will normally gather the correct information and help direct the player correctly. An example of this would be a player mentioning that they are hungry or asking where they can buy food, the creature will get the basic idea of the question and direct the player accordingly.

This project has been in the works for nearly four years, with the initial emails regarding the topic originating on May 9th, 2006. Kjartan spearheaded the idea behind and developed the engine for which it runs on. The project consists of two separate but equally important parts: the code and the grammar files the code calls upon. This project involved a great deal of Immortal involvement but most notably besides Kjartan were Clink and Juggleblood on grammar, and Splork and Isabo with the code.

We have thoroughly tested this feature and it has been on the live machine for nearly three months now, though not widely announced. However, with any project of this magnitude, we do realize there will be some kinks to iron out. Please add any bugs that you may find to the bugs list and we will address them as quickly as possible. Hopefully, you will find this feature as interesting as we do.

An example of a brief conversation:
You say 'hi mayor'

The mayor of Lyme says 'It is a joy to see you.'

You say 'how are you today?'

The mayor of Lyme says 'I feel tired and all used up.'

You say 'im sorry to hear that'
You say 'do you know where the mage guild is?'

The mayor of Lyme says 'From here you walk south til you come to Statue.'
The mayor of Lyme says 'After that you go due east until you reach Entrance to Pleasure Gardens.'
The mayor of Lyme says 'And then go a short way north to High Street.'
The mayor of Lyme says 'Then head a smidge east to Guild of Mages.'

You say 'thank you'

The mayor of Lyme says 'Glad to help.'

You say 'im hungry'

The mayor of Lyme says 'You may obtain food nearby.'
The mayor of Lyme says 'First you go south til you come to Statue.'
The mayor of Lyme says 'After that you go east until you get to Entrance to Pleasure Gardens.'
The mayor of Lyme says 'Go north til High Street.'
The mayor of Lyme says 'That's the second such place.'
The mayor of Lyme says 'Finally, head a short distance west to Provisioner.'

Actually I was recently having a play with a chatbot - a separate program that logs on to a mud and holds limited conversations. This thing was already a rewrite of an older program when I first picked it up in the mid 90s, so it's pretty dated, but the underlying concept is fairly sound - it checks for a matching template (with wildcards), then if it doesn't find a match it picks a keyword, with different keywords having different weighings. The results are actually surprisingly good.

Regarding your version, the "have you seen *" -> "track *" approach is quite nice, but other than that the conversations seem pretty minimal, and rather inconsistant. For example when I inquired into the mayor's health, he gave a wide range of answers:

Quote:

You say 'how are you today?'
The Mayor Sir Virdo says 'Well, thank you.'
You say 'how are you today?'
The Mayor Sir Virdo says 'I'm injured, can't you see that?'
You say 'how are you today?'
The Mayor Sir Virdo says 'I am feeling weary.'
You say 'how are you today?'
The Mayor Sir Virdo says 'I'm not sure I will pull through this time.'
You say 'how are you today?'
The Mayor Sir Virdo says 'I have quite a bit of a headache.'
You say 'how are you today?'
The Mayor Sir Virdo says 'Well, my rheumatism has flared up something awful.'
You say 'how are you today?'
The Mayor Sir Virdo says 'I think I may be sunk this time.'
You say 'how are you today?'
The Mayor Sir Virdo says 'I may not make it.'
You say 'how are you today?'
The Mayor Sir Virdo says 'I am fine and dandy, thank you.'

Likewise, after a citizen offered to sell me some apples, my efforts to follow up on her offer proved fruitless (no pun intended):

It almost looks like she's trying to direct me to someone else to buy apples from.

It appears that many of the mobs use a default style of speech, as the 'oaf' proved just as polite as the female citizen when it came to answering me. I'm assuming this'll be expanded in later versions.

I like the general idea though, and may have a go at doing something similar at some point. My main concern would be that it might get spammy (when I played around with the chatbot it would try to talk to everyone).

Currently most mobs are set to default style "polite". There are only two types of tags currently, polite and rude. We plan on having species and alignment control much of the tag placements. Tags will also be placed on mobs according to how the player greets or does not greet a mob. Immortals can set the tag using a settag command. The grammar files have tags placed on the possible responses which trigger the appropriate one.

You can find quite a bit of documentation behind the idea at
http://sloth.greengatherings.com/index_files/Page386.htm . Maybe the documentation can be help to others who may try a similar idea. The question and answer part of the webpage is seriously outdated because we moved the site to our immortal wiki but it will give you a general idea of how we went about the project.

In regards to the woman selling apples, her moving shop is done with MUDL
(http://jason.dragoness.net/mudl/index.html) and we haven't quite figured out how to tie the two functions together yet so they do not work well together currently.

This is phase one of the project and we are slowly moving forwards into the finer aspects of it but it takes quite a bit of time. We believe the hard part is done with the custom creation of the speech parser, responder, and grammar. The rest shouldn't require quite as much effort...