The history of the AI in Demigod

Hi folks.  pacov here.  Thought I’d take a little time to bring you up to speed on the AI in Demigod and its current state via modding.  This article might be of some interest to the majority of you as it covers DG’s history or it might be a complete bore fest.  Anyway, read on if you like or pass it by if its not your thing.

Quick Background

First, let me tell you that I wasn’t fortunate enough to be around in the days of the beta (during development, etc).  I only found out about Stardock shortly after the release of Demigod.  That said, I’ve been an avid fan of Stardock since then for how they handed issues with DG and pirates at launch, etc, and decided to purchase the game a few weeks after release knowing it was something I’d be interested in – even if it had some issues.  I don’t regret my decision.  Demigod has easily been the game I’ve dedicated the most time to playing and being involved with a gaming community because I love it. 

The History of the AI

Anyway, that said, onto the AI.  It seems clear to me that AI development took a back seat at some point during the development process.  That statement will likely sound offensive to anyone involved in developing the AI, but frankly, it seems clear that AI eventually became an extremely low priority after launch.  If you doubt it, note the amount of updates that improved the AI in all of the patches.  The one AI update that I’m aware of happened with Demigod v1.2.  And that change gave us the ability to change the XP and gold rewards for killing AI players when we host a game.  This, is actually a HUGE improvement.  But it still meant that the AI was lousy and that no real effort was being made to make the AI better.  That said, 100% of custom games immediately started hosting AI high HP and low AI gold games to take advantage of the improvement provided to us.  Even if the AI was in the backseat, SD was listening to us that we needed a change to make the AI less of a liability.

How was the AI lousy?

Let me give you a few quick examples to help make the problem more clear. 

Example 1:  Let’s say I’m playing a 3v3 game.  My team is actually doing a pretty good job of kicking arse (let’s say we are up 5 kills).  Right around warscore 8, one of my teammates crashes.  Now, we have an AI + 2 players left to defend our portals and attack.  The enemy has 3 players that could coordinate 3v2 or 3v1 attacks.  As our AI teammate will likely be off somewhere doing God knows what, we are almost always in 3v1 or 3v2 conditions.  If the AI was a bit more useful and considered helping us or focusing on a useful target, we’d have a better chance.  Odds are though – even if you give me a very experienced teammate – if we are fighting against mid level players, we will lose.  The outcome of getting an AI on your team almost always meant a loss.

Example 2: This one’s a bit off the path, but also illuminates more problems with how DG was handled at points (note – the issue I’m describing has been resolved).  At one point you could fight AI in the pantheon for ladder rank.  This meant you could, more or less, pick on a dumb kid to rise through the ladder ranks.  Any experienced player could defeat the AI 1v1 or even 2v1 on a regular basis.  And in pantheon, there are no settings to make the AI worth less gold, etc – it was pretty much like getting the reward for killing a real player.  Anyway, this decision to allow beating an AI to count as a ladder win just went further to invalidate the competitive ladder in Demigod and lost us many competitive players.  Imagine that the #1 1v1 ladder player in Starcraft 2 never actually played a human opponent to get that ranking.  Pretty cool, right?  In Demigod, that was possible and actually happened.  The bottom line is that it didn’t matter if you beat the best player in the world; ladder stats would be determined by who could beat the handicapped AI the most.  That said, a fix went in that made it extremely unlikely that you would end up fighting an AI in the pantheon.  And as a result, all of those players that beat the handicapped quite playing pantheon and its no longer used by 90% of all players.  And then pantheon died.

Example 3: This ties in to example 2, but let’s say I decide to host a custom game today – right now.  I will take an AI as a teammate and fight against 2 mid level players (eg not expert, but certainly not new).  So, I’m an expert against 2 mid level players.  If those guys are truly mid level players, I have no chance of winning.  A game on cataract can be instantly decided by those 2 mid level players at warscore 8 by making an immediate dash to each of the portals I control and locking it. I can only defend 1 portal.  The Ai on my team will be off killing creeps or something.  In short – if you have a brain and even a wee bit of experience, you can beat any player with an AI for a teammate if it is that way at the beginning. 

Example 4:  The AI’s purchase silly upgrades and silly equipment.  Now granted, let’s say AI was a focus during development.  I can even buy that it was for a bit.  But consider any point after release.  Once there are a substantial amount of games played, it quickly becomes clear that the AI is using silly equipment, silly ability builds, and purchases silly upgrades.  Now, if I was working on AI development, I’d say “Oh – the ai’s are doing many things that MP users don’t do.  And the AI’s are dying a lot in MP.  I think I will make the AI’s mirror what MP users are buying, upgrading, and doing.”  But that never happened.  So, all we have is the vanilla AI that was dreamed up before DG was launched.  To my knowledge (and to Demigod’s change log), nothing has changed to improve the AI.

Should AI have been prioritized?

No.  At least in my opinion, as a MP gaming, I honestly could have cared less if the AI was good or bad.  Obviously, allowing players to fight against AI’s and get credit for the PvP ladder was a mistake, but I digress.  I played against the AI to learn the basic mechanics of the game and abilities of the all the DGs.  To me, it was simply a test ground to learn.  Playing the AI will never make you a good MP person, but it will give you the basics.  I stand by the decision to put resources into fixing the MP experience and rebalancing as appropriate (instead of putting time and money into developing the AI).  That said, if I was an offline player, I’m pretty sure I’d feel very differently (or have moved on to another game post haste). 

Why do I care now?

Well, the reality is that because there can be connectivity issues or people rage quitting, and because the AI is lousy, its generally a death sentence if my teammate crashes or the other team loses a player.  Whoever gets the AI is screwed.  Heh… I even worked it out at one point.  If there are about 2 minutes left in the game when I lose a teammate and an AI takes over, odds are I will still win.  > than that in an even game and I am done for.  So, I care because having a good AI teammate when someone drops gives me a chance to win.  I also care because if I can have a good ai teammate, I’d gladly play 2 mid level players vs me + 1 ai.  I don’t mind handicapping myself to get a fun game.  But if it’s a guaranteed loss 95% of time even if I play perfectly… then that sucks and its just boring.

AI Modding

The good news is that modding support via LUA was added to Demigod.  And so, someone eventually took up the call and started working on an AI mod.  Someone named peppe. 

AI modding version 1

Around November 2009, peppe started work on modding the AI.  He started by focusing on causing the AI to use builds that the MP community used.  This alone, is a huge improvement.  Peppe continued to focus on the mod for some time until he burned out for a bit, but certainly left a good legacy for someone to pick up.  Someone did…

AI modding version 2

In 2010, the_hunger stepped in after peppe vanished for a bit due to some family issues.  The_hunger worked to update the mod and continued to provide additional refining.  We are getting closer.  While peppe was away, he chimed back in during the_hunger’s development and said this:

“The code belongs to the community. I had always hoped others would contribute and it is very nice to see new releases come out of the base I built. The mod appears to be in good hands. Hope to contribute again in the future.”

AI modding version 3:  peppe returns

Peppe came back in November 2010 and worked with a passion on modding the AI.  I became the primary tester at that point (I provided testing and support to previous iterations but only became very involved around this time).  I’d provide feedback and request changes, peppe would make those changes.  We’d often even have 2-3 new versions per day – that’s how much time he was devoting to making the AI better and better.  And around this time, miriyaka started lending support and helped develop additional code.  We progressed quite a bit, but due to the extreme pace of the changes and updates, peppe burned out eventually and took a much deserved break (though he did pop back in 2-3 months ago to help with a critical issue we discovered and released a new version).  Peppe still checks the forums from time to time, but we have not heard from him in a bit.  That said, without his contribution, I don’t think anyone would have delved into AI modding in the community and we all owe him our thanks for his time.  Thank you, peppe!

AI modding version 4:  TODAY

Starting early in June, I’ve taken up the_hunger’s role.  I’m stepping in while peppe is gone and looking to do whatever I can to make the AI in demigod better than it is.  With my > 6k games, its not much of a problem for me to know what should be done in a given match and to observe the AI and note what needs changed.  Everyone involved gave us a great framework and I’m simply looking to refine it further.  And thankfully, miriyaka is still around and has been providing excellent support to me and has been a tremendous help in code development. I’ve been releasing test versions and thankfully some folks from the community have been willing to help out as testers (thanks plaguewraith, sledge, and darkliath (when I ask you to help, you always do).  So, we have a decent team working on this and I expect we’ll end up with a solid new version that improves upon peppe’s and the_hunger’s great work. 

How does the mod stack up in peppe’s version?

Well, let me put it this way:

  • if it’s a 2v2 matchup with a mid level player and new player on one team, I’d take an AI on my team EVERY time.
  • if it’s a 2v2 matchup with 2 mid level players on one team, I’d take an AI some of the time
  • If it’s a 2v2 matchup with 1 expert and 1 mid level player on 1 team, I’d lose with an AI.  And so on.

How does the mod stack up in my new version?

It’s pretty much the same right now.  Everything I’ve done has just been minor improvements (eg the ai getting currency 2, always buying fs1 ASAP, better builds for some dgs and removing weak builds).  Its getting better and I’m certainly hitting the goal of improving on the original version, but there is a lot of work ahead of us before we have a new release.  I’m going to keep refining things and continue to make logical improvements.

Anyway, that’s its folks.  If you find this sort of thing interesting, hope you were entertained and now know a little bit more. 

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s