The Big Question - How Does The AI Choose Which Units To Build?

Howitzers in the American Civil War actually were shorter range pieces for the most part.

Parrotts do have the range of "traditional" Civ artillery, range of 2 actually. Howitzers have been given a range of 1.


When I said offensive values, I meant the attack stat, not the bombard strength.
 
Originally posted by Procifica
The idea of Artillery though is attacking without suffering loss, Kryten.

Couldn't we just assume that if they are destroyed when attacking, it is because of counter battery fire, or rifle armed sharpshooters picking off the crewmen?

Hmmm....I am begining to like the idea of having catapults/bombards/cannons with an attack as well as a bombard factor.
If you or the AI wish to engage the enemy with long ranged 'roundshot', then you bombard (it only causes a few hit point losses, but you don't suffer any damage yourself).
If you or the AI wish to get in close with 'canister' or 'grapeshot', then you attack with them (but you may have the unit damaged or lost). :)

Of course, this dosen't sound quite right for WW1 Howitzers, and the AI probably would always attack and never bombard with them.
Still......

Another experiment to add to your list oz:-
What does the AI prefer to build?
* Duel offensive & defensive Napoleonic Infantry, with stats of 4-4-1?
* Offensive Cavalry, with stats of 6-3-3?
* Or offensive & bombardment Cannons, with stats of 8-1-1 and a bombard of 8 with a range of 1?

:)
 
OK, I did a little test on the AI's treatment of dual-strategy units.

I modded the Bab Bowman to have both the Offense and Defense AI Strategies, and forced them to build only Bowmen. In the first test, they were given a starting force of four Archer, in the later one of four Spearmen.

In both cases, the AI flagged all Bowmen it built as "OFFENSE". It seemed to ignore the Defense setting on the Bowmen totally. The Spearmen went on defensive business as usual in the later test.
 
AI probably would build the Cavalry, it likes FAST units.
 
There are very strong indications that AI will
NEVER build naval units on a 1 continent map.

We are working with this at ACW.
Comments are welcome.

Rocoteh
 
Originally posted by Rocoteh
There are very strong indications that AI will
NEVER build naval units on a 1 continent map.

We are working with this at ACW.
Comments are welcome.

Rocoteh

I have seen it plenty. AI does build naval units on huge pangeas, and will send ships over not only to explore, but also to drop off enemies near ungaurded cities. Perhaps the story is different on a flat world.
 
Originally posted by The Last Conformist
Neomega: Where there any minicontinents or nonforgetable islands on those maps? (In ACW there is one island - one tile big.)

I must admit there was one small continent.
 
PLEASE have a look at this an offer any comments in the next day or two -- this first step is the cornerstone from which I'm hoping / planning all future experiments to proceed ...

Game Conditions & Settings Test Round 1

The purpose of this round is to evaluate the AI selection among 3 types of units, each roughly equivalent: each unit has an Attack and Defense = 4, 5, or 6. Combined Attack + Defense for each unit = 10. All units move 1. Conditions (read below) have been set to make this test as absolutely "vanilla" as possible.

1. There are three Civs. Each Civ has three cities and begins with no units.
2. Each city begins at size 1.
3. Cities are limited to a maximum size of 4.
4. Each Civ is limited to one Gov type, “Despotism” modified to “Communal” corruption and no tile penalties. All units are free, no units may be rushed, and war weariness is “none”.
5. No Civs have been given any bonus traits (Commercial, Expansionist, etc.)
6. Aggression for all Civs has been set to “3".
7. All Civs have been made members of different cultural groups.
8. All terrain is plains which produce 1 food and nothing else.
9. There is one bonus resource which provides 20 gold; one of these is available for each city.
10. Standard victory conditions are in use.
11. For this round, three unit types exist – “Warrior” (A/D/M = 6/4/1) “Archer” (5/5/1) and “Swordsman”(4/6/1)
12. All units cost 20 and do not require support.
13. EDIT: No Civ AI strategies have been checked (e.g., "Build Often"; etc.); unit strategy flags for all three unit types have been set to both "offensive and "defensive".
14. Victory Locations have been added: 1 in each capitol, and three in the center of the landmass
15. Number of citizens born content = 3; number of citizens quelled by military = 1.
16. Level of play = Regent.

Pic of map is below.

Abraxas,

Oz
 
Originally posted by The Last Conformist
I thought the AI wouldn't build a unit without any AI strategies enabled?

See? -- Exactly what I meant! :crazyeye: All three unit types are now flagged both offensive and defensive -- I'll run 20-30 turns tomorrow and see what gets built.

- Anything else? I just hate missing the trees because of the forest blocking the view ;)

Gracias,

Oz
 
Just thought I would drop back in to check on progress.... very interesting so far. GJ and GL yall =)
 
In fact I was giving up the experiment when The Last
Conformist pointed out it could be a good idea testing
declaring war with AI.
I declared war and AI direct responded with starting
produce naval units.

With regard to ACW, Misfit_travel have come with an
idea that hopefully will make AI produce naval units
both as USA and CSA.

With regard to my personal mod (I always use a Earth-map)
I am concerned. Forcing AI to produce naval units seems
to be harder than I thought.


Rocoteh
 
Originally posted by Rocoteh

With regard to my personal mod (I always use a Earth-map)
I am concerned. Forcing AI to produce naval units seems
to be harder than I thought.

Rocoteh

Yeah, I'm a big Earth map fan myself -- it's been dead a few days (but, believe me, it's temporary!) but I also started a thread in tandem with this one called An Extinct Civilization Manifesto

Although it's initial intent was to speculate -- via a model of different Civ types! -- what, say, a 19th Century CE Babylonian military might look like, I also intend to see if playing with unit costs AND force pool structure might achieve the sort of results we all seem to hope to achieve ...

... Now onto the next post and the results of the first test ...:)
 
I ran the "experiment" described above for 20 turns. The only change was that I upped production so each city would produce 1 unit per turn.

Recall that the three types of units were:

"Warrior" A/D/M = 6/4/1
"Archer" A/D/M = 5/5/1
"Swordsman" A/D/M = 4/6/1

All units were flagged both "offense" and "defense".

I was Roman (north center of map) with Greeks to my southwest and Egyptians to my southeast.

I let the Governor make all "my" build decisions. I also let peace reign for 8 turns before starting simultaneous wars which I waged more aggressively against the Egyptians.

Results:

I. Peacetime builds = first 8 turns (each Civ = 24 units total):


Ia. Romans = 24 Warriors

Ib. Greeks = 6 Warriors, 5 Archers, 13 Swordsmen

Ic. Egyptians = 12 Warriors, 1 Archer, 11 Swordsmen

II. Wartime builds = next 12 turns (each Civ = 36 units total):

Ia. Romans = 36 Warriors

Ib. Greeks = 14 Warriors, 8 Archers, 14 Swordsmen

Ic. Egyptians = 13 Warriors, 7 Archers, 16 Swordsmen

III. Total builds = 20 turns (each Civ = 60 units total):

Ia. Romans = 60 Warriors
( 100% Warriors )

Ib. Greeks = 20 Warriors, 13 Archers, 27 Swordsmen
( ~33% Warriors; ~22% Archers; ~45% Swordsmen )

Ic. Egyptians = 25 Warriors, 8 Archers, 27 Swordsmen
( ~42% Warrirors; ~13% Archers; ~45% Swordsmen )

Lessons, Observations, & Best Guesses

1. Never let your governors do all your building for you :)
2. Fully "balanced" units (the 5/5/1s) were a minority choice, although the spread narrowed ... significantly? ... in wartime.
3. Romans aside, there was a slight-to-slightly significant peference of 4/6/1s over 6/4/1s.
4. The identical Civ and unit settings for the Greeks and Egyptians, as well as their essentially identical strategic starting positions, indicates (i) that there is some randomness in the choice the AI makes to build units (i.e., the Greeks building nearly twice as many archers as the Egyptians overall -- and 5 times as many during "peacetime") and (ii) there is a slight preference given to defensive over offensive capabilities ...
4. Units flagged as "defensive" by the AI were at times used aggressively for offensive purposes -- i.e., marched a long way from home to attack my cities (sorry, I didn't tally the breakdown of offensive vs. defensive assignments by unit type -- but it hardly seems necessary given the identical proportion of 4/6/1s built by the two AI Civs; of course I'll also be the first to admit that determining a meaningful statistical threshhold is most definitely open to question!)
5. THE AI SHOWED NO INTEREST IN THE VLs WHATSOEVER!!! (i.e., the ones in the center of the board were NEVER occupied, even when I lured the AIs units to them).

Next Step(s)
PLEASE COMMENT ON THESE!!! (i.e., do you think they're meaningful/worthwhile or not) --
1. I'm tempted to rerun the test using "Regicide" rules to see if these initial build proportions change significantly.
2. Run a test with the three types of units being 6/3/1, 5/5/1, 3/6/1.
3. Next run a similar test re: movement factors -- i.e., see what it takes to make a unit with a move of "2" seem equally valuable to a unit with a MF of "1".
4. Determine what units in all these tests are "equivalent" (e.g., produced by the AI +/- ... 10%??)
5. Vary offense/defense flags by unit type; see if this has any effects on the result of step (4).
6. Vary hidden/blitz/ZOC flags ... working out a methodology for that one should be interesting, as in the ancient Chinese curse ("May you live in interesting times.")
7. Vary AI aggressiveness ...
8. Find nice, isolated desert island without internet access to recuperate on ...;)

Onward & Upward!

-Oz
 
  • Like
Reactions: md4
Originally posted by The Last Conformist
OK, I did a little test on the AI's treatment of dual-strategy units.

I modded the Bab Bowman to have both the Offense and Defense AI Strategies, and forced them to build only Bowmen. In the first test, they were given a starting force of four Archer, in the later one of four Spearmen.

In both cases, the AI flagged all Bowmen it built as "OFFENSE". It seemed to ignore the Defense setting on the Bowmen totally. The Spearmen went on defensive business as usual in the later test.

Combined with the result of my own testing, I'm beginning to wonder WTH the AI actually uses these flags for ... of course we (or,at least, I) am some way off from testing the interaction between the unit flags and the AI "Build Often" etc. flags ...

-Oz
 
This experiment is very interesting. I hope you will continue.
Only experiments like this can give a true picture on how
AI works with regard to production.

Its is easy to assume things on this subject.
I assumed (when working with my personal mod) that
checking only "build often" naval units for a CIV would
result in great naval production for that CIV.

My ACW-related experiment showed that AI did not
work that way.

Rocoteh
 
Back
Top Bottom