Estimating how tough a mob is

 
Post new topic   Reply to topic    mudlab.org Forum Index -> Design
View previous topic :: View next topic  
Author Message
Kjartan



Joined: 13 May 2005
Posts: 110

PostPosted: Fri Aug 11, 2006 9:31 pm    Post subject: Estimating how tough a mob is Reply with quote

We have a command (which I think we inherited from diku, although it has been completely redone several times) called "consider" which estimates for a player how he'll do in single combat with a mob. It essentially doesn't work. The problem is that we have very complicated mobs, a good fraction of them with scripts in our internal scripting language, and so it's nearly impossible to keep that command accurate.

I'm toying with the idea of instead basing the command on a history of how players of different power levels have done in the past against the particular mob. I would love to have the system automatically self-tuning like that: if it predicts wrong, you fight the mob and get slaughtered, and it tells the next guy about like you "oh, that's a really tough mob, watch out."

The biggest hurdle to that approach is figuring out how to characterize a player's power level. Even though we have a level-based system, we have a highly variable set of powers someone might have at a given level and so there's not a recorded or easily calculable number that represents how "big" a player is. So what I REALLY need is something that simultaneously judges the mob and the player. (And judging the player is extra tricky because he is always getting better, especially at low levels).

Has anybody implemented anything like this, or even just the mob half or just the player half, and if so how did it work, and what were your experiences?
Back to top
View user's profile Send private message Visit poster's website
Author Message
Sandi



Joined: 13 May 2005
Posts: 94
Location: Boston

PostPosted: Sat Aug 12, 2006 12:49 am    Post subject: Reply with quote

I'm working on something like that right now. It starts with the level comparison, and there's a second line that reflects the alignment. These two things impact the XP given. The level is adjusted +/- 2 for sanc, 1 for haste, slow, protect_good/evil, and it also measures the ratio of max to current HP.

As I say, it's a work in progress, but it seems to be helping. I'd also be interested in other ideas and opinions.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Molly O'Hara



Joined: 11 May 2005
Posts: 99
Location: Sweden

PostPosted: Sat Aug 12, 2006 6:52 am    Post subject: Reply with quote

I have done something that probably at least might be applicable, although it is a different approach. It is a script - (I am no coder) - that is set up to load a number of mobs adapted to the players strength, when they enter a certain room.

The script is quite simple, and just checks for the players level, tier and number of remorts. (We have a remort system with 4 tiers in each class, and the players grow in strength with each remort). The mobs can be tiered too, so I worked with both that and mob level. Obviously it isn't an exact science, and the script doesn't check for the players equipment, (which would be quite possible, but too much work for a lazy person like myself).

Anyhow, we've had a very large number of players with different stages of development test the mobs, and report 'too hard', 'just right' or 'too easy'. After we tweaked it a bit back and forth, about 90 percent reported 'just right', which I think is as close as one could expect. On a side note, it also revealed a slight unbalance between the classes, since almost all players that reported 'too easy' belonged to the spellcasting Classes. (Typically enough the players were already aware of the unbalance, and would report things like 'a bit too easy, but then again I'm a caster'.)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Author Message
elanthis



Joined: 13 Apr 2006
Posts: 10

PostPosted: Sat Aug 19, 2006 7:05 am    Post subject: Reply with quote

You might consider simply doing a basic mathematical analysis of the mob and the player.

What is their total HP? Armor? Average damage output per round? What types of damage can they cause and what kind are they resistant/susceptible to? For each special attack one of them has, compare it to the resistance the other has. Determine average damage output of that attack vs defense. For abilities which don't directly do damage, you can still apply them as if they did damage. A charm spell is effectively a one-shot "kill." A sleep spell might provide some fixed number of rounds worth of average damage output. etc.

There are even more ways you can play with these numbers to get a more accurate assessment. You can scale the damage output of an attack based on its liklihood of occuring (possibly based on learning), ammunition available, etc.

You then take the most powerful attacks each of the combatants has and average them out, possibly using the scaling as weighting for the average. You only want to average the most powerful attacks, because a smart AI or smart player is only going to use his best available attacks for that fight. Then you can use the combatants' HP with your newly found estimated average damage output per round to see how many rounds each combatant is expected to last, and use that to determine the odds of the mob winning and, hence, the difficultly level.

You can even tweak this system to support group combat. A dragon might be "impossible" for an adventurer, but only "moderately difficult" for that adventurer's party. In that case, you'd calculate each individual's chance of success while in the party while also calculating the whole party's chance of success. The party of four adventurers might have an overwhelming chance of winning but one of those adventurers might have a good chance of dying in the process.

There are plenty of tricky cases to cover in all of this, of course. Healing potions improve an individual's chance of survival, but do they all improve his team mate's chance? A group healer certainly improves everybody's survival rate.
Back to top
View user's profile Send private message
Author Message
clink



Joined: 12 Aug 2006
Posts: 9

PostPosted: Tue Aug 22, 2006 3:51 pm    Post subject: Reply with quote

We actually had an initial implementation of this type of calculation on my mud. It only worked for individuals and not groups. The difficulty we had was maintaining it while the mud is being enhanced. As new skills, spells, and mobs procs were added, it quickly became out of date. Not all coders knew it existed or that they should maintain it, or even how to maintain it.

Perhaps this was a design issue with the calculation architecture or a more fundamental flaw in the way the entire mud is coded, but ideally changes spell damage or new skills shouldn't require changing the difficulty calculation.

I have contemplated building a combat simulator, but you can imagine the complexity in that as successful tactics will vary significantly based on level and abilities of the player as well as the mob. What this might require is something similar to an AI that does trial and error to find the best strategy for a specific player/mob combination and then running it several times to see a success rate. The Mob AI thread has some interesting discussion I'll look into, but it is geared more toward creating interesting mobs rather than an optimized combat methodology.
Back to top
View user's profile Send private message
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Wed Aug 23, 2006 1:28 pm    Post subject: Reply with quote

elanthis wrote:
You might consider simply doing a basic mathematical analysis of the mob and the player.

What is their total HP? Armor? Average damage output per round? What types of damage can they cause and what kind are they resistant/susceptible to? For each special attack one of them has, compare it to the resistance the other has.


That'd be pretty cool, but there are three main problems I'd have with it.

The first is accuracy. It's very difficult to accurately judge the impact of each factor, and when there are thousands of different factors being taken into account it's quickly going to start becoming unreliable. Forget something, or make a couple of mistakes, and the whole system could get skewed.

The second is transparency. I like transparency when it comes to mechanics, but for fighting mobs I'd much rather let players learn the strengths and weaknesses of each opponent through personal experience.

The third is tactics. You can take into account pure mechanical statistics, but there's no way to judge the tactical skills of the players themselves. And when those skills play a large role in combat, there's no way to accurately judge the chances of each character except in extreme cases.

An approach I used in the past was to have the 'consider' command provide a list of different things - their health compared to yours, their damage compared to yours, their armour compared to yours, and so on, along with a summary at the end. This worked out okay for most cases, but did occasionally provide misleading information.

For my current mud, I simply allow people to view the numeric power level of their opponent, and design each mob to be on-par with a PC of the same strength. This means that different builds do better or worse against different opponents, but you can at least get a general indication of how strong an opponent is.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign