.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
The Star and the Crescent- Save $9.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old April 16th, 2004, 03:03 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Quote:
Originally posted by Peter Ebbesen:
quote:
Originally posted by Arralen:
I think this should fix most issues with the AI troopbuilding.
I think (by a quick scan) that this one would have, e.g., Machaka wasting its money on a tiny elite force of Sorcereresses and Sorcerors (Mage Commanders, typically available for 50% of gold after upkeep) and Black Hunters (sacred and expensive) backed up by Machaka archers.

It would also keep AI nations from buying their very most powerful priest/mages (Anathemant Dragons, Grand Masters, Niefel Jarls, Vanadrotts, Grand Theurgs &etc) unless extremely wealthy. (> ~800 remaining after fortress building and upkeep).

Thats why I have been waiting for someone to actually go from complaining that the AI sucks, to actually taking a stab at developing some AI rules that are testable. People who have even tried something close tended to be obviously thinking of certain nations such as Ulm and Ermor, while leaving ones off like Pangaea and Jotun. Personally, Im a firm believer that if rules fail to approximate logic, then random might do better. Not completely random but some thrown in.

No extreme is ever going to be correct. A middle-of-the-road compromise is usually better. I would throw a dice roll in there. Maybe something setting the type of army being constructed. An elite force, a cheap mass, or a mage planning to fill up on summons. Then the AI can concentrate on filling that army for a few turns before sending it out. But the first step would probably be to test this central logic he came up with.

[ April 16, 2004, 14:04: Message edited by: Gandalf Parker ]
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #2  
Old April 16th, 2004, 05:54 PM
Nephelim's Avatar

Nephelim Nephelim is offline
Private
 
Join Date: Mar 2004
Location: SF Bay Area, CA
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Nephelim is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Quote:
Originally posted by Gandalf Parker:
People who have even tried something close tended to be obviously thinking of certain nations such as Ulm and Ermor, while leaving ones off like Pangaea and Jotun.
I don't know how polite it is to mention other games, but I was really impressed with the AI in galactic civilizations... Each race had its own AI, so things -could- be specific.

Though I understand illwinter is very small, so probably doesn't have the manpower for this approach.. (Though I don't know how big stardock is, either).

*grins* Perhaps we as a community can bribe the stardock guys to contribute
Reply With Quote
  #3  
Old April 16th, 2004, 06:37 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Quote:
Originally posted by Nephelim:
quote:
Originally posted by Gandalf Parker:
People who have even tried something close tended to be obviously thinking of certain nations such as Ulm and Ermor, while leaving ones off like Pangaea and Jotun.
I don't know how polite it is to mention other games, but I was really impressed with the AI in galactic civilizations... Each race had its own AI, so things -could- be specific.

That would be great, but....
GalCiv has been built entirely with AI as the goal. It started on OS/2 and was mentioned in any discussion on AI for many years before PC's and Windows caught up to handling the multi-threading it does. Now its on PC and other people are hearing of it.

Dominions was built on multiple humans playing in PBEM. Thats not to say that such an improvement would be impossible but it would be a large rewrite from the "single-thread AI for all the nations" which was tossed into the game. Especially since AI doesnt seem to be the Illwinter programmers idea of fun, it would be mostly a solo-player improvement, it would never be good enough, and would take alot from other projects.

Personally Im 95% a solo player and would love to see improvement in this. In fact Id prefer if it went player scriptable. But I think small logic tweaks is the most likely to get patched in.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #4  
Old April 17th, 2004, 03:33 AM

Gateway103 Gateway103 is offline
Corporal
 
Join Date: Jan 2004
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Gateway103 is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

I would love to test your algorithm out, but unfortunately, between my thesis and exams, I wouldn't be free until after the 28th... So if you still need tester then, drop me a line. ^_^

-Gateway103
Reply With Quote
  #5  
Old April 17th, 2004, 08:43 AM

Jondifool Jondifool is offline
Private
 
Join Date: Mar 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Jondifool is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

It could be just me thinking this but isn't dom2 quite suited to having different AI strategys. Something like giving the pretenders personality in form of different play and recruit styles. The game just needs a few archtypes to seleckt
from,and then the AI would not be that predicteble, and hopefully also more challenging.

the pseudocode in this exsample could be one, change the prioritys a bit and we have another.
Reply With Quote
  #6  
Old April 17th, 2004, 07:07 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Quote:
Originally posted by Jondifool:
It could be just me thinking this but isn't dom2 quite suited to having different AI strategys. Something like giving the pretenders personality in form of different play and recruit styles. The game just needs a few archtypes to seleckt
from,and then the AI would not be that predicteble, and hopefully also more challenging.

the pseudocode in this exsample could be one, change the prioritys a bit and we have another.
All quite true. But unless the code is going to be split, it doesnt do us much good to psuedo code it.

Im not sure if psuedo-coding a change in the linear AI code will get put in either, it just seems more likely.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #7  
Old April 17th, 2004, 10:23 PM

LDiCesare LDiCesare is offline
Captain
 
Join Date: Apr 2004
Location: France
Posts: 820
Thanks: 4
Thanked 33 Times in 24 Posts
LDiCesare is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Hi!
I don't get this one:
- priest w/o magic IF turnnumber*3 < numberofpriests
If you have no priests, this condition will always be false and you'll never build any. Isn't that supposed to be a >?
In general, I'm afraid these rules will let you build too many units that resist fights well and not enough fodder if you need fodder. It also won't adapt to the opponents. I don't like rules which don't adapt themselves to the context.

In my own game, I programmed the ai to adapt itself to the opponent. This means it tries to have a certain distribution of forces, based not on types of units -not moddable- but on unit abilities. So I basically say I want a distribution of f.e. 20% archers, 20% fast units, 40% heavy infantry, 10% leaders, 5% fortresses, 3% labs, 2% temples, and the ai looks at the current distribution of units it's got and builds new units in order to be able to reach that goal. This means you have a 'fitness' function evaluated for each unit you coudl build: If you need more priests, the system will pick a priest. If you need more mages, it will build a mage. If you need both, it will build a priest that also has magic powers.
I included fortresses, labs, etc. in the distribution because I see it as distribution of the money to be spent (and yes the figures are silly - you probably need more temples than labs). That way if you have a lot of troops and only one fortress, the fitness of building a fort somewhere will be huge, while building any kind of troop will be low. This one may be tricky since you can always do something with more troops but not with more fortresses, so you may want to exclude fortresses from the list. However, the original proposal of building fortresses once every ten turns if some conditions effectively means fortresses have a weight of 10% of all money spent.
I'd also suggest budgeting in advance: You plan to build this or that next turn, with a set priority. This lets you build up money for buildings when necessary.

Note it's possible or even desirable to use the enemies' distribution of forces as your own target if you can't think of a distribution yourself. In particular if you are swarmed with crappy light infantry, you may want o build more crappy troops yourself so your heavy infantry won't exhaust itself to death against huge hordes. Or decide that known enemies of type 'light infantry' means you must build more of the type 'archer', and 'undead' requires more 'priests'.

I coded something like that in my own game. You can check a more thorough explanation of the algorithm this: link if you are interested.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:01 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.