|
|
|
|
|
April 16th, 2004, 04:17 AM
|
|
Major General
|
|
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
|
|
SUGGESTION: AI troop building algorithm
I think this should fix most issues with the AI troopbuilding.
I dunno how squad assembly or troop gathering from provinces work, so maybe this has to be tweaked accordingly.
Could anyone else than me use this algorithm in a test game to see if it works out? Could be that I'm quite biased and don't see obvious weeknesses...
for call buildcastle go here BUILDCASTLE
code:
0) IF ERMOR(Ash, soul)OR PANGAEA(CarrWoods) GOTO 2)
CALL BUILDCASTLE
IF (availablemoney) STILL >400
BUILD lab where's a special commander(mage) to build
IF (numberofprovinces)>(numberofcastles)*4
AND ((turnnumber)-(numberofcastles)*10)*10%=true SAVEMONEYTURN=true
1) Build troops at castles in following order
- most expensive mage commander (max. 1/2 of available money)
- assassin/spy/bard etc. IF ((turnnumber)-5)*10%=true
- priest w/o magic IF (turnnumber)*3<(numberofpriests)
- most heavily armed commander IF (turnnumber)>5
- scout
- holy troop IF (bless effect)=true
- heavy troopsress)>14 with (strat move)>1, best move first IF 2 pieces possible
- heavy troopsress)>14 IF 3 pieces
- medium troops: (ress)>11 IF 3 pieces
- archers: IF Long-/Compound Bow
- light troops: (ress)>7 IF 3 pieces
- fill with light archers
[if there are multiple troops that fit a condition, mix equally]
[bless effect=true IF 3 pathes @4 OR 1@6/1@4 OR 1@9 or better]
2) Build special troops
- special commanders IF mage
OR
IF special troops ARE undead, amphibic, flyers
- build as many special troops as ressources, (availablemoney)/2, (commandvalue) allows
3) Build patrols at province w/o castle and less than 20 troops on patrol
IF borders enemy prov.
OR has lab, but no castle
OR has only 2 land neighbours
OR has 3 neighbours, but only 1 owned
THAN BUILD
- most mobile commander IF (troopnumber)>(commandvalue)
- highest movement[for patrol]
edited:
if you have trouble deciphering the "code" part, use the font size option of your browser. There's no way I could fiddle with it using the BB code here...
***!!, *URL* tag doesn't work within *code* tag, so I had to put the URL for the castle buildind algorithm seperatly
[ April 16, 2004, 06:45: Message edited by: Arralen ]
__________________
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 ...
|
April 16th, 2004, 05:20 AM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
Finally. A real and testable suggestion which isnt overloaded with nation-specifics.
__________________
-- 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!)
|
April 16th, 2004, 06:30 AM
|
Sergeant
|
|
Join Date: Apr 2004
Location: In your mind
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
You spelled assassin wrong, I'm not a modder, but I think programming is very specific about spelling.
|
April 16th, 2004, 06:36 AM
|
|
Major General
|
|
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
I was thinking about something definitly more complex, but than it dawned to me that such a solution wouldn't work:
The more complex the building algorithm gets, the more you'll have to account for the complexity of the real situation.
But than we would be talking about writing a real, albeit small, AI for each nation seperatly. It's a bit a "all or nothing" situation here. So I went for "allmost nothing" (some call it " keep it simple, stupid", but I always wonder if the comma is ment to be there ").
Anyhow, here's my first draft, numbers will shurely have to be tweaked and some things won't work with the rest of the game/code in this way, but we'll see.
@HotNifeThruButr
**** you, ****** grudger !!
This is pseudocode anyway - nothing to put in a mod file.
Would be cool to have AI scripts, but we won't see that for years I guess.
And it's "hashishin" or something like that (can't remember exactly) in reality. If anyone is intered, look it up for yourself.
[ April 16, 2004, 06:36: Message edited by: Arralen ]
__________________
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 ...
|
April 16th, 2004, 07:16 AM
|
Sergeant
|
|
Join Date: Apr 2004
Location: In your mind
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
...
Just tryin' to be helpful
|
April 16th, 2004, 07:34 AM
|
|
Major General
|
|
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
And I put a smily in there... maybe I'll put some more ...
But "asashin", "assassine", "ashassinne" or whatever wouldn't make any difference - the devs would have to turn it into C code anyway.
Players could print it out and try running a test nation/game with it, though. Think they wouldn't be that sensitive vs. spelling, would they?
__________________
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 ...
|
April 16th, 2004, 08:00 AM
|
Sergeant
|
|
Join Date: Apr 2004
Location: In your mind
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
|
April 16th, 2004, 10:47 AM
|
Second Lieutenant
|
|
Join Date: Jan 2004
Posts: 510
Thanks: 24
Thanked 31 Times in 12 Posts
|
|
Re: SUGGESTION: AI troop building algorithm
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).
That aside, the two worst potential weaknesses with your algorithm are that a) recruitment as presented is completely separate from the already existing force composition and b) recruitment is independent of location.
case a)
That means that in case of casualties, troops will not be recruited to replace capabilities lost, except by chance. If a lot of leaders bite the dust (e.g. through a determined assassination campaign on behalf of an enemy), no more leaders are bought to replace them than those who would be bought anyhow. Likewise, if a series of battles sees the light elements of the AIs force composition slain, it will not rush to reproduce the capability.
case b)
As a country grows larger, it becomes much more important where troops are recruited. The current AI recruitment strategy of hordes of troops all over the place is pretty forgiving of this case, as the troops bought are ususally quickly moving and can easily be gathered where needed. The AI can easily mass troops because, honestly, masses of sword fodder is what it recruits all over the placed.
Your recruitment strategy, based on fewer but higher quality troops, would work much worse with the "any location goes" for recruitment as it can take an obscene amount of time to move heavy troops from one end of an empire to the other.
I fear your entire step 1) is deeply flawed - as described, it seems incredibly easy to counteract as a human.
Step 3) seems intended to set up the AI for defeat in detail. Patrols of size 20 in each border province? Yes, PLEASE, today is a good day for somebody else to die.
-----------
Sorry for being such a spoilsport, but unless your AI takes the currently existing force composition and the front needs in mind when recruiting, I fear that a top-heavy recruitment strategy is one of the worst possible.
[ April 16, 2004, 09:48: Message edited by: Peter Ebbesen ]
__________________
When I said Death before Dishonour, I meant alphabetically.
|
April 16th, 2004, 03:03 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
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!)
|
April 16th, 2004, 05:54 PM
|
|
Private
|
|
Join Date: Mar 2004
Location: SF Bay Area, CA
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|