msg00910.html

1998Q4/msg00910.html · 8.0 KB

From the archive 1998Q4.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: Stack&#45;Based NPC AI -->
<!--X-From-R13: Dvpuneq Ibbypbpx <YnHveNqvny.cvcrk.pbz> -->
<!--X-Date: Sun, 6 Dec 1998 16:00:19 &#45;0800 -->
<!--X-Message-Id: 366B9A06.2D8F#dial,pipex.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 001501be2169$112e9220$1896ce80@greymud -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: Stack-Based NPC AI</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:KaVir#dial,pipex.com">
</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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00909.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00911.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00909.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00930.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00910">Author</A>
&nbsp;|&nbsp;<A HREF="#00910">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00910">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: Stack-Based NPC AI</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: Stack-Based NPC AI</LI>
<LI><em>From</em>: Richard Woolcock &lt;<A HREF="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</A>&gt;</LI>
<LI><em>Date</em>: Mon, 07 Dec 1998 01:04:06 -0800</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Eli Stevens (KiZurich) wrote:
&gt; 
&gt; [Emil Eifrem, Re: Spell components, chemistry and the like...]
&gt; &gt; I've never played on a mud that has an AI worth mentioning. :(
&gt; 
&gt; This statement (which was made some time ago, I should add) got me thinking
&gt; on ways to design a simple, yet powerful "tasking" (for lack of a better
&gt; word) system for a MUD’s mobs.  I had read on the web about using a stack to
&gt; simulate a mob’s priorities, and was wondering if anyone here had attempted
&gt; (successfully or not) to design/implement anything like what I describe below.
&gt; (Please note that I assume the MUD has a system in place for mobs to find
&gt; their way to a given room, mobile, or player.)

[snip example stack-based system]

The simplest solutions I've seen are purely state-based.  Each mob can be
in one of a number of states, each of which can lead on to other states.
Imagine an animal such as a wolf, for example:

Default:
   If being attacked, attack person back
   If hurt, lick wounds
   If thirsty, drink
   If hungry, eat
   If tired, sleep
When sleeping:
   If attacked, wake up (default state)
   If hungry or thirsty, wake up (default state)
   If no longer tired, wake up (default state)
When eating:
   If being attacked, attack person back
   If more thirsty than hungry, start drinking
   If no longer hungry, go back to default state
When drinking:
   If being attacked, attack person back
   If more hungry than thirsty, start eating
   If no longer thirsty, go back to default state
When fighting:
   If losing, try and run away

Once you have something simple like that in place, you can start
making the code a little more complex - the wolf might have to 
hunt down other animals for example, or perhaps she brings back
food for her pups.

The only advantage a stack-based system has over a state-based
system is that the former method allows mobs to 'remember'
situations they were previously doing and go back to them at a 
later point - but for animal-level intelligence, I don't think 
that would be necessary.

If you're planning immitation of human-level intelligence, your
greatest problem is going to be mob speech.  You could also
store the 'memory' as a list rather than a stack, so that things 
can be inserted - thus allowing mobs to plan things ahead (next
week, Bubba has to go and pay his Council Tax).

KaVir.


</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="00930" HREF="msg00930.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>
<ul compact><li><em>From:</em> Mik Clarke &lt;mikclrk#ibm,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00909" HREF="msg00909.html">[MUD-Dev] Stack-Based NPC AI</A></STRONG>
<UL><LI><EM>From:</EM> "Eli Stevens (KiZurich)" &lt;c718157#showme,missouri.edu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00909.html">[MUD-Dev] Stack-Based NPC AI</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00911.html">[MUD-Dev] Re: Stack-Based NPC AI</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00909.html">[MUD-Dev] Stack-Based NPC AI</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00930.html">[MUD-Dev] Re: Stack-Based NPC AI</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00910"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00910"><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>[MUD-Dev] Re: Introduction</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00973" HREF="msg00973.html">[MUD-Dev] Re: Introduction</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Wed 16 Dec 1998, 05:28 GMT
</LI>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00934" HREF="msg00934.html">[MUD-Dev] Re: Introduction</A></strong>, 
ApplePiMan <a href="mailto:ApplePiMan#aol,com">ApplePiMan#aol,com</a>, Tue 08 Dec 1998, 01:37 GMT
<UL>
<LI><strong><A NAME="00945" HREF="msg00945.html">[MUD-Dev] Re: Introduction</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Wed 09 Dec 1998, 07:15 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00909" HREF="msg00909.html">[MUD-Dev] Stack-Based NPC AI</A></strong>, 
Eli Stevens (KiZurich) <a href="mailto:c718157#showme,missouri.edu">c718157#showme,missouri.edu</a>, Sun 06 Dec 1998, 22:38 GMT
<UL>
<LI><strong><A NAME="00910" HREF="msg00910.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Mon 07 Dec 1998, 00:00 GMT
<UL>
<LI><strong><A NAME="00930" HREF="msg00930.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Mon 07 Dec 1998, 21:35 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00911" HREF="msg00911.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>, 
Mark Gritter <a href="mailto:mark#erdos,Stanford.EDU">mark#erdos,Stanford.EDU</a>, Mon 07 Dec 1998, 00:06 GMT
<UL>
<LI><strong><A NAME="00914" HREF="msg00914.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>, 
Par Winzell <a href="mailto:zell#alyx,com">zell#alyx,com</a>, Mon 07 Dec 1998, 01:18 GMT
<UL>
<LI><strong><A NAME="00925" HREF="msg00925.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>, 
David Bennett <a href="mailto:ddt#discworld,imaginary.com">ddt#discworld,imaginary.com</a>, Mon 07 Dec 1998, 20:03 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>

Site Stats

Snippets: 1791
Codebases: 571