|
|
|
 |

April 16th, 2004, 10:09 AM
|
 |
Lieutenant Colonel
|
|
Join Date: Jan 2004
Posts: 1,276
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Re: SUGGESTION: AI castle building algorithm
Wow, I dont understand a damn thing about programming and whatnot, but you definately are the man.
(Um hoping you are male, here.)
Um: wow, thanks. That sounds great. Imagine, real AI enemies!
yum....
|

April 16th, 2004, 10:45 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 castle building algorithm
Quote:
Originally posted by Norfleet:
Your castle building policy may also be dictated by your castle choice:..
If ... Wizard tower,...becomes simpler:
IF PROVINCE DOES NOT HAVE CASTLE
BUILD CASTLE
|
I think
Build castle IF money=1.2*(castle cost)
will take care of this very well, but only testing in a "real life" will show. Any takers?
Can't do much testing myself, as time is limited and there's so much to do ... 
__________________
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, 10:50 AM
|
Major General
|
|
Join Date: Jan 2004
Posts: 2,425
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SUGGESTION: AI castle building algorithm
Quote:
Originally posted by Arralen:
Build castle IF money=1.2*(castle cost)
will take care of this very well, but only testing in a "real life" will show. Any takers?
|
I think the underlying problem is that the AI never has any money because it has blown all of its cash hiring garbage. Your troop hiring formulas might improve that, although it still wouldn't stop the AI from squandering most of its money on troops it wastes in futile attacks. For instance, human players tend to win attacks on provinces, unless the attack is anticipated by the defender: In contrast, the AI will often lose attacks even when you did not specifically anticipate it.
|

April 16th, 2004, 10:53 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 castle building algorithm
I can't do a thing about how the AI fights, but I did put in a "moneysaving turn" now and than so the AI will have the money available from time to time to build a castle. Check out.
__________________
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, 03:08 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 castle building algorithm
Sounds good. I like the logic so far. Seems to take into account everyones favorite tactics (except chokepoints but the logic on that would be difficult)
I wonder how much "thinking" this would take. I usually comment that it doesnt matter how long it takes a turn to process because its a "pass turn file to host" type game. But AI improvements mostly affect solo players and improving the AI would do any good if it changes the game to something too slow to hold their attention.
__________________
-- 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, 03:24 PM
|
 |
Major General
|
|
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
|
|
Re: SUGGESTION: AI castle building algorithm
"thinking costs":
I'm concerned about the needed cpu time to re-calculate the "desirability" for each province each turn.
Maybe I can come up with a simple solution that generalizes most cases when you can barely build a castle but prefer to do so over building troops.
choke points
d) has 4 land neighbours, of which 2 are not owned AND not neighbouring owned provinces
.. doesn't this qualify?
[ April 16, 2004, 14:35: 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, 04:21 PM
|
 |
Lieutenant General
|
|
Join Date: Dec 2000
Posts: 2,555
Thanks: 5
Thanked 3 Times in 3 Posts
|
|
Re: SUGGESTION: AI castle building algorithm
Quote:
Originally posted by Arralen:
Build castle
IF money=1.2*(castle cost) OR desirabilty>7
CHOOSE prov with highest "desirability points"
|
It's not bad idea, but I was thinking about something a little different here.
1) Limit amount of gold spent on non-castle provinces (relative value, maybe 30% or even less). That way if AI has enough gold income and too few castles he will generate surplus in gold and wont spent it all on weak easy-to-lose units (Militia, LI). That will allow him to build as much national units as he can and still be able to generate some surplus to build new castles. If AI spends all money on national troops and can’t afford new castle, then he doesn't build new one anyway at least with his current income.
I believe Jasper proposed something like this in LI thread and I like this idea better simply because it will maximize production of national troops without going too deep into unit production scripting.
2) When AI has enough gold to build castle he should decide where to do it. Your proposal is quite good, so I would add only 1 thing there. When deciding for where to build castle AI should take into account ALL neighbors, not only the ones he controls. That way he will be building forts on bordering provinces if they are good, without need for special algorithms.
As for slowdowns, I don't think they should be significant since AI revalue his provinces only when he has enough gold to build castle, not every turn.
[ April 16, 2004, 15:23: Message edited by: Daynarr ]
|
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
|
|
|
|
|