msg00909.html

1998Q4/msg00909.html · 8.8 KB

From the archive 1998Q4.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Stack&#45;Based NPC AI -->
<!--X-From-R13: "Syv Egriraf (YvLhevpu)" <p718157Nfubjzr.zvffbhev.rqh> -->
<!--X-Date: Sun, 6 Dec 1998 14:38:11 &#45;0800 -->
<!--X-Message-Id: 001501be2169$112e9220$1896ce80@greymud -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Stack-Based NPC AI</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:c718157#showme,missouri.edu">
</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="msg00908.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00910.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00945.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00910.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00909">Author</A>
&nbsp;|&nbsp;<A HREF="#00909">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00909">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Stack-Based NPC AI</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: "Mud-Dev" &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev] Stack-Based NPC AI</LI>
<LI><em>From</em>: "Eli Stevens (KiZurich)" &lt;<A HREF="mailto:c718157#showme,missouri.edu">c718157#showme,missouri.edu</A>&gt;</LI>
<LI><em>Date</em>: Sun, 6 Dec 1998 16:37:54 -0600</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>
[Emil Eifrem, Re: Spell components, chemistry and the like...]
&gt; I've never played on a mud that has an AI worth mentioning. :(

This statement (which was made some time ago, I should add) got me thinking
on ways to design a simple, yet powerful "tasking" (for lack of a better
word) system for a MUD’s mobs.  I had read on the web about using a stack to
simulate a mob’s priorities, and was wondering if anyone here had attempted 
(successfully or not) to design/implement anything like what I describe below.
(Please note that I assume the MUD has a system in place for mobs to find 
their way to a given room, mobile, or player.)

Every mob would have a "base state" that makes them act a certain way when
they have nothing else on their to-do stack.  There would also be triggers
that would push a new to-do action onto the stack.  When that action was
finished, it would pop itself off of the stack, allowing whatever was
beneath it on the stack to be done.

Ex: A thief mob in a large city might have a base state of "wander
aimlessly" that would move the mob slowly from room to room.  One of the
triggers for the thief might be "when in the same room as a player (or mob,
if you don’t mind the NPCs robbing each other :)."  That trigger would then
push two actions onto the stack (in this order): "avoid player" and "rob
player."

The to-do stack would then look like this:
   -- top --
   rob player
   avoid player
   base: wander

Since the stack now says to rob the player, the mob would attempt to pick
the player's pocket.  Most likely, the thief would not want to hang around
the crime scene, so the mob would then attempt to move away from the player,
as per "avoid player."

A second trigger could fire "when attacked by a player/mob."  (Which would
most likely happen if the robbery failed/was noticed.)  This would push:
"kill player," "find player," "group friendly mob," "find friendly mob,"
"flee player."  The stack now looks like this:

   -- top --
   flee player
   find friendly mob  \ note that these could be repeatedly pushed to
   group friendly mob / find several friendly mobs
   find player
   kill player
   avoid player
   base: wander

To the player the situation looks like this: they walk into a room, and fend
off a prospective bandit.  The bandit would run away, only to reappear in a
few minutes with friends, who all try and beat the tar out of the player,
unless the player manages to kill the thief before the thief can get to
his/her friends.

---

It seems to me that with some imaginative coding, and careful thought
to the triggers and actions, a very realistic-ish world could be set
up...  Of course, if there are not enough triggers and actions, the
mobs might all act the same, but that's better than nothing, right?

Anyway, if anyone has any ideas or experience, I personally would be
interested in hearing about it, and I suspect that the list would too.

Silence is an empty stack
Eli - c718157#showme,missouri.edu

P.S.- This is my first post, can't you tell?  :)




</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="00912" HREF="msg00912.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>
<ul compact><li><em>From:</em> Marc Hernandez &lt;marc#ias,jb.com&gt;</li></ul>
<li><strong><A NAME="00911" HREF="msg00911.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>
<ul compact><li><em>From:</em> Mark Gritter &lt;mark#erdos,Stanford.EDU&gt;</li></ul>
<li><strong><A NAME="00910" HREF="msg00910.html">[MUD-Dev] Re: Stack-Based NPC AI</A></strong>
<ul compact><li><em>From:</em> Richard Woolcock &lt;KaVir#dial,pipex.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00908.html">[MUD-Dev] Re: mud client development systems</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00910.html">[MUD-Dev] Re: Stack-Based NPC AI</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00945.html">[MUD-Dev] Re: Introduction</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00910.html">[MUD-Dev] Re: Stack-Based NPC AI</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00909"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00909"><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>
<LI><strong><A NAME="00947" HREF="msg00947.html">[MUD-Dev] Re: Introduction</A></strong>, 
Caliban Tiresias Darklock <a href="mailto:caliban#darklock,com">caliban#darklock,com</a>, Wed 09 Dec 1998, 07:59 GMT
<UL>
<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>
</LI>
</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
</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