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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







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

Reply
 
Thread Tools Display Modes
  #11  
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
  #12  
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
  #13  
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
  #14  
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
  #15  
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
  #16  
Old April 27th, 2004, 12:26 PM
Arralen's Avatar

Arralen Arralen is offline
Major General
 
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
Arralen is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Looks like no-one liked the idea that much that he put some time into testing it. As my time is severly limited, I didn't get very far in my test game 'til now.
Here's the result - I tried to move/attack in a fashion I've seen the AI doing it :

turn 0_______________________________________________
sidhe war godess
water6, earth 4, death 1
growth, luck, magic +1, DOM 4
fortified city .. 6 points left

against difficult AIs:
Abysia, Ulm, C'tis, Caelum, Pangaea, Vanheim, Jotunheim, Machaka

on Karan w/o waterways
indies 7, rare random events, rest standard

prov tax set to (100-unrest)% each turn
__________________________________________________ __
turn 1
start:
prov. 123, inc. 190, ress 80
treas. 400, inc. 190, upk. 17
builds:
sidhe lord 280/16
2 danoine sidhe 35/16
2 cu sidhe 16/1
1 longbow
remain: 6 gold/24 ress.
__________________________________________________
turn 2
treas. 165, inc 190
(123) ress 80
declares prophet
builds:
bard 75/5
2 danoine sidhe
1 cu sidhe
remain: 4 gold/42 ress.
__________________________________________________ _
turn 3
treas. 165, inc 190
(123) ress 80
random: witch Branwen A2S2N3
assembles for attack on
neigbouring prov (50 militia & LI):
Castellan, 15 HI, 6 LongB (fire achers)
Sidhe War Godess (5x Cast, Attack nearest)
Sidhe Lord prophet (divine bless, cast)
4 danoine sidhe (fire nearest)
3 cu sidhe (hold, attack rearmost: flank)
set up in middle of map
builds:
bard
2 danoine sidhe
1 cu sidhe
remain: 4 gold/42 ress.
__________________________________________________ __
turn 4
fight in (128)
5 archer(3), 20 militia (3), 10 light inf (6), 3 commander (11) LOSSES: 1 MI spearman(9)
random: 28 unrest in man
treas: 95, inc. 90, upk 36
(123) inc 84, ress 74
(128) inc 6, ress 12
attack on next prov (121): 40 LI, Crossb, HI
builds:
(123)
monk 30/1
4 tower guards
1 slinger
(128) nothing
remain: 6 gold/3 ress
__________________________________________________ _
turn 5
research Alt1, Evo1
fight in (121)
11 crossbow(5), 7 HI(13), 15 Jav(9), 3 Com(13)
LOSSES: 1 Longb, 3 HI, danoine sidhe retreat
(2 danoine sidhe go to 128, I'll leave them there)
treas. 63, inc 125, upk 38
(121) inc 5, ress 25
(123) inc 112, ress 105
(128) inc 8, ress 12
army goes back to (123)
builds:
def 2 in all prov
(123)
forester
1 cu sidhe
1 Longb
(121),(128) nothing
remain: 4/92
______________________________________________
turn 6
research Alt1,Evo2
treas 88, inc 158, upk 41
(121) inc 5, ress 26
(123) inc 142, ress 111
(128) inc 11, ress 13
priest moves to 121 to build temp
army assembles for attack on
neigbouring prov 116 (50 LI, Crossb, HI):
Castellan, 11 HI, 6 LongB (fire achers)
Sidhe War Godess (5x Cast, Attack nearest)
4 tower guards
Sidhe Lord prophet (divine bless, cast)
4 danoine sidhe (fire nearest)
5 cu sidhe (hold, attack rearmost: flank)
set up in middle of map
builds:
(123)
castellan
1 danoine sidhe
1 cu sidhe
1 slinger
(121,128) nothing
remain: 0 gold, 42 ress
__________________________________________________ ___
turn 7
power ranking
provinces: 1 / forts: - / income: 6 / gem inc.: - /research: 6 /dominon: 6 / army size: 8
research Con1, Alt1, Evo2
treas 135, inc 185, upk 45
(116) 17, 11
(121) 6, 27
(123) 152,126
(128) 10, 13
priest builds temple in 121
random: Beothric, knight of Stone lead-75
Jotunheim sighted in 86
2nd castellan set out to gather dainone sidhe from 128
armies attacks 106 [to cut of Jotunheims advance - as the AI always does] (60 woodsmen, blowpipes)
builds:
castellan
(116,121,128) nothing
remain: 2 gold
___________________________________________
turn 8
treas 169, inc 223, upk 45
(106) 23, 19
(116) 22, 12
(121) 7, 28
(123) 116,132
(128) 10, 13
fight in (106): 2 LOSSES: HI
prophet builds temple in 106 (next to Jotunheim prov.)
SWGss searches for sites
army sits idle
3rd castellan moves up with 1 d-/1cu sidhe
builds:
(123)
castellan
1 d-sidhe
(106,116,121,128) nothing
remain 1 gold

___________________________________________
turn 9
treas 176, inc 249, upk 48
....

I think it does quite fine 'til now, maybe it is a little bit fond of building castellans. Even bulding much more scouts wouldn't do that much good, so maybe I'll put in a %tage (growing with turns elapsed) that, if no mage is build, NO commanders is build unless there's a dire need for leadership.

Other suggestions?
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
Reply With Quote
  #17  
Old April 27th, 2004, 05:38 PM

Scott Hebert Scott Hebert is offline
Second Lieutenant
 
Join Date: Feb 2004
Location: Titusville, FL
Posts: 450
Thanks: 0
Thanked 0 Times in 0 Posts
Scott Hebert is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Something I would change is the unrest part of that idea.

Taxes should be lowered by 20% for each 5 points of unrest in the Province. This results in 0 Unrest in the Province the next turn (assuming 25 or less Unrest) so that the Tax Rate can be raised back to 100%. Since unrest itself lowers the income of the province, this is preferable IMO than waiting for it to resolve itself.
__________________
Scott Hebert
Gaming Aficionado
Modding Beginner
Reply With Quote
  #18  
Old April 28th, 2004, 07:22 PM
Kristoffer O's Avatar

Kristoffer O Kristoffer O is offline
General
 
Join Date: Aug 2003
Location: Sweden
Posts: 4,463
Thanks: 25
Thanked 92 Times in 43 Posts
Kristoffer O is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Hmm, it's a bit difficult to follow without graphical representation. I should test it when I get some spare time.
__________________
www.illwinter.com
Reply With Quote
  #19  
Old April 28th, 2004, 09:01 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 Kristoffer O:
Hmm, it's a bit difficult to follow without graphical representation. I should test it when I get some spare time.
Family man, teacher, game developer. And you talk about testing this for us when you get "free time"?

Now Im feeling guilty. I KNOW I have more free time than you do.
__________________
-- 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
  #20  
Old May 9th, 2004, 05:50 PM

MStavros MStavros is offline
Corporal
 
Join Date: Sep 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
MStavros is on a distinguished road
Default Re: SUGGESTION: AI troop building algorithm

Ah, so anyone came up with any good ideas so far in this topic?
Reply With Quote
Reply

Bookmarks


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 11:47 PM.


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