23 Oct, 2009, elanthis wrote in the 101st comment:
Votes: 0
Quote
Is the air sufficiently oxygenated up there on that pedestal you've constructed? :wink:


Hey, this is why I do what I do. I really believe games to be the ultimate art form. I stand up on my pedestal and laugh at all the other arts. Possibly throw things at them.

Quote
There is certainly a lot of value, but unfortunately I think that value is diluted slightly by the post length. (Hope you don't take this badly, it's not meant to cause offense; just meant as a remark in passing to improve the quality of posts with some very interesting content buried in them.)


I blame the Tanqueray. I get rambly. You can tell how sober I am now, though, given how I'm cutting this post sho
23 Oct, 2009, David Haley wrote in the 102nd comment:
Votes: 0
quixadhal said:
I suspect many players would rather fight a smaller number of clever opponants, rather than wading through thousands of stupid mobs that throw themselves on your swords.

If the number of opponents is small, then we don't really have to worry about modeling all these creatures running all over every village, now do we? :wink:

quixadhal said:
True, however if your mob loses the fight, he won't be buying a loaf of bread later that day. If he doesn't, maybe nobody will and the baker will have a surplus. He might choose to throw the stale bread out, making some vagrant live through the night, or he might choose to sell it at half-price tomorrow. He might just take it home, or grind it into crumbs, eating the loss and raising his prices tomorrow.

You're confusing complexity of choices available with the size of the search space. Every scenario you just described can be captured quite succinctly.

If you want to fully model an agent's entire thought process, you are arguably creating an entirely different kind of game. Also, I still don't believe it's necessary to go to this level of detail, especially when people won't even notice the difference.

It sounds to me like what you really want is AI agents that fully capture all aspects of human desires, thought processes, and so forth, at which point you are essentially asking that the entire AI problem be solved. Well, sure, but maybe that's beyond the scope of this discussion. :wink:

Sandi said:
On the other hand, I'm hovering around .01% CPU use right now, and since my current account allows .1%, I could increase the realistic behavior of the mobs considerably if I wished to do so without any actual cost.

Zero point zero one percent? On a 3 GHz processor, that's 300,000 cycles per second, or less than a 1 MHz processor. Did you really mean 0.01% or 1%?

elanthis said:
Hey, this is why I do what I do. I really believe games to be the ultimate art form. I stand up on my pedestal and laugh at all the other arts. Possibly throw things at them.

It's too bad that loving what you do entails denigrating and insulting everything else… :shrug:
23 Oct, 2009, Mudder wrote in the 103rd comment:
Votes: 0
David Haley said:
It's too bad that loving what you do entails denigrating and insulting everything else… :shrug:
He was making a joke, lol. Besides that IS the American way, isn't it? :tongue:
23 Oct, 2009, Cratylus wrote in the 104th comment:
Votes: 0
Mudder said:
David Haley said:
It's too bad that loving what you do entails denigrating and insulting everything else… :shrug:
He was making a joke, lol.


o hai u must be new here

u don't have to explain elanthis to davidhaley

;)
23 Oct, 2009, Sandi wrote in the 105th comment:
Votes: 0
David Haley said:
Sandi said:
On the other hand, I'm hovering around .01% CPU use right now, and since my current account allows .1%, I could increase the realistic behavior of the mobs considerably if I wished to do so without any actual cost.

Zero point zero one percent? On a 3 GHz processor, that's 300,000 cycles per second, or less than a 1 MHz processor. Did you really mean 0.01% or 1%?


:redface: :redface: :redface:

I can't even blame being tanked. Yeh, .1% and 1%
23 Oct, 2009, Mudder wrote in the 106th comment:
Votes: 0
Cratylus said:
o hai u must be new here

u don't have to explain elanthis to davidhaley

;)

:sad:
23 Oct, 2009, David Haley wrote in the 107th comment:
Votes: 0
Sandi said:
David Haley said:
Sandi said:
On the other hand, I'm hovering around .01% CPU use right now, and since my current account allows .1%, I could increase the realistic behavior of the mobs considerably if I wished to do so without any actual cost.

Zero point zero one percent? On a 3 GHz processor, that's 300,000 cycles per second, or less than a 1 MHz processor. Did you really mean 0.01% or 1%?


:redface: :redface: :redface:

I can't even blame being tanked. Yeh, .1% and 1%

That makes me feel better! I was thinking that you must have the world's most draconian hosting service ever. :smile:
23 Oct, 2009, quixadhal wrote in the 108th comment:
Votes: 0
David Haley said:
quixadhal said:
I suspect many players would rather fight a smaller number of clever opponants, rather than wading through thousands of stupid mobs that throw themselves on your swords.

If the number of opponents is small, then we don't really have to worry about modeling all these creatures running all over every village, now do we? :wink:

SOME people like to have mobs that are NOT opponents. :wink:

Besides, if you let the AI control the mobs, you can't say if they're opponents or not, until the player encounters them and they decide. :)

David Haley said:
If you want to fully model an agent's entire thought process, you are arguably creating an entirely different kind of game. Also, I still don't believe it's necessary to go to this level of detail, especially when people won't even notice the difference.

That's kindof the point. There are waaaaay too many kill-everything-that's-targetable and sit-around-until-reset MUDs. Waaaaaay too many of them. A small number step outside the box in some ways, and a very few really stretch. AI is one of the fields that has been exercised the least in multi-player gaming, and it would be nice to see that change. Continuing to follow the tried-and-false concept of simulating the details wherever possible just gives us more of what we've already got, with prettier curtains.

You had mentioned choices vs. search space earlier. The number of choices *IS* what determines the size of the search space. A pawn only has four choices… it can stay where it is, it can move forward one square, it can capture diagonally, or it can capture en-passent if it's in the right place. Does that mean you don't need all 8 pawns? Why not just simulate them?

Oh yeah, it's because the interaction between ALL the pieces and their positions on the board is what makes the game interesting! Likewise, the outcome of a single fight only has a small impact on the world, but the actions of hundreds of mobs and dozens of players on a sufficiently dynamic world should be interesting too.

David Haley said:
It sounds to me like what you really want is AI agents that fully capture all aspects of human desires, thought processes, and so forth, at which point you are essentially asking that the entire AI problem be solved. Well, sure, but maybe that's beyond the scope of this discussion. :wink:

Yeah, could I get bagels with that too?

Nah, I don't need them trying to take over. But, a nice goal-oriented system with sets of available actions whose weights are adjusted based on both local and regional conditions would be a good starting point.
23 Oct, 2009, David Haley wrote in the 109th comment:
Votes: 0
quixadhal said:
SOME people like to have mobs that are NOT opponents. :wink:

Besides, if you let the AI control the mobs, you can't say if they're opponents or not, until the player encounters them and they decide. :)

Umm, ok. I was just responding to your comment about wanting smart opponents, which is why I was speaking about opponents…

quixadhal said:
You had mentioned choices vs. search space earlier. The number of choices *IS* what determines the size of the search space.

No. Search space is determined by branching factor and depth. Having twenty options but only two decisions to make gives you a much smaller search space than 6 options with 6 decisions to make (more precisely, 400 vs. 46,656).

And this search space math assumes that all decisions are completely independent. Many of the examples you gave rely on rather independent choices, so the search space (as you have so far given it) is actually very small. If several actions can be performed independently of order, then what might seem like a huge space can be in fact much smaller, as you recognize that you are examining a state that you already know about.

The "effective size" of the search space can also be vastly reduced with intelligent heuristics. The problems you've given so far – at least the ones likely to be hard to solve in the first place – have fairly well-known heuristics.

quixadhal said:
But, a nice goal-oriented system with sets of available actions whose weights are adjusted based on both local and regional conditions would be a good starting point.

You have yet to describe a model that is daunting in terms of search space size. I have written silly planners for homework assignments that can tear through large planning problems. An example is air traffic control: this is far more complicated than an individual's decisions to make with a relatively limited set of actions, simply because the planner here has to control a ton of agents and each one's action set, and the problem is very interdependent.

Frankly, I think the real problem here is figuring out what we want, and maybe implementing an efficient planner (this requires some moderately advanced comp sci knowledge, to understand the theory behind planners and how to implement them efficiently). You seem to be describing some pipe dream of incredibly intelligent NPCs, but you don't seem to have specific examples of problems that are in fact very complex to solve from a computational perspective.

Anyhow, the point here is twofold:
1. CPU bounds are the least of your worries when you don't know what you're trying to model in the first place.
2. Interesting behavior – as far as players can tell the difference – can be produced without terribly complicated models.
23 Oct, 2009, Mudder wrote in the 110th comment:
Votes: 0
I'm psyched up. I would love to see this sort of system in a MUD. Preferably the more complex one quixadhal is talking about. I know at least 5 people that would immediately leave their current MUD home for something like this and I'm certain there are many many more if it was done well.

But where would one start? Would either of you be willing to jot down a crappy example of a simple AI?
24 Oct, 2009, Tonitrus wrote in the 111th comment:
Votes: 0
Personally, I love the thought of "realistic" behaving mobs, however, I'm not sure all of this discussion is necessary. People only behave in complex predictable patterns if you know all the details that influence their decision. Meaning that, as a rule, people behave more or less randomly within certain constraints. In my designs for such a system, that's more or less how I intended to implement it. Give them the ability to track who and what they like or don't like, realistic systems to affect their tendencies to do things, then randomize within those constraints. The thrown out baker's bread mentioned by someone earlier (I'm too lazy to check) is only of value if a wandering vagrant happens upon it, which is a random possibility. If the baker randomly throws out bread, that's easy to do. If the vagrant randomly eats items off the ground, that's easy to do. If the vagrant randomly wanders, that's also easy to do. It's also easy to track inventory and vary prices based off inventory. It's also easy to do things like if( hunger ) > STARVING scavenge_off_ground( ); and so on. Anything your players can't directly witness is a waste of processor time and memory. Just track tendencies and smudge the rest.
24 Oct, 2009, Runter wrote in the 112th comment:
Votes: 0
Mudder said:
But where would one start? Would either of you be willing to jot down a crappy example of a simple AI?


What can't be said enough is that an AI for the most part just has to appear intellegent. It doesn't actually have to be. And it doesn't even have to appear that intelligent and it's largely based on your gameplay mechanics. For example, AI in chess doesn't encompass anything but playing the board. Whereas a muds AI is different. Yeah, you could try to do some overarching model of each character. You could try to model a world with hundreds of thousands of entities. Or you could do what most muds do and have a small sample world, and simple AIs that encompass tracking, engaging, fleeing, strategy formulation and minor behavior as related to other actors.
24 Oct, 2009, David Haley wrote in the 113th comment:
Votes: 0
Yes, that is correct. Players will see effects of AI "thought processes", not the thought processes themselves. Modeling those thought processes can be interesting in and of itself, but at that point you are not so much building a game as conducting an experiment in AI. Either approach is a perfectly fine, but it's important to realize which one you're really interested in pursuing: don't conduct AI experiments thinking that you're advancing your game idea, unless those experiments are indeed directly related to the game. Chances are, the game is far more interested in effects that can be captured with tendencies, instead of minute decision making processes, as Tonitrus said.
24 Oct, 2009, Mudder wrote in the 114th comment:
Votes: 0
Personally I'm interested in the more advanced form for the reason that I want to learn more about it. Obviously since I don't even know where to begin in this, I would have to start small and work my way up. Just the concept is awesome.
24 Oct, 2009, Sandi wrote in the 115th comment:
Votes: 0
First, a brief rant on the fallacy of comparing chess AI to MUD AI. Unlike Chess, MUDs are not games of prescient strategy. This is not to say MUD players don't have a strategy, but like RL generals, their strategy is wide and loose and allows for dealing with a great deal of randomness. There are no random moves in a master level chess game. Even if you make a random move, the master knows it's outcome. This is why chess programs need supercomputers (even if they fit on a desktop these days). Chess masters are perhaps idiot savants. It is certain their brains are capable of specialised feats of pattern recognition that are beyond the ken of mortal men. MUD players do not study games played a 100 years ago.


Tonitrus said:
Personally, I love the thought of "realistic" behaving mobs, however, I'm not sure all of this discussion is necessary. People only behave in complex predictable patterns if you know all the details that influence their decision. Meaning that, as a rule, people behave more or less randomly within certain constraints. In my designs for such a system, that's more or less how I intended to implement it. Give them the ability to track who and what they like or don't like, realistic systems to affect their tendencies to do things, then randomize within those constraints.

I wrote a weather system for a MUSH set in Maine. It was fun because New England weather is famously unpredictable, yet it obviously does obey the laws of physics and follow patterns. A player who lived in Maine reported that my weather system more reliably portrayed the weather she saw outside than the National Weather Service did. The method I used I dubbed "constrained randomness".

Mudder said:
But where would one start? Would either of you be willing to jot down a crappy example of a simple AI?

As requested, here's a crappy example of simple AI:
/* fear - scared mobs fight or flee  - Fallon  01.09 */
void fear_update( void )
{
CHAR_DATA *ch;
CHAR_DATA *ch_next;
CHAR_DATA *rch;
CHAR_DATA *rch_next;
CHAR_DATA *victim;
EXIT_DATA *pexit;
OBJ_DATA *obj;
OBJ_DATA *obj_next;
int door;


/* examine all mobs */
for ( ch = char_list; ch != NULL; ch = ch_next )
{
ch_next = ch->next;

if ( !IS_NPC(ch) || ch->in_room == NULL || ch->in_room->area->empty
|| ch->position != POS_STANDING || IS_AFFECTED(ch, AFF_CHARM) )
continue;

/* see if there's scary stuff around */
for ( obj = ch->in_room->contents; obj; obj = obj_next )
{
obj_next = obj->next_content;

if ( obj->item_type == ITEM_CORPSE_PC
|| obj->item_type == ITEM_CORPSE_NPC )
{
/* bodies that look like your own, very scary! */
if ( obj->race == ch->race )
{
ch->fear += 40;
}
else
ch->fear += 20;
}
/* body parts (food on the ground tends to be legs) */
if ( obj->item_type == ITEM_FOOD )
{
ch->fear += 10;
}
}

for ( rch = ch->in_room->people; rch != NULL; rch = rch_next )
{
rch_next = rch->next_in_room;

if ( (victim = rch->fighting) != NULL && can_see(ch, victim) )
{
/* big mobs scare little ones */
if ( victim->level > ch->level + 5 )
ch->fear += 35;
else
ch->fear += 20;

/* fight (check for assist) */
if ( ch->fear > 110 && number_range(1, 6) < 2
&& !IS_SET(ch->act, ACT_WIMPY)
&& victim->level < ch->level + 2
&& victim->level > ch->level - 4 )
{
do_function(ch, &do_emote,
"`Yshrieks in anger and joins the fight!`x");
multi_hit(ch, victim, TYPE_UNDEFINED);
break;
}
}
}

/* flee (based on wander_flag_update) */
if ( !IS_SET(ch->act, ACT_SENTINEL) && ch->position == POS_STANDING
&& ch->fear > 80 )
{
door = ch->door;
if ( door )
{
if ( (pexit = ch->in_room->exit[door]) != NULL
&& pexit->u1.to_room != NULL
&& !IS_SET(pexit->exit_info, EX_CLOSED)
&& !IS_SET(pexit->u1.to_room->room_flags, ROOM_NO_MOB)
&& ( !IS_SET(ch->act, ACT_STAY_AREA)
|| pexit->u1.to_room->area == ch->in_room->area )
&& ( !IS_SET(ch->act, ACT_OUTDOORS)
|| !IS_SET(pexit->u1.to_room->room_flags, ROOM_INDOORS) )
&& ( !IS_SET(ch->act, ACT_INDOORS)
|| IS_SET(pexit->u1.to_room->room_flags, ROOM_INDOORS) ) )
{
move_char( ch, door, FALSE );
}
else
ch->door = number_range( 0, 5 );
}
else
ch->door = number_range( 0, 5 );
}

ch->fear = ch->fear * 2 / 3;
}

return;
}

What this does is increase the 'fear' of mobs when they see corpses and body parts or there is a fight going on in the room. If the mob's 'fear' reaches a certain level, they wander off. While subtle, it does keep mobs from seeming to be unaware of their surroundings. It never made sense to me that you could slaughter a cute bunny and the others in the room would set there chomping their carrots waiting their turn. So, with this code, if you walk into a crowded room and start a fight, when you're done the room is likely to be empty. There's also a bit that makes mobs panic and wildly attack if they can't wander off.
Feel free to use it as you wish.


Runter said:
What can't be said enough is that an AI for the most part just has to appear intellegent. It doesn't actually have to be.

So let's say it again. There's even a school of thought that maintains our own actions are randomised reactions, and our "sense of self", our "personalities", are just rationalisations of perceived patterns.

If the text scrolling down the page tells the player the mob does something, the player will assume the mob is behaving rationally as long as all mob behavior appears reasonably rational. The trick, really, is to keep the mob's behavior from being obviously random. If you can achieve this, the player will assume intent.
24 Oct, 2009, Mudder wrote in the 116th comment:
Votes: 0
I see. This affects all mobs, but you could easily change things around so it effects only a certain mob type for example human race only.

Where would you recommend this sort of thing be placed? I assume you wouldn't want it to be run too much. Would a system that sorts through all individual mobs be a waste of CPU? Maybe not smaller MUDs but what about larger ones? Are there more "efficient" ways of doing this?

Maybe using an event system to trigger it?

Yes I am asking a lot of, probably newbie, questions but well… This is pretty cool and definitely something I want to get a handle on so I can try to use it. Thank you Sandi.

Runter said:
(removed a lot of text)Or you could do what most muds do and have a small sample world, and simple AIs that encompass tracking, engaging, fleeing, strategy formulation and minor behavior as related to other actors.

No offense, but the reason I am here is to avoid doing what most MUDs do. I want to develop a MUD because I feel most MUDs don't meet my expectations as a player. Though I do get your point and it is noted. :grinning: (For some reason I sense I am being a douche as I write this… I don't want to convey that. I appreciate every reply to one of my posts and also value all of your input)
24 Oct, 2009, David Haley wrote in the 117th comment:
Votes: 0
Mudder said:
Personally I'm interested in the more advanced form for the reason that I want to learn more about it.

Part of my point was that you should not be placing these two schools of thought on the same linear axis going from less to more complicated. They're simply different; they are trying to model different things. One tries to model the internal thought processes of mobs, and the other tries to create a desired set of effects in such a way that players find it plausible.

For a game's players, there is no point modeling something that they cannot see.

Mudder said:
Would a system that sorts through all individual mobs be a waste of CPU? Maybe not smaller MUDs but what about larger ones? Are there more "efficient" ways of doing this?

Many MUDs already have a loop that goes through every single mob every combat round, or every few combat rounds, that controls things like wandering around and so forth. So it's not as expensive as you might think to process every mob, and furthermore Sandi's code doesn't involve anything too terribly intensive. (You could optimize it in various ways, but you might not even need to.)

That said, many games have a notion of "AI distance" which is a distance between an NPC and a player beyond which you no longer process that mob's AI. The idea is, as above, that there's no point simulating all this stuff on your NPC if nobody is around to see it. This lets you chop your processing times considerably.

EDIT:
Mudder said:
No offense, but the reason I am here is to avoid doing what most MUDs do. I want to develop a MUD because I feel most MUDs don't meet my expectations as a player.

There is a difference between wanting to be different for the sake of being different, and understanding exactly why things were done in a given way so that you can very carefully do things your own way. There is a lot of knowledge floating out there, and even if you don't like a lot of what you see, you should be a little careful in rejecting it until you understand why the decisions were made. Some decisions out there are indeed poor ones without much justification, and other decisions were made carefully but with reasons lost to the mists of time.
24 Oct, 2009, Runter wrote in the 118th comment:
Votes: 0
There's no fallacy in my "comparison" of chess to muds. I was clearly drawing a distinction between the two and many other types of AIs. The fact of the matter is, the only fallacy here, is the idea that all muds are completely similar. Which doesn't even remotely have to be the case. There are muds where they may not be combat based. This makes AI a particularly different problem. As it was a different problem with a chess AI.

Eh, but I think the point I'm trying to get across is the AI doesn't even have to encompass "the way a player would react." For some reason we're delving into discussion about emotions and feelings and thought process from the perspective of a human. It's not only possible but common that AIs represent abstract mechanics in a game in an omnipresent way. It's also possible in a game that nothing playable is represented by something being alive or the decision process of a living being. Which is what my original comparison was all about. Your game may not be the status quo typical MUD and the gameplay could use a more specialized AI for your specific combat system. (Or if there's no combat, whatever challenging metagame you play.)
24 Oct, 2009, Mudder wrote in the 119th comment:
Votes: 0
David Haley said:
Mudder said:
No offense, but the reason I am here is to avoid doing what most MUDs do. I want to develop a MUD because I feel most MUDs don't meet my expectations as a player.

There is a difference between wanting to be different for the sake of being different, and understanding exactly why things were done in a given way so that you can very carefully do things your own way. There is a lot of knowledge floating out there, and even if you don't like a lot of what you see, you should be a little careful in rejecting it until you understand why the decisions were made. Some decisions out there are indeed poor ones without much justification, and other decisions were made carefully but with reasons lost to the mists of time.


Fair enough. I probably misrepresented my train of thought when I typed that. I agree entirely, I would like to take the best ideas and use them, throwing out the ones that do not make sense (for at least what I want to accomplish). So certainly I am open to ideas and I definitely want to know why people do what they do. Then using these reasons decide whether they fit in with the above(best idea vs nonsensical vs my goals)

At the moment one of the goals I have is a seemingly realistic environment. MOBs that stand there with like a retard is not something I am after, but mobs that truly seem to have a life, mind, and goals of their own. I freely admit I am unable to currently do something like this so I plan on learning how to do the basics and moving up from there to the more complex systems. Yes they are likely very different models but learning one well would certainly lend itself to understanding how to create the more complicated one. I'm just trying to work with what I've got here. :)

The end goal I would have(and admittedly it is probably unrealistic, but you start with the goal and move to something workable and practical as you approach it) is a system like quix's - where players might even feel as if being drowned in the vast sea of the world. Where mobs seem as real as PCs and could possibly be playing a vastly complicated MUD by themselves and not even realize it.

My vision for the world I intend to create, as discussed in the development thread, is "Realistic Fantasy."
25 Oct, 2009, Sandi wrote in the 120th comment:
Votes: 0
Runter said:
There's no fallacy in my "comparison" of chess to muds. I was clearly drawing a distinction between the two and many other types of AIs.

Exactly, and that's why I quoted you later on. You're absolutely right. My rant was in response to the earlier discussion about CPU requirements.
100.0/130