|
|
|
|
 |

November 28th, 2005, 02:42 PM
|
 |
National Security Advisor
|
|
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
|
|
Re: AI: Castle Building Algorithm
I would use sites' effects instead of their rarity when calculating the costs. So, gem income, recruitable units/commanders, summonable units etc would increase the favorability (of building a fort in that provicne), disease, negative scales, horror attacks etc. would devrease it.
I haven't tested it, but I have a feeling the AI might start building castles into provinces it has no hope of being able to hold... So the province would HAVE to have at least one friendly neighbour, and having 2-3 would be preferred.
Also, what can FORTFUND be used for, and is the remainder in FORTFUND transferred to normal treasury whenever a castle is built?
|

November 30th, 2005, 03:09 AM
|
|
Corporal
|
|
Join Date: Feb 2004
Posts: 165
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: AI: Castle Building Algorithm
Endoperez: FORTFUND is just a sort of virtual holding bin for money saved out for fort building. So, no, this money stays in the bin until it is used, any extra will theoretically be held for the building the next fort. It may be that an operation to return funds in excess of FORTCOST or maybe (2 * FORTCOST) to the general treasury would be an improvement. I suggest the latter for initial testing.
If you are testing this, you should be keeping a side note of the FORTFUND, keep comparing it to your unspent funds, and be very careful not to spend any of it for other purposes--that would blow the test.
I suppose you could cap the fort-building at some number as well. Have it check the number of forts it owns against a limit. Maybe derive the limit from a formula based on number of provinces in the game and number of nations in game.
I do agree that site effects rather than site rarity should affect fort building, but I also think that many site effects are not worth a bonus in this algorithm.
I would consider a 4+ gem site worth a +1; special troop and commander provinces are already covered.
I'm not sure that the AI would be building in places it couldn't hold, any more than a player in the same circumstances would be. It's not as if the player can see the AI building anything and mass against it. (Of course, if the player has a copy of the routine the AI uses, this is a major cheat as it makes the AI far too predictable.)
I look forward to a test report.
|

November 30th, 2005, 10:03 AM
|
 |
National Security Advisor
|
|
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
|
|
Re: AI: Castle Building Algorithm
A 4-gem site would be worth a +1, yes, but so would 4 1-gem sites, wouldn't they? It might have to be worded differently, like:
each 4 (5? 6?) gems received from the province: +1
Would this be better?
|

December 1st, 2005, 01:07 PM
|
|
Private
|
|
Join Date: Oct 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: AI: Castle Building Algorithm
I don't know much about how the AI places troops- would it be possible to put an "extra army" in a place that is being castled?
This is to prevent the AI losing forts before they're completed. . .
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
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
|
|
|
|
|