AI Systems

At the very innermost core of MMORPG Tycoon 2 are its AI systems; AI which
determines how its simulated players act, and what they most want to do in any
given circumstance.

Fundamentally, each of MT2’s simulated players runs an AI engine which is
similar to the AI brains of the characters in a The Sims game. Each has a
set of abstract needs which tend to increase over time; they want to feel
like they’re advancing in the game, they want to interact with other players,
they want to explore new places, and so on. Completing a quest reduces their
need to advance for a little while. Having a nice chat with another player
reduces their need to interact with other players.

(AI needs from The Sims)

Players also have more concrete needs. Each player wants to have a “home”; a
place which they consider to be their character’s base of operations, to which
they’ll return whenever they log out. Each player wants to have a good weapon.
Most players want to have some friends within the game, and so on.

(Current AI needs from MT2)

Missing these concrete needs makes players more and more unhappy, and being
unhappy makes them want to stop playing. It also makes them consider
complaining online. Which is a thing that I should really write about soon.

Most recently, I’ve been working to improve the AI’s understanding so that they
can reason a little more rigorously; a player has just gone up a level, which
means that she could now use a better weapon. She wants to buy a better
weapon, but has no money. What I’ve been working toward is a process by which
she can realise that while she has no money right now, if she were to go to fight
some weak monsters and get some loot from them, she could then go to a shop and
sell the loot, which would give her the money she needs to buy the sword. This
sort of reasoning can be surprisingly tricky to make robust and general!

The other fun challenge for AI in MMORPG Tycoon 2 is that there are so many
AI agents in motion at once. In most games, there are usually only a few
agents actually being simulated at any one time; only the ones actively
on-screen. The offscreen agents are either ignored, or else updated using a
much simpler AI model. Here, I’ve seen MMORPGs with a thousand users logged in
at once, and all are doing full AI processing; we don’t “switch off” users which
are out of view, or switch them into a simpler AI model. So keeping it all
responsive has been an interesting challenge!

More details on this in future posts. I’m very much looking forward to seeing
even more interesting AI behaviours emerge!