Elemental: AI difficulty levels

By on May 31, 2010 3:57:49 PM from JoeUser Forums JoeUser Forums

Frogboy

Join Date 03/2001
+1478

In Galactic Civilizations, Sins of a Solar Empire and Demigod, the difficulty levels of computer players were either hard coded or very hard to access for players.

In Elemental, the difficulty levels are in an XML file called CoreDifficultyLevels.xml

image

The game will read from the different difficulty levels and display them in game. Players can create new difficulty levels themselves if they’d like by changing this file.

In Galactic Civilizations, I only had 3 real variables to play with (and were all in a .h file).  They were the AI intelligence, the AI money ratio, and whether the AI had FOW cheats. 

The AI intelligence ratio was how often the AI got to use the “smart” algorithms versus the “normal” algorithms. The smart ones took up a lot more CPU but produced much more intelligent result (they are the halmark of what we used to refer to as the “SDS/AI” back in the OS/2 days).

In Elemental, we have a few more variables to play with such as whether the AI gets to use combat magic, how many points the AI gets to add to their sovereign (compared to the human player) and their starting funds.

What’s nice about a data driven difficulty system is that players can create their own difficulty levels as they see fit very easily.  One of my favorites (that I would do in my personal builds of GalCiv) was to give the AI a ton of money but make it absolutely stupid so that I was just trying to make my way through hordes of poorly designed ships and terrible unit strategy.

With Elemental, I could see players creating all kinds of interesting scenarios because (and this should be remembered because it’s important) the keys are not file based. That is, you don’t have to put things into coredifficultylevels.xml. The game simply looks in directories based on the keys. So you could literally create a new difficulty level in a file called BobsSuperCustomLevels.xml and hand them out.

One AI promise from me personally to you guys

The AI in our games is only as good as I am. The better I get at the game, the better the AI will get.  So while I’m working hard to make sure the AI in Elemental is good, know that it will keep getting better long after release.  In the Starcraft 2 beta, I started out in Copper. Now, I’m in the Platinum league. Practice makes perfect.

Locked Post 68 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:13:30 PM from Elemental Forums Elemental Forums

I doubt that anyone will use the handicaps. Most people will only alter the basic difficulty.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:18:11 PM from Elemental Forums Elemental Forums

I might even make a small Lotus Domino app that will make a randomized crazy file for me before every game. So that I know that I will face some crazy AI, but not what

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:19:21 PM from Elemental Forums Elemental Forums

Very Sweet!!! Even the AI will be "customizable". Love it

Quoting ,

One AI promise from me personally to you guys

We'll hold you to that

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:22:34 PM from Elemental Forums Elemental Forums

This will be the first game that I might actually mess with the code for ai then. (But I know I will use the editors a hell of a lot!)

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:25:14 PM from Elemental Forums Elemental Forums

Can we see the full source of the file so we have an idea of what options we are going to have?

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:47:29 PM from Elemental Forums Elemental Forums

nice!  there no telling whats going to be coming down the pipe years from now.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 4:58:06 PM from Elemental Forums Elemental Forums

Could we potentially make our own difficulty variables? Like make the AI generate twice as much mana, for instance?

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 5:30:42 PM from Elemental Forums Elemental Forums

To be honest, I only have one concern. I want an AI that DOES NOT CHEAT. And I want whether or not bonuses / cheating apply at different levels to be clearly documented.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 5:35:22 PM from Elemental Forums Elemental Forums

I'd like to see the AI have some intentional personality flaws.  Like maybe an AI who holds a grudge way too much, and expends an inordinate amount of resources just trying to get revenge against an enemy who killed one of his offspring many years earlier.

 

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 5:52:14 PM from Elemental Forums Elemental Forums

So while an AI might not 'learn' during a game, it would be possible to slowly increase its 'intelligence' by changing this file, thus approximating 'learning'?

Obviously starting money can't change after the game starts, but we can change (either by turn number or by some triggers such as AI or the player reaching some level of tech and/or spell research, or some other measure):

-the points the AI Sovs have

-add in at some point, or increase the use of, AI Sovs using combat magic

-AI intelligence (how often the AI got to use the “smart” algorithms versus the “normal” algorithms.)

-AI money ratio

-whether the AI had FOW cheats (could the range of FOW cheats be increased or is it on/off?)

-whatever else is included that wasn't mentioned or that I missed

If so that would be cool

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 6:06:26 PM from Elemental Forums Elemental Forums

my only concern is the relience on cheats for the ai to make it a challenge for the player. I'm tired of games where the only way to up the difficulty is to give the ai more resources. i would much rather the ai started on the same level, but was actually good at using the resources it has more ffectively. I'm sure you will do all you can to limit ai cheating, and i am confident that the ai will be good for the task, but with the focus of the game being single player i would hate for the ai to be reduced to petty monetry issues.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 6:12:14 PM from Elemental Forums Elemental Forums

I don't care if the AI cheats or not, as long as it's challenging.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 6:31:50 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting 2dme,
my only concern is the relience on cheats for the ai to make it a challenge for the player. I'm tired of games where the only way to up the difficulty is to give the ai more resources. i would much rather the ai started on the same level, but was actually good at using the resources it has more ffectively. I'm sure you will do all you can to limit ai cheating, and i am confident that the ai will be good for the task, but with the focus of the game being single player i would hate for the ai to be reduced to petty monetry issues.

Well yeah, everyone would love it if AI's could actually "think" and play like a human. But AI technology is only so advanced, and it will be many, many years before a computer can successfully replicate a human's intelligence. Until that happens, you're just going to have to live with cheating AI's, because after a point that is the only way to make them more challenging.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 6:50:12 PM from Demigod Forums Demigod Forums

Quoting Chipwich,
I doubt that anyone will use the handicaps. Most people will only alter the basic difficulty.

 

yeah what really bothered me in civ4 was how much stupid was ai and how much cheating it was

 

thats just boring, you can get an achievement like but its not a game anymore

hope in elemental most of effort will go into developing a competitive ai without cheating and then we can adjust it

 

 

also if i can suggest i personally prefer maybe some kind of starting handicap like 50 more gold or 3 fighters instead of 2 then just crap %multiplier like a permanent 10% on production or gold which imo just destroys the game

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 7:50:46 PM from Stardock Forums Stardock Forums

 I would like to see an AI that doesn't cheat, provide endless competition and ingenuity.  Wish you used a couple other Stardockians to help code though.  For a game of this magnitude(grand hopes) the AI should not be skimped on at the beginning.  I say this as a result of the MoM experience.  We wanted to play MoM badly initially then the game was released very buggy and most left to pursue other gaming options(there were more unique, interesting titles at that time).  After patching the game was playable and very fun but still the AI had(has) problems that needed to be addressed.  Almost every single 4x strategy game has some AI problems that diminish its overall qualtiy.  Its the weak link or the unarmored underside of the genre.

 I'm sure you will do all you can to write/create an excellent AI model from which the rest can be added/altered later.  Thanks again for another wonderful update. 

 

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 8:55:33 PM from Elemental Forums Elemental Forums

Having MP will help the AI, as Brad will be able to see what other players are doing/exploiting.

 

I trust/expect Stardock to have an AI that can play credibly under the same rules I do, provided I don't exploit.

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 9:03:03 PM from Elemental Forums Elemental Forums

As the  XML makes clear (I think anyway) the AI doesn't cheat at Normal or Challenging.  At below that, the human player gets bonuses and above that the AI gets bonuses.

My job is to make the AI at Normal or Challenging as intelligent as I can.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 9:05:09 PM from Demigod Forums Demigod Forums

I would like to see an AI that doesn't cheat, provide endless competition and ingenuity

lol. So how is your game coming along? 

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 9:43:27 PM from Elemental Forums Elemental Forums

I for one just like an easy way to be able to tweak the AI. For once I might actually be able to have some input in AI modding!

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 9:48:51 PM from Stardock Forums Stardock Forums

Dynamic difficulty levels would be cool.  I'm not a modder but I always wanted to see what would happen if I played Civ4 on "Noble" for fifty turns and then jacked it up to "Deity".

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 10:21:07 PM from Elemental Forums Elemental Forums

So long as it doesn't have lunatic ai like in Starcraft 1 (automatically send units at your base, cheats in resources, targets units based off of grouping) or in Dawn of War (the difficulty was literally just a modifier to the resource gain rate of the AI, always knew exactly where infiltrated units were located), I'll be happy.

Reason for Karma (Optional)
Successfully updated karma reason!
May 31, 2010 11:28:15 PM from Elemental Forums Elemental Forums

Hi!

I don't like idea of handicap levels in games. That makes me think that AI is stupid and developers know it. The game itself must be hard and chalenging enough at every point of gameplay. What if i choose too easy level for me? On the other hand - hard levels can be too hard for the majority of players. So i believe it should be only 1 difficulty level "normal" and "tutorial" as well.

Reason for Karma (Optional)
Successfully updated karma reason!
June 1, 2010 12:11:47 AM from Elemental Forums Elemental Forums

One AI promise from me personally to you guys

The AI in our games is only as good as I am. The better I get at the game, the better the AI will get.  So while I’m working hard to make sure the AI in Elemental is good, know that it will keep getting better long after release.  In the Starcraft 2 beta, I started out in Copper. Now, I’m in the Platinum league. Practice makes perfect.

I would put money on that. The non-cheating AI in GC2 at release was as good or better than the AI in any other contemporary game in the genre, and comparing its AI then to its AI now is like comparing a 3 year old's vocabulary to a 12 year old's.

I don't like idea of handicap levels in games. That makes me think that AI is stupid and developers know it. The game itself must be hard and chalenging enough at every point of gameplay. What if i choose too easy level for me? On the other hand - hard levels can be too hard for the majority of players. So i believe it should be only 1 difficulty level "normal" and "tutorial" as well.

That doesn't make any sense. Game AI will always be inferior to a human player (at least for the foreseeable future and without a supercomputer to back it up), so the devs do know that their AI is not particularly smart by human standards. There is no avoiding that, other than denial. Having only "tutorial" and "normal" means that a lot of people will find the game either too easy or too hard with no recourse. If you don't like the idea of handicaps, then don't use them. It's as simple as that (it's what I often do). If you choose too easy a difficulty for you, then next time chooser a harder one. On the other hand, if you only have "tutorial" and "normal", what if "normal" is too easy (or hard) for you? Then you're just screwed. Having AI difficulties that either handicap you or the AI (or give bonuses to you or the AI) is a good way to make sure that everybody can find a difficulty setting that suits them. People who have mastered the game can play against cheating AIs and still be challenged (otherwise it's just not fun anymore); people having trouble can play against handicapped AIs and move up to harder ones as they get better. 

Reason for Karma (Optional)
Successfully updated karma reason!
June 1, 2010 12:30:37 AM from Elemental Forums Elemental Forums

Quoting Frogboy,
As the  XML makes clear (I think anyway) the AI doesn't cheat at Normal or Challenging.  At below that, the human player gets bonuses and above that the AI gets bonuses.

My job is to make the AI at Normal or Challenging as intelligent as I can.

Didn't you mention having a Team to help with the AI this time? Just curious as I thought you mentioned that a while ago. Whether you're doing it with a team or alone I'm sure it will be another masterpiece.

I think we also all understand there's only so much you can do in so short a time-frame. Not to mention there's no such thing as a "Real" AI.

Reason for Karma (Optional)
Successfully updated karma reason!
June 1, 2010 1:04:10 AM from Stardock Forums Stardock Forums

Looking at the XML file, would it be possible to break that "ratio of intelligent decisions" out into:

ratio of intelligent decisions on tech choices

ratio of intelligent decisions on diplomacy

etc.  to expose more to the player? Or is it really hard to class AI decisionmaking this way?

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0000437   Page Render Time: