Difficulty Levels / AI

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderators: Oberlus, Oberlus

Message
Author
User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Difficulty Levels / AI

#1 Post by Geoff the Medio » Sat Jan 07, 2006 6:27 am

A recent thread brought up the issue of AI difficulty levels.

I was recently doing some coding, and added a basic difficulty level setting to the server. I wasn't sure how difficulty levels should actually be implimented, though I figured separate content files (like techs.xml and buildings.xml) might be used for each level, or the difficulty level value might be exposed to the effects system, allowing a single set of content files to contain different versions of buildings' and techs' effects for different difficulty levels, or to modify a single set of effects depending on the difficulty level value.

The aforementioned thread noting AI difficulty levels caused me to realize that the effects stuff might not be a good way to go about making the difficulty levels different though. I assume that we'll vary the quality of AI opponents with difficulty level, but should the game mechanics also vary?

Additionally, if there's no difference between the game content between difficulty levels, is it a good idea to have a single game difficulty level at all? If the only difference between difficulty levels is the quality of the AI opponents, then there's presumably no reason to require all these AIs to be of the same difficulty. Rather, the player could specify the difficulty level of each AI opponent, in the manner GalCiv allows.

We could also do both, by having a general or player-specific game difficulty setting, perhaps for player vs. environment stuff (eg. space monsters) or difficulty for the player in maintaining order within his/her own empire (eg. dealing with unrest, inefficiency, liklihood of getting good random results in any events, etc.). These settings could actually work similar to any bonuses or penalties that AIs get at different difficulty levels (in addition to using better AI algorithms, assuming we even have them).

For example, an AI set to "easy" might get big penalties to production. A player set to "hard" might get those same penalties. The player's and the AIs' difficulty levels could be quite separate... or multiple players could have different difficulty levels in a multiplayer game as a form of handicapping.

Anyway... is it worth having a "difficulty level" (or something similar) that's separate from the AI algorithm used and bonuses and penalties? If so, what should it be called?

User avatar
utilae
Cosmic Dragon
Posts: 2175
Joined: Fri Jun 27, 2003 12:37 am
Location: Auckland, New Zealand

#2 Post by utilae » Sat Jan 07, 2006 6:49 am

There are a few different methods of achieving difficulty:
-aliances - easy: AIs fight each other, hard: they ally against you
-ship design - easy: AIs have badly designed ships, hard: their ships are deadly
-expansion - easy: AIs don't expand much, hard: they expand hard out
-agressiveness - easy: AIs defensive, AIs agressive

Sapphire Wyvern
Space Kraken
Posts: 149
Joined: Wed Nov 09, 2005 3:25 am
Location: Melbourne, Australia

#3 Post by Sapphire Wyvern » Sat Jan 07, 2006 12:20 pm

For a name, "Handicap" seems appropriate and intuitive. As for whether it's particularly necessary/useful? I'll have a think and get back to you once I have an opinion. :)

User avatar
Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#4 Post by Yoghurt » Sat Jan 07, 2006 1:17 pm

-Awareness: hard: the AI gets suspiscious if a 100 heavy assault ships fleet heads for their territory; easy: it gets worried when the fleets has taken down 4 planetary defense stations.

User avatar
Skaro
Pupating Mass
Posts: 94
Joined: Sat Dec 31, 2005 3:27 pm
Location: Stuck in a wormhole

#5 Post by Skaro » Sat Jan 07, 2006 1:27 pm

- Recognise enemy space:

The AI doesn't just send colonyships to a enemy planet that is swarming with warships.
A sucking chest wound is Nature's way of telling you to slow down. --Murphy's war laws

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12641
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#6 Post by Geoff the Medio » Sat Jan 07, 2006 10:01 pm

Though it's not useless to have some ideas, I wasn't really asking for a bunch of ways to make difficulty levels different... but rather how such differences should be structured.

User avatar
skdiw
Creative Contributor
Posts: 643
Joined: Mon Sep 01, 2003 2:17 am

#7 Post by skdiw » Sun Jan 08, 2006 10:59 pm

It's hard to get AI to be smarter, rather than just some advantages. Some differences in AI lvls could be:

-starting resources, including ships...
-more resources gathered and other bonuses
-able to identify strategic locations
-able to attack and protect strategic locations
-more aggressive, and battles are waged if it knows it has a good chance of winning, otherwise retreats
-how well it can identify its situations and formulate a strategy
-able to adopt and counter enemy strategies
-able to learn and improve
-able to defend vulnerable ships tactically
-don't overbuild something
-places buildings in good spots
-builds good ships and counter ships
-uses spying and diplomacy more efficently
-form alliances and gang up on third party
-researches are more focused
-less vulnerable to common 4X tricks (like tech trading)
:mrgreen:

Magus
Space Squid
Posts: 72
Joined: Mon Mar 21, 2005 12:21 am

#8 Post by Magus » Sun Jan 08, 2006 11:17 pm

It would be good to have two different settings: AI difficulty, determining the AI intelligence level, and Handicap, screwing with things like income, cost, time to research, and so on.

zobo
Krill Swarm
Posts: 11
Joined: Mon Dec 19, 2005 1:57 pm

#9 Post by zobo » Tue Jan 10, 2006 11:32 am

I for one really would like to have the difficulty elements in the game engine customisable. There are certain ai cheats that I accept and others that make me very angry.

I think the difficulty levels should be transparent. The exact information should be available to the player and there should be a difficulty level customization option. Naturally this customization should not be forced upon the user.

Since we do have races that have bonuses, we could have "super"-versions of said races to increase difficulty. Hopefully these won't have any abilities the player couldn't get but have more of them. More bonuses to industry, more research, good accuracy when firing. Things that the player could get (but does not have the points for)

User avatar
skdiw
Creative Contributor
Posts: 643
Joined: Mon Sep 01, 2003 2:17 am

#10 Post by skdiw » Tue Jan 10, 2006 7:35 pm

another thing you might want to consider is personality. Maybe a race tend to be more aggressive, or likes to build, so their ability to do something might reflect their personality. For example, lets say player chose difficult at "50%" for a computer who likes to do reserach. the comp's ability to

1. ID strategic spots operates at 40% efficiency
2. ships tactic is 0%
3. But research management is 100%
4. building intelligence is 60%

So the overall intelligence of your computer is 50%, but has certain character, strengths, and weaknesses.

To prevent player exploitation, you might make each features (1, 2, 3, 4...) have some random factor, or changes dynamically through the game. So maybe the computer starts with reserach management at 100%, but at later point of the game, that changes to 50%, and aggressiveness goes up 50%, either to counter the player's strategy or just to throw the player off balance.

The % are bonuses, they are just how smart they can effectively do something.


I think you should vary to AI by: bonuses, how smart, and by personality.
Last edited by skdiw on Tue Jan 10, 2006 7:40 pm, edited 1 time in total.
:mrgreen:

User avatar
Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#11 Post by Yoghurt » Tue Jan 10, 2006 7:39 pm

skdiw wrote:To prevent player exploitation
Why? If players wants a cakewalk, why hinder him?

User avatar
skdiw
Creative Contributor
Posts: 643
Joined: Mon Sep 01, 2003 2:17 am

#12 Post by skdiw » Tue Jan 10, 2006 7:47 pm

Yoghurt wrote:
skdiw wrote:To prevent player exploitation
Why? If players wants a cakewalk, why hinder him?
What I meant by exploitation is to prevent the player that knowing that his enemy is Psilons, he is going have to rush him. The Psilons have a certain character to it, and there's a corresponding strategy to beat him like offense > growth. I'm just saying we might have a feature that makes this a variable, or random, or changes when the game begins so the player has some ID work to do also. It doesn't mean the AI is going to play like a grand master, it's that AI is going try to do its best given chosen difficulty at the beginning of the game.

The chosen difficulty is chosen at the beginning is a constant once the game begins, so all the AI feature will have to average to that constant. I was thinking that AI's ability to ID a player's strategy is one of the features. So two things could happen at low difficulty setting, either AI's ability to ID goes up high but he can't counter effectively because he does other things poorly (no ship tactics, builds irrevalent buildings to the situation) or comp ID the player's strategy not so well, but does management well, which doesn't affect the player since the AI did not ID a problem to counter.

So if the player wants a cakewalk, he still can by setting the % low, so the feature % flunctuate at a low value, meaning overall AI does things poorly. By setting difficulty low, the AI plays poorly, starts with penalties, and makes mistakes.
Last edited by skdiw on Tue Jan 10, 2006 7:53 pm, edited 1 time in total.
:mrgreen:

dstjames
Space Floater
Posts: 24
Joined: Fri Dec 12, 2003 3:31 pm
Location: Detroit MI USA

AI

#13 Post by dstjames » Tue Jan 10, 2006 7:53 pm

Check out the following link about AI development in GalCIv II

http://www.galciv2.com/Journals.aspx

I think the AI game mechanics should not be different at all for different difficulty levels just the AI should be smarter or dumber.

I agree with the GalCiv developer when he says that it should feel like your playing against another player but that its hard because the AI cheated and started with a pre-made emire where you have to start from scratch.

User avatar
skdiw
Creative Contributor
Posts: 643
Joined: Mon Sep 01, 2003 2:17 am

Re: AI

#14 Post by skdiw » Tue Jan 10, 2006 8:09 pm

dstjames wrote:Check out the following link about AI development in GalCIv II

http://www.galciv2.com/Journals.aspx

I think the AI game mechanics should not be different at all for different difficulty levels just the AI should be smarter or dumber.

I agree with the GalCiv developer when he says that it should feel like your playing against another player but that its hard because the AI cheated and started with a pre-made emire where you have to start from scratch.
gal civ AI is good. Their AI didn't start to cheat until latter two difficulty levels. All the other difficulty is just how smart the AI plays. The third to last and fourth to last difficulty presents some challenge to the player, whereas most other games the AI starts to cheat. I think we can take a few ideas from gal civ.

another thing to note is player "cheat." it's such a deciding factor on your starting locations, that the player keeps generating new maps until he has a good starting environment. It's impossible to win without using doing this and taking the alliance victory option on the hardest difficulty level. I think if the player don't do these things, having the gal civ AI playing at the fullest or with just a small bonus well satisfy even hardcore players.
:mrgreen:

zobo
Krill Swarm
Posts: 11
Joined: Mon Dec 19, 2005 1:57 pm

#15 Post by zobo » Wed Jan 11, 2006 10:22 am

There are times when it's justifiable to give a player bonuses. A newbie versus a veteran, for example. To prevent it being cheating all the players should see if others have handicaps of boni, before play starts.

If you know at the time the game starts that one or several players have boni it's not cheating.

I think the similar idea should be extended to the AI. If it is given bonuses the player knows this. That way we don't have a "cheating" AI but rather the player knows he's getting more difficult game and why.

Post Reply