|
|
|
|
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 ...
|
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
|
|
|
|
|