Are Constant Values Working Properly?

Post ALL Public Beta feedback here!

Moderators: Gil R., ericbabe

Post Reply
LeBlaque
Posts: 60
Joined: Mon Apr 02, 2007 12:56 am

Are Constant Values Working Properly?

Post by LeBlaque »

I'm trying to "understand" why the AI is doing certain things... by example why I have a 3-brigade "rogue" CSA Calvalry Division that has sieged/taken Kansas' cities and Springfield and Chicago without any type of response from the Union AI. Consequently, I looked at the acwConstants.txt file and reviewed the comments made by Erik in one of his posts. A few questions based on the following and my game experience:

1) AI_RefuseOddsx100 70
Below this power ratio the AI won't consider the move at all.

I have seen the Union AI attack on a 1:2 disadvantage in Strength. Now they did have far more artillery, but the way I read the formula the AI should not attack unless they have at least 70% Strength compared to the defender. This was not an isolated instance but happened three consecutive turns. Is the constant working properly or does something in the explanation require clarification or am I missing something...

2) AI_ReluctanceScalex100 100
Modifies the reluctance of the AI to fight battles in a province where it recently lost.

The way I interpret this formula is that it is available to modify, but with the "100" variable selected there is no impact on value. I tried lowering this to "75" to note any difference (with the hope reluctance would increase-- value would be established at 75% of calculated "norm"), and didn't see anything "new" occur. Is this variable working/worth tweaking? In the 3 battles noted in 1) above the Union AI lost each time but kept coming back for more.

3) AI_OutOfTheaterMultiplierOnValuex100 50
If the target is out of theater relative to the current unit, the AI lowers its value. Default is 50%.

This was noted in Erik's text but in the acwconstants file it is set to 20, not 50. Does this mean the value of an out of theatre target is 20% of the "norm?" I also noted in a different file that you have over a dozen theaters in FoF. Can this be reduced/revised in that file without screwing things up? With so many theatres and this reduction factor of 20, it seems that the AI might often ignore units in provinces effectively "right next door." Forgive me if I'm interpretting all of this wrong.

4) AI_ValueDistance0 1000
AI_ValueDistance4 100
These are multipliers to the value of a target based on distance from the currently moving unit.

Am I interpretting correctly that an target in-province with the attacker is essentially worth TEN TIMES the value of an equivalent target four provinces (or one month's march) away?

AI_EnemySiegex100 210
The presence of an ongoing enemy siege multiplies the value. The default is 2.1.

This circles me back to the intro where I'm wondering why my sieging cavalry is not being pursued. Based on this, a besieging unit is valued at just over 2x its normal worth. Incorporating the distance factors it would appear the AI would attack an equivalent unit in the same province NOT SIEGING as opposed to attacking a target two provinces away that was undertaking a Siege (AI_ValueDistance0 1000 versus AI_ValueDistance2 400*2.1). Am I interpretting this correctly? Given the game mechanics and the point value of sieges related to taking opponent cities, should the AI ignore a siege that is so close?

Based on Erik's post, I'm trying to tweak this file, but in doing so have not had much noticable difference in AI behavior. Do I have to start a new game for the new acwconstants.txt file to take effect? Given my questions, are some of these constants working as intended?

Thanks for the feedback,

Regards,

LeBlaque
User avatar
Erik Rutins
Posts: 39761
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Are Constant Values Working Properly?

Post by Erik Rutins »

Eric will have to address the majority, but I can add one comment.
ORIGINAL: LeBlaque
I have seen the Union AI attack on a 1:2 disadvantage in Strength. Now they did have far more artillery, but the way I read the formula the AI should not attack unless they have at least 70% Strength compared to the defender. This was not an isolated instance but happened three consecutive turns. Is the constant working properly or does something in the explanation require clarification or am I missing something...

"Power" is not the same as game strength in men. I believe the AI looks at unit quality, armament, generals, etc. in determining the power ratio so it could attack at 1:2 in overal men if it has something like the ANV doing the attacking against a less experienced and poorly led defending army.
The way I interpret this formula is that it is available to modify, but with the "100" variable selected there is no impact on value. I tried lowering this to "75" to note any difference (with the hope reluctance would increase-- value would be established at 75% of calculated "norm"), and didn't see anything "new" occur. Is this variable working/worth tweaking? In the 3 battles noted in 1) above the Union AI lost each time but kept coming back for more.

I believe that a higher number will increase the reluctance.
Based on Erik's post, I'm trying to tweak this file, but in doing so have not had much noticable difference in AI behavior. Do I have to start a new game for the new acwconstants.txt file to take effect? Given my questions, are some of these constants working as intended?

I do believe it may require a restart for these to take effect, but Eric will have to confirm that and address the rest of your questions.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
ericbabe
Posts: 11852
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: Are Constant Values Working Properly?

Post by ericbabe »

ORIGINAL: LeBlaque
1) AI_RefuseOddsx100 70
Below this power ratio the AI won't consider the move at all.

I have seen the Union AI attack on a 1:2 disadvantage in Strength. Now they did have far more artillery, but the way I read the formula the AI should not attack unless they have at least 70% Strength compared to the defender. This was not an isolated instance but happened three consecutive turns. Is the constant working properly or does something in the explanation require clarification or am I missing something...

The exact formula for power is dependent on Quality, Disposition, Strength, Attributes, Special Abilities, and Strength.

The way I interpret this formula is that it is available to modify, but with the "100" variable selected there is no impact on value. I tried lowering this to "75" to note any difference (with the hope reluctance would increase-- value would be established at 75% of calculated "norm"), and didn't see anything "new" occur. Is this variable working/worth tweaking? In the 3 battles noted in 1) above the Union AI lost each time but kept coming back for more.

If you want higher reluctance, then you want a higher value. You'd probably need more than three data points before you'd see a statistical difference in behavior.
This was noted in Erik's text but in the acwconstants file it is set to 20, not 50. Does this mean the value of an out of theatre target is 20% of the "norm?"

Yes. There aren't a dozen theaters in FOF though, only 5 plus a few "mountain" non-theater provinces.

Am I interpretting correctly that an target in-province with the attacker is essentially worth TEN TIMES the value of an equivalent target four provinces (or one month's march) away?

Yes, except that most large military units will take 2-3 turns to get 4 provinces away. If you experiment with radically different sets of numbers, let me know if any turn out well.

This circles me back to the intro where I'm wondering why my sieging cavalry is not being pursued. Based on this, a besieging unit is valued at just over 2x its normal worth. Incorporating the distance factors it would appear the AI would attack an equivalent unit in the same province NOT SIEGING as opposed to attacking a target two provinces away that was undertaking a Siege (AI_ValueDistance0 1000 versus AI_ValueDistance2 400*2.1). Am I interpretting this correctly? Given the game mechanics and the point value of sieges related to taking opponent cities, should the AI ignore a siege that is so close?

Well it's only about 4 provinces from Fredericksburg to central Kentucky, and people seemed not to want the Army of the Potomac to go wandering off into central Kentucky, and I tend to agree.

Based on Erik's post, I'm trying to tweak this file, but in doing so have not had much noticable difference in AI behavior. Do I have to start a new game for the new acwconstants.txt file to take effect? Given my questions, are some of these constants working as intended?

I've tested the values and they do seem to be loading properly from the file. I don't know enough about how you've modified the values, how many trials you've done, to say whether you should be seeing a difference. The AI also has a lot of heuristic behavior built into it in addition to the maximization of target values that it does.

Image
LeBlaque
Posts: 60
Joined: Mon Apr 02, 2007 12:56 am

RE: Are Constant Values Working Properly?

Post by LeBlaque »

Thanks for the feedback. I'll let you know if I come up with anything exciting as I did mod the acwconstants file significantly with the most relevant pasted below:

AI_IdealOddsx100 170
AI_RefuseOddsx100 70
AI_ReluctanceScalex100 150
AI_OutOfTheaterMultiplierOnValuex100 40
AI_ValueDistance0 1000
AI_ValueDistance1 900
AI_ValueDistance2 800
AI_ValueDistance3 600
AI_ValueDistance4 500
AI_ValueDistance5 250
AI_ValueDistance6 200
AI_ValueDistance7 125
AI_ValueDistance8 60
AI_ValueDistance9 30
AI_ValueDistanceGr9 10
AI_EnemySiegex100 410

As a side, I also spent a signficant amount of time editing the acwProvinces.txt Theaters (moving provinces around and re-creating the core five theaters) to try to "resolve" what I thought were some AI "shortcomings." I'll let you know of progress....

Post Reply

Return to “Public Beta Feedback”