<!-- MHonArc v2.4.4 --> <!--X-Subject: Parlez vous NPC? --> <!--X-From-R13: [ngg Qunggreyrl <znggNzcp.qla.zy.bet> --> <!--X-Date: Sat, 21 Mar 1998 02:49:36 +0000 --> <!--X-Message-Id: Pine.LNX.3.96.980321022634.2885A-100000#mpc,dyn.ml.org --> <!--X-Content-Type: text/plain --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Parlez vous NPC?</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:matt#mpc,dyn.ml.org"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00803.html">Previous</a> | <a href="msg00805.html">Next</a> ] Thread: [ <a href="msg00825.html">Previous</a> | <a href="msg00805.html">Next</a> ] Index: [ <A HREF="author.html#00804">Author</A> | <A HREF="#00804">Date</A> | <A HREF="thread.html#00804">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Parlez vous NPC?</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: Mud-Dev list <<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>></LI> <LI><em>Subject</em>: Parlez vous NPC?</LI> <LI><em>From</em>: Matt Chatterley <<A HREF="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</A>></LI> <LI><em>Date</em>: Sat, 21 Mar 1998 02:49:08 +0000 (GMT)</LI> <LI><em>Reply-To</em>: <A HREF="mailto:neddy#itl,net">neddy#itl,net</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> Richard Woolcock asked me to make a post about something I mentioned as an offhand comment while dissecting one of the more annoying advertisements posted to rec.games.mud.admin in some time. I made an allusion to NPCs capable of conducting semi-coherent conversations with players, without following predefined patterns, and not using strictly pre-set responses, but rather, creating their own replies. Sadly the system I have in practise is neither as advanced as this, nor functional (I improved it, thus, it doesn't work now), but, this is the design model to which I am working, and with the exception of the last point, the system worked. An overview: The NPC receives a sentence from the player. The method of delivery is arbitary (I used directed speech, aka: 'say NPC, this is a sentence for you.' but this could equally be done with a separate command). The NPC takes this sentence, and performs some basic tests on it, determining the subject matter, sub-topics, and the overall tone of the statement. This is the hard part. One simple way to go about it is by the use of topic and context dictionaries, a sample entry in which might be: Weather: Good: sunshine, dry, warm, pleasant, breezy Bad: blustery, cold, showers, snow, blizzard, rain, sleet, hail Thus, when our NPC is fed the sentence 'What do you think about the weather? All this snow makes me miserable, how about you?', it dismantles it into components: what, do, you, think, about, the, weather (question) all, this, snow, makes, me, miserable how, about, you (question) giving it three statements to deal with. Next we need to remove words which are of no value to us (for instance 'and', 'the', 'a' and so forth), leaving us with (writing from the NPCs point of view): 1. (directed at me) think about weather (question) 2. (directed at <player>) snow miserable (statement) 3. (directed at me) about (question) This incidentally shows up one flaw in the system - simple statement portions (such as #3 above), are mangled very badly and may no longer be useful. Anyway, to continue. The NPC takes each statement, determines the topic of discussion, the tone, and any subtopics: 1. Weather, neutral tone (question), give opinion For #2, snow is listed under 'weather: bad:' above thus, and 'miserable' might appear in a general dictionary of 'overall negative words' thusly: 2. Weather, bad tone (statement), none 3. Indeterminate, neutral (question), give opinion The precense of 'about' in #1 and #3 as well as 'think' in #1 allow the NPC to know that it is being asked a question (along with the rather obvious hint the ? symbol provides), and it is able to determine that it should give 'its opinion' (definition or determination of this is not important yet). #2 is more straight forward and provides it with more information about the situation it is in. If it groups this information, it has two clear groups: 1. Respond about weather (neutral tone). <Player> sees the weather as bad. 2. Respond (neutral tone). Since #2 has no subject, but the NPC knows it is attacked to <player>'s statement about the weather, it can determine that the player really wants: Respond about weather (neutral tone). <Player> sees the weather as bad, respond (neutral tone). This gives it two responses to make about the weather, which it can simplify to: <player> sees the weather as bad, respond (neutral tone). Since the player applies a negative tone, the NPC can add in the assumption that the weather really is bad: The weather is bad. What do I think? Which leaves us with the big question. How does the NPC respond? One way is by having an indexed set of responses (so multiple responses for each tone, within the weather, some generic, some specific, and so forth). Another is of course to be far more sophisticated and go for the fully dynamic build. Given that the information the NPC has is 'weather, bad', can it really build a sentence from a bank of words? This wordbank would have to be very sophisticated, giving linkages between words and topics, and so forth - this begins to cause us problems in terms of the base data required. However, if our miracle NPC knows we are discussing bad weather (or assumes - either is sufficient for now), it can tie together a very simple 'test' sentence, and simply reply: "I think the weather is bad." That isn't terribly impressive given all this effort, is it? Mind you, if you begin to construct a suitable databank, and include methods for the NPC to teach itself, who knows what one could achieve? By implying that it might teach itself, I really mean creating a very sophisticated parrot like entity. "NPC, this snow is horrible, it sucks!" and later, we receive NPC: "I think the weather sucks.", because it is able to make the following connections: snow -> sucks horrible -> sucks There are still a thousand and one problems which I have deliberately not described (I wanted to put across the system outline in a basic fashion, plus I'm very tired). The obvious problems are actually amongst the hard ones to solve, and I await your blowtorches. :) -- Regards, -Matt Chatterley Spod: <A HREF="http://user.super.net.uk/~neddy/spod/spod.html">http://user.super.net.uk/~neddy/spod/spod.html</A> </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <ul compact><li><strong>Follow-Ups</strong>: <ul> <li><strong><A NAME="00869" HREF="msg00869.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong> <ul compact><li><em>From:</em> Nathan F Yospe <yospe#hawaii,edu></li></ul> <li><strong><A NAME="00805" HREF="msg00805.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong> <ul compact><li><em>From:</em> Vadim Tkachenko <vt#freehold,crocodile.org></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00803.html">Re: [MUD-Dev] Net protocols for MUDing</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00805.html">Re: [MUD-Dev] Parlez vous NPC?</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00825.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00805.html">Re: [MUD-Dev] Parlez vous NPC?</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00804"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00804"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><strong><A NAME="00809" HREF="msg00809.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 21 Mar 1998, 18:10 GMT <UL> <LI><strong><A NAME="00813" HREF="msg00813.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Sun 22 Mar 1998, 12:46 GMT </LI> </UL> </LI> <LI><strong><A NAME="00808" HREF="msg00808.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 21 Mar 1998, 17:58 GMT <UL> <LI><strong><A NAME="00825" HREF="msg00825.html">Re: [MUD-Dev] Dynamic Loading of Modules</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 22 Mar 1998, 19:31 GMT </LI> </UL> </LI> <LI><strong><A NAME="00804" HREF="msg00804.html">Parlez vous NPC?</A></strong>, Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Sat 21 Mar 1998, 02:49 GMT <UL> <LI><strong><A NAME="00805" HREF="msg00805.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Sat 21 Mar 1998, 04:26 GMT <UL> <LI><strong><A NAME="00807" HREF="msg00807.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Sat 21 Mar 1998, 13:12 GMT </LI> </UL> </LI> <LI><strong><A NAME="00869" HREF="msg00869.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, Nathan F Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 24 Mar 1998, 03:39 GMT <UL> <LI><strong><A NAME="00892" HREF="msg00892.html">Re: [MUD-Dev] Parlez vous NPC?</A></strong>, Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Wed 25 Mar 1998, 08:37 GMT </LI> </UL> </LI> </UL> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>