Owner, developer of BlackTigerSoftware. Discussing software, hardware, design and philosophy.
Published on May 29, 2009 By blackt1ger In Demigod

I was just wondering what information can AI's gather?

a) Do the see kills, like human players do? (ie. after a kill, it's a bit like a power-play in hockey, you know they are a man down....)

Do they get the "war rank" has increased message? (cool - now I can get ... upgrade )

and of course I forgot a bunch of things, as I've been pondering this a bit.  I guess the real question is: Do AI's run in the same Lua runtime.  If so, an AI has access to just about everything.

I know folks have been banging GPG for it's AI work.  In SupCom, the AI's were fairly good, I least I felt that way.  However, the number of different strategic imperitives in Demigod make it some really difficult work.

Another thing I was pondering - given a 2v2 pantheon match, there are 16 different combinations of demigods per side.  So, it should be reasonably pragmatic to work on a team-AI situation as only 32 different co-operative modes would need to be employed.  A bit more difficult in other modes, as 128 different co-operative modes would need to be developed ( 8x8 + 8x8).


Comments
on May 29, 2009

An AI will see anything its programmer lets it see. If it wants to see the entire map, then so be it.

on May 29, 2009

Well that sucks.  I kinda remember Frogboy talking about folks uploading their AI's.  It would've probably been smarter to set AI's in either a new Lua environment with a proxy _G or a completely separate thread with it's own Lua runtime.

on May 29, 2009

Frogboy didn't specify anything, so best just wait and see how they implement the new AI. I'm personally excited; have had fun coding AI for WC3 mods in the past

on May 29, 2009

Depending on how much time goes into programming, an AI can become almost indistinguishable from a real player. Of course, the amount of time and effort that would be required to do that would be absurd. Essentially, something like that can be done by giving different command outputs for each information input. Each input is based on how many variables that the AI takes in at once.

on May 29, 2009


  In SupCom, the AI's were fairly good, I least I felt that way.

 

Uhh....

on May 29, 2009

Does anyone have any idea of how "good" the AI becomes at different levels? I mean, it seems that my easy AI will wander to buy priests quite early in the game, and im like "Nooo, dont give them more xp!! ". Thankfully, if i play an AI game, the other side will usually have an AI aswell (say, playing against a friend) and it will do the same

What i wonder is if it will wait as it gets higher level?

on May 29, 2009

AFAIK, the only difference the AI has between levels is how much gold/XP they get compared to you.

(much less on easy, less on normal, equal on hard and much more on nightmare).

Note that your teammates in tournament mode are always on Normal difficulty, and thus always a handicap.

There's also the popular rumour that the difficulty affects how prone the AI is to massive cheating... which certainly seems possible to me.

 

on May 29, 2009

What about tactics? Does the harder AI implore running away more than the easy AI?

What type of AI do you get if someone timeouts from a game - normal?

on May 29, 2009

Ai doesnt change tactically no matter what level. Higher levels just cheat, they get extra gold and experience, extra health regen and damage, and I think they can even buy skills whenever they want.

on May 29, 2009

AI's will never be good in this game. The complexity of the logic would be a little too much.

In a standard encounter it would have to know :

How much HP it has?

How much HP the enemy has?

How much mana it has?

Are there reinforcements coming? Do those reinforcements include Priests?

Are there teammates coming? Can those teammates heal?

What skills have already been used? What skills are likely to be used?

Are there enemies coming in? Creeps with priests or enemy DGs?

Are there mines in front of it?

Can it take the tower on if the enemy DG runs?

and more

 

At the moment it just about copes with the first 3 pieces of logic, trying to get it to make a lot of complicated decisions will bog peoples computers down and send the AI coder into a fit. What seems fairly easy for us, is pretty hard to program, especially in real time strategy.

 

on May 29, 2009

Sinzer
AI's will never be good in this game. The complexity of the logic would be a little too much.

In a standard encounter it would have to know :

How much HP it has? Easy enough... int aiDemigodHP;

How much HP the enemy has? int enemyDemigodHP;

How much mana it has? int aiDemigodMP;

Are there reinforcements coming? Do those reinforcements include Priests? a bit more difficult... perhaps tracking how near the nearest creep wave is (and the nearest priest)... float allyNpcReinforcedist;

Are there teammates coming? Can those teammates heal? along the same lines... float allyReinforceDist (and enemyReinforceDist so they know when to run ), along with "if (allyType == Sedna||Oak||whatever)"

What skills have already been used? What skills are likely to be used? Tough one... perhaps an ArrayList storing all the skills it has seen the enemy use recently... Though keeping track of its own cooldowns would be much easier.

Are there enemies coming in? Creeps with priests or enemy DGs? See the enemyReinforceDist note above.

Are there mines in front of it? Well, players often don't know this one either, so we can probably ignore it

Can it take the tower on if the enemy DG runs? Just add a cutoff point for HP percentage after which it will give up the chase, and adjust it by level (and possibly redirect its wrath to the tower).

 

You then assign each of these conditions a score, say (pulling numbers out of where the sun don't shine for example purposes) 10 points for every 500 HP the AI has over the opponent, and -10 points for every 500 HP under. -100 points if another enemy is on the way, -20 for inbound heals, +100 if an ally is on the way... so on so forth. If the "battle score" is over 200 or so (once again, for example), then the AI attacks aggressively and persues. If it is from 0 to 199, it attacks with caution, ready to disengage. If it is from -199 to 0, it makes a reluctant retreat, taking pot shots whenever cooldowns expire. If under -200, it goes into GTFO mode and sprints/teleports (if necessary) to safety.

I dunno, just the ideas that were running through my head when I read your list of factors.

on May 29, 2009

TheGuildfordStrangler
Depending on how much time goes into programming, an AI can become almost indistinguishable from a real player. Of course, the amount of time and effort that would be required to do that would be absurd. Essentially, something like that can be done by giving different command outputs for each information input. Each input is based on how many variables that the AI takes in at once.