Trending Games | ArcheAge | Pirate101 | Wasteland 2 | WildStar

  Network:  FPSguru RTSguru
Login:  Password:   Remember?  
Show Quick Gamelist Jump to Random Game
Members:2,857,996 Users Online:0
Games:742  Posts:6,243,537

Show Blog

Link to this blogs RSS feed

The Quinquennial (or sometimes more often)

Various thoughts on online gaming, often pulled from articles I've written for other sources.

Author: Quizzical

Outsourcing the AI

Posted by Quizzical Tuesday January 6 2009 at 9:48PM
Login or Register to rate this blog post!

In a lot of games, mobs are theoretically trying to kill you. In many of them, it doesn’t really feel like they’re trying to kill you. Often, it seems more like they’re going through the motions of pretending to put up a fight before they die, and trying to be manipulated into doing something stupid.

There are reasons for this, of course. PvE content is generally meant to be beaten. But mobs often die in such stupid and predictable ways that it seems that they’re not taking their job seriously.

Perhaps the biggest attraction of PvP is that it feels like the other players really are trying to kill you. That is, of course, because they are. Other players are often smart enough to learn from mistakes and vary their tactics.

The answer, of course, is smarter and less predictable AI. It’s not easy to randomly conjure up better AI, however. The question isn’t whether to improve the AI, but how.

My answer is to let the players design the AI. At first glance, that probably sounds absurdly impractical. I’ll concede that it would be difficult to pull off. Let me explain how I think it can be done.

Each mob in a typical MMORPG has some AI associated with it. This controls how the mobs react. This can include what makes them decide to attack, what makes them give up and leave, which attacks they use, when they use each attack, how they choose which player to target, and a variety of other factors.

A company presumably has some internal tools to set up the parameters for each mob or linked group of mobs. What the company could do is to allow a huge number of AI parameters, and then allow players to fill in particular values for various mobs or groups of mobs. Each mob could have not just a fixed set of skills, but several skills available from which players could pick which few particular skills the mob will actually have available.

Let players set parameters and then try a sample fight against the mobs in a separate before submitting the parameters. That’s essential in letting players figure out which parameters do what, and learning how to give the mobs AI that works reasonably well.

Make it so that there is a considerable cost (in the in-game currency, henceforth “gold”) to submitting an AI for mobs. That will prevent players from randomly submitting a bunch of stupid AI parameters to make mobs ridiculously dumb.

Conversely, reward players for writing successful AI. Each time a mob kills a player, give a small amount of gold the player who wrote the AI that that particular mob used. Make it enough that the amount of money paid out for each particular type of mob is the same as the amount players paid in to create the AI. (This may require dynamically adjusting both the cost of submitting an AI and the payout for killing players with it, both of which would vary from one mob to another, but I won’t bore you with particular formulas.)

The AIs that mobs use in a particular period of time should be the ones that were relatively successful in the previous period of time, as well as any new ones created in that time. Thus, a player who finds ways to make the mobs fight effectively could have his AI stay around for a long time. One that only leads to mobs dying and never killing anything could quickly be removed from the system. Not only would players be rewarded for building a smart AI, but the mobs that players in the game fight would mostly use the better AI parameters that players had come up with.

There are two different reasons to take this approach. The first has already been discussed: smarter and more varied AI. If, when you approach a mob, it has 20 different AIs written and you don’t know which it will use, that makes the mob far less predictable. Players wouldn’t know whether mobs will chase them, hold their ground, or even try to kite the player. Neither would they know which particular skills the mob has, nor the timing with which it will use which skills. For group content, players wouldn’t know which group member(s) the mobs will target. Even after fighting mobs, all of those parameters could be totally different the next time the player fights identical looking mobs. Having to react on the fly to mobs doing unexpected things would give more of a PvP feel to PvE content.

The other reason is that writing AI would itself be an interesting subgame to certain players. Most players would lack the aptitude to write intelligent AI, of course. Many of those that remain would lack the interest. Still, trying to kill players as mobs would be a challenge rather different from anything else on the market. If done right, there would be a relative handful of players who really liked it. That is all it takes to write more AI than the game needs.
 

ghstwolf writes:

Interesting idea, and at the very least something different from the "normal" MMO experience.

This could be challenging to implement for a theme-park style game, especially if doing it became popular.  I only say that because IMO AIs would need to work together.  If Mob A runs to Mob B for help but because of different AIs Mob B doesn't aggro what was the point?  Unfortunately I can see that being something common place under this system.

OTOH, in any game where players fight for and defend territory, I think this would be a very welcome addition though slightly modified.  For this a guild could assign AIs to various defensive structures or NPCs anywhere they control.  Maybe a small fee for "training" but the reward would be that a well programed NPC is less likely to die (saving the cost of replacing them).  The previously mentioned problem is now gone because a single party controls the AI for an area.

Tue Jan 06 2009 10:29PM Report
Quizzical writes:

Anytime there are mobs that are linked to each other and intended to fight together, it would be a single AI set all written by one person that controls the entire group of mobs.

On the other hand, players would have no means to make the AI go grab additional mobs outside of the small set of linked mobs.  Otherwise, the optimal strategy would be to make everything in the entire zone all zerg one player all at once.

I do think this could work just fine in a "theme park" game.  Indeed, that's largely what I had in mind when writing the post.  If a quest tells you to go kill five groups of furbolgs, each group might have been assigned a different AI, and thus react differently when you approach and attack.  Each group would have no impact on the other groups, and no way to summon the others for aid.

Wed Jan 07 2009 12:50AM Report
ghstwolf writes:

Aw I actually liked places where the last member of a mob group would run off to get help.  Or even when each of them did so independently after some trigger (<30% health for example) was reached.  Then again, I guess you could use a kite command in the AI to nearly accomplish the same thing.

Wed Jan 07 2009 1:56AM Report
zelldevil writes:

although i agree with you on the fact that AI generally blows, your idea would ruin games

Wed Jan 07 2009 2:30AM Report
craynlon writes:

i think pvp cant really be compared with pve

i remember lineage 2 pvp where i chased / or got chased by my opponent over very wide distances using trees and bolders to break the line of sight, shouting in vent for my guildies to mass up/ teleport to location x. also i took into considderation the equipment, class, level and known playstyle of the opponent.

actually i dont believe that a played programmed ai would be much different from the ai we see alreaddy implemented in the game.

chasing and kiting mobs also will make a problem bringing the mob out of its environment wether its kiting a high lvl mob into a low lvl area to wreck havock or just kind of trapping mobs somewhere where they cant go back easily.

Wed Jan 07 2009 3:10AM Report
Quizzical writes:

There would, of course, have to be restrictions on what players could set parameters to.  For example, there could be a hard cap of, a mob will not chase beyond a particular distance, and if it tries, it will de-aggro and go all the way back to its spawn location, and be invulnerable while returning.

Without restrictions, there could be a lot of ways that players could mess up the system.  That's why it would be hard to make it work right.  But any particular problem that players could cause would be fixable.

Would this system be indistinguishable from pvp?  Of course not.  But it would feel a lot closer to pvp than a lot of the AI out there now. 

Wed Jan 07 2009 3:17AM Report
gan3f writes:

its a new idea i will give you that but there is problems with it.

Who is going to read and test all these hundreds to thousands of submited AI settings..

That would take even more time to have a dev/testers sitting there going thru all the submitted stuff to find out if its to tough for the area or no hard enough,  or if one or more things will make it not work correctly.

To much time and money would be invested into something the devs could do themselves and know it works..

But like i said its a new orig idea, i just cant see it ever working.

Wed Jan 07 2009 5:04AM Report
Korhindi writes:

You know, if the devs provided base scripts which players could use to make their behaviors, it might work.  this would help to ensure the behaviors mesh with the actual world mobs.

To be sure, there would be balance and content issues, but any idea worth merit usually has issues to be solved.  Just because current MMO's cannot support such an idea doesn't mean that future games couldn't.

Such a system would go along way to add more intricate player modding capabilities to online games and take some of the content burden off of cash and idea strapped development teams once this idea is made workeable.  It has potential.

Wed Jan 07 2009 6:37AM Report
hidden1 writes:

have you tried mobs in hellgate london in hardcore elite mode?... trust me they are trying to kill you... well you got till jan 31 to try b4 the servers shut down.

Wed Jan 07 2009 9:24AM Report
subria writes:

I think its a good idea. but it would be to much work for the dev to even concider. you take the AI now say there are 140 differant mobs and it took 1 hour to write each AI at a wimpy pay of $40 per hour thats over 5k for just making the AI's then to maintain them is even more time. Plus when ever you change something you take a chance of creating bugs in your program. and having bugs can kill your game. ( how many games did you not play cause of bugs)

so were i think it would be cool for the player i dont see that it would be cost efective to the game.

Wed Jan 07 2009 12:41PM Report
Quizzical writes:

gan3f:  No one would have to test the parameters that a player chooses before it goes into the game.  The cost of submitting an AI would be considerable, to deter players from randomly submitting a bunch of stupid AIs.  Spending an amount of money equivalent to a few hours worth of farming isn't something you do every day if you're never going to get anything back.  It's a quite affordable sum to people who are good at it, though, if on average they'll get back double what they paid over the course of the next month.

Inevitably, some players would submit stupid AIs, which would go into the live game, but after it just means that the mobs using that AI get killed a lot and rarely or never kill anything, that particular AI would be removed from the game automatically pretty quickly.  Counting kills and deaths is not difficult to program.

Because a "good" AI (that is, one that is effective at killing players) propogates and gets used in many mobs over a long period of time, while a "bad" AI is quickly removed, if half of the AI submissions are just awful, those might only be used in a few percent of copies of mobs.

Korhindi:  That's kind of what I have in mind.  Players wouldn't be asked to type in C++ code.  Rather, they'd be given a form with lots of drop-down boxes, check boxes, spots to type in integers within predetermined bounds, and the like.  Players wouldn't be able to seriously break anything; at worst, they'd be able to make mobs stand there and do nothing until they die.

I've dug through the AI files in Age of Empires and Civilization 4, both of which are pretty readable.  It's obvious that there is some internal code that players can't get at (well, in the case of Civ 4, players actually might be able to get at it, but I didn't find it), that dictates what a zillion different parameters actually do.  The AI file is then just a long list of parameters for how this or that particular civilization will behave.  Those games surely require more complex AI than your average MMORPG.

Wed Jan 07 2009 2:14PM Report
Darwa writes:

I opened your blog because of the title. Shame it wasn't descriptive of the entry.

I'm involved in AI research, and gaming companies do hire external programmers for their AI a lot of the time. I worked on a few back when I could grow a fringe in a prior job.

I can't tell for which genre of gaming you're talking about, but it would certainly redefine the term 'dumbing down' :)

Wed Jan 07 2009 8:14PM Report

MMORPG.com writes:
Login or Register to post a comment