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

Originally posted by Louis XXIV
I got the AI to offensively use catipults. All I had to do was give them 5 FP (4.1.5). They definately used them when I sat next to their city, and would follow it with an Archer attack (I made it so you could only build Archers, Spears, Catapults, and Galleys).

But I also saw several occasions where they'd follow a failed Archer attack with a Spear attack (against a healthy Spearman).

Just to clarify -- were the catapult attacks AGAINST the cities (and, if so, were against combat units in the cities and NOT improvements?) or do you mean that the AI attacked with catapults from WITHIN the city?

Thx,

Oz
 
The second thing. The AI had a catapult in a city, I was right next to the city. They hit me with the catapult and followed it with an Archer attack in the attempt to get me away from their city. They left the catapult in the city at all times.
 
Originally posted by Louis XXIV
The second thing. The AI had a catapult in a city, I was right next to the city. They hit me with the catapult and followed it with an Archer attack in the attempt to get me away from their city. They left the catapult in the city at all times.

Interesting... I have never seen this... Do you have a save?
 
I don't think I have the save, but I do still have the bic file (I changed catapults from 5 Firepower to 3 firepower because it was way too powerful, but I can change it back). It wasn't designed to test, and I only brought it up because I happened to notice it. I don't know if the map, the limits on which units you can build (Archers, Spears, Catapults, Galleys all at the begining of the game, nothing else later) affected it, though.
 
Success, well, sort of.

Hit enter and the Greeks will attack, capture my catapults, and bombard me with them. It wasn't what I originally got, but it's the best for now.

That is, assuming the RNG works out. It should preserve random seed (The attacking Archer will loose and a Hoplite will finish me off), but a test on a different computer resulted in the Greek Archer winning. Hope you get one of these results (because a defensive victory won't end up with the correct result).

I'll see if I can get an example of a direct follow up attack (this was the last move of their turn), but I wasn't able to reproduce it this time.

Hope the upload works.

http://www.civfanatics.net/uploads5/Catapult_Test.SAV
 
ozymandias,

I am playtesting WW2, 1939. Scenario creator: Meateater.

I think these stats after 8 turns are interesting:

British cities producing:

60 Infantry
7 Paratroopers
3 Workers
5 B-17
1 Destroyer
2 Buildings

Build often flagged for: Artillery, Naval, Air, Growht and
Culture.

U.S.A.

U.S.A. cities producing:

25 Infantry
11 U.S. Marines
1 Worker
5 Bombers

Build often flagged for: Off. Land, Naval, Air, Production and
Science.

Soviet

Soviet cities producing:

40 Infantry
3 Tanks
3 Artillery
2 Paratroopers
7 Worker
1 Bomber
1 Submarine

Build often flagged for: Artillery, Growht and Science.

Italy

Italy cities producing:

14 Infantry
4 Tanks
4 Paratroopers
1 Worker
1 Submarine
1 Building

Build often flagged for: Off. Land, Naval, Growth and Wealth.

Japan

Japan cities producing:

16 Infantry
4 Workers
20 Buildings!!!

Build often flagged for: Off. Land, Naval, Air, Production and
Culture.


As we already know its hard to force AI to build naval
units in large quantity on Earth maps. The above
confirms this again.
Later I plan to make Suez channel divide Asia and Africa
and Panama channel divide North and South America.
In AI:s "thinking" that will increase number of continents
from 3 to 5.
I think that will increase AI Naval production.


Rocoteh
 
Hi Rocoteh! -- Excellent to "hear" from you :)

-- This problem with the AI not building ships is beyond annoying. As with artillery, I'm having the terrible sensation that I'll be creating many "automatic creation" improvements with Conquests. I'm glad that AFAIK this can greatly help with ACW; I'm VERY curious to know how it works "over time" -- i.e., does the improvement follow the upgrade path or are Knights Templar still being built to face panzers ...

I also wonder how they've gotten the Pacific scenario to work, unless (if you're correct re: the number of landmasses issue) they've made New Guinea, Japan, et. al. large enough to be considered separate continents by the AI.

BTW, I notice in the build / build priorities list you provided that only the Soviets are building anywhere near a decent amount of artillery -- I also note that they only have THREE preference flags checked; recall our "anecdotal evidence" that more than three flags "confused" the AI? -- Herein may be as close as we come to proof, or do you (i) interpret this differently or (ii) think there's not enough info here to buttress this theory?

-- Also BTW I know I've promised a summary of our results to date (just as I've promised to update the URL library ...) HOPEFULLY this weekend the real world will leave me time for both!

All The Best,

Oz
 
ozymandias,

With regard to Soviet I did the same reflection.

It also very interesting that The Last Conformist and
LouLong have reported AI building large fleets on
non-Earth maps.

No reports so far on large fleets on Earth maps.

...and again the way AI "thinks" North and South America,
Europa+Asia+Africa must be 2 supercontinents, thus
making naval building less interesting.

I am very glad that you continues with this thread.
It sure is needed!

Best Regards

Rocoteh
 
ozymandias,

Now at turn 15 playtesting Meateater:s WW2, 1939.

A short update: Britain (which have lost 80% of the Royal
Navy, do not care) Only change in production is more
paratroopers. AI really like units with special cap.

Soviet: Increase in artillery production from 3 to 9!
Tank: Increase 3 to 6.

U.S.A. Bomber increased from 5 to 10. U.S. Marines
decrease 11 to 5.

Italy: Paratroopers up from 4 to 8.

Japan: 6 Tank and 6 Paratroopers +2 Submarines in
production. 20 Buildings (Science only) still under
constuction.

Edit: Again, I am surprised that not more scenario/mod
creators write in this thread.
If you have 300 units added to a scenario/mod
its hard if AI only use 60 of them....


Best Regards


Rocoteh
 
Originally posted by Rocoteh
ozymandias,

Now at turn 15 [...] AI really like units with special cap.
Soviet: Increase in artillery production from 3 to 9!
Tank: Increase 3 to 6.
U.S.A. Bomber increased from 5 to 10. [...]
Japan: 6 Tank and 6 Paratroopers +2 Submarines in
production. 20 Buildings (Science only) still under
constuction.

Edit: Again, I am surprised that not more scenario/mod
creators write in this thread.
If you have 300 units added to a scenario/mod
its hard if AI only use 60 of them....

Best Regards

Rocoteh

Hi Rocoteh,

Hmm ... I guess I'll be holding off a bit on my summary of our results! -- the Soviet increase in artillery (again, with only three flags checked) is an excellent sign.

Re: the large # of units -- part of the reason I'm holding off on the summary is that I just picked up the Conquests extra CD and plan to d/l and see what's up with Storm Over Europe. Also I decided I do indeed want to do some testing with special cap flags ...

Question: has it been your impression that COST has any real bearing on the AI build decisions? -- All my tests have been at equal cost trying to find that elusive common denominator ...

Insofar as the lack of other mod makers being more involved goes -- I'm as puzzled as you are as the questions we've raised seem to the cut to the very heart of mod-making -- then again, it's also possible that everyone's waiting to see what Conquests really offers and changes.

BTW I was thinking about your notion that the AI only builds ships when there are many landmasses. It occured to me that you could use navigable rivers (and a little loose geography :rolleyes: ) to accomplish this -- e.g., Mississippi to the Great Lakes (inter-connected) to the St. Lawrence Seaway as Coastal tiles -- (1) It shouldn't ahsitorically affect the main campaign areas (2) riverines are suddenly possible (3) fords (and fortresses like Vicksburg??) could be simulated with high defense zero movement transports perhaps with artillery ... Or zero defense to be captured ... Anyway, just a thought -- I've ALWAYS wanted to be able to use riverine craft in Civ!

All The Best,

Oz
 
ozymandias,

With regard to the question if cost has any real bearing
on AI bulding decisions:

My impression is that its not a heavy factor.

Concerning your ideas for ACW, I think they are
very interesting. I will probably use them in
ACWRocoteh.
Since nobody knows if Procifica will return, I have
decided to create a personal revision of ACW.

Since I have no intention to act as "thread-splitter"
the revision will not be up for download when its finished.
I will send it with E-mail after personal request.

Back to AI and bulding:

Yes, the release of Conquests will really be the
moment of truth for AI!!


Best Regards

Rocoteh
 
Hi Rocoteh,

(i) I agree with your impression re: cost -- it's one reason why I ran all my early tests with all units costing equally.

(ii) I'm glad you like my idea re: ACW :) -- PLEASE keep me posted!

(iii) Some chap calling himself Saint Marcus has asked the same question re: AI builds over at Apolyton -- of course I encouraged matters and he's running some tests here.

Best,

Oz
 
ozymandias,

Some good news: I am working with a new WWIII scenario
(I had to scrap the old one due to long loading time) its
called: "Russia demands respect!".

During initial work with France I flagged build often:
naval and air. The remaining options were flagged: build
never.

It works: Inland cities only build Air units and coastal
cities only build Naval units (Nuclear Subs. and Destroyers
right now).

I intend to test it for ACW. At last we may see AI
building naval units there.

Edit: Bad news: It only seems to work with 2 build
often flagged. In ACW it not works at all...


Rocoteh
 
Originally posted by Rocoteh


It works: Inland cities only build Air units and coastal
cities only build Naval units (Nuclear Subs. and Destroyers
right now).

I intend to test it for ACW. At last we may see AI
building naval units there.

Edit: Bad news: It only seems to work with 2 build
often flagged. In ACW it not works at all...

Rocoteh

Hi Rocoteh!

I've been giving this some thought -- for ACW I think you would have to either --

1. Wait for and use one of the "auto-build" improvements per unit type in Conquests (and, evidently, in Conquests, improvements will become obsolete like Wonders, addressing the issue of upgraded units) or,

2 Again with Conquests, make, e.g., Boston and Mobile SEPARATE COUNTRIES of course permanently allied with the USA and CSA respectively, and have them flagged as you describe.

Best Wishes,

Oz
 
ozymandias,

That sounds like very interesting ideas.

Overall I feel optimism concerning the new AI
for Conquests.
I have been working with the ACW-revision for some
time, but today I will resume playtesting of Meateater:s
WW2 1939 scenario. It will be interesting to see if AI
makes any changes in production-strategy.


Best Regards


Rocoteh
 
Originally posted by The Last Conformist
Problem with Boston/Mobile as separate countries - the main Union/Confederacy will not even attempt to defend them.

I'm assuming that, with Conquests "locked alliances", they can be garrisoned; otherwise I would create a 0 MF garrison unit, which could not be built and would have a respectable number of hit points and DF, and stick one in each city.

Best,

Oz
 
ozymandias,

I continue to search for a pattern in AI:s production
strategy. I have just worked with my WW3 scenario.

I flagged Build often Off Land, Air and Naval. The rest Build never.
Aggresssion level minimum.

AI responded with producing Naval units and buildings,
turn after turn.

I then changed aggression level to maximum.
AI started with declare war on me!
Then AI only produced Modern Armor and Mech Infantry
for 15 turns. After that (I was really surprised) it started to produce
1 Jet Fighter and 1 Transport.

I have saved this game to see if AI now will seek a balance
in forces. I mean produce more Air and Naval units.


Best Regards

Rocoteh
 
Good thread going here. I have read it and it has been useful when adding in new units.

I have been working on a WW2 scenario and just added a bunch of units, about 40 tanks and 60 planes. A lot of the units are spread out in the tech tree, but in the beginning of the scenario there are a few units of the same kind that can be built.

So some civs have 3 kinds of bombers, a heavy bomber, medium bomber and a dive bomber. Giving all the bombers a bomb strength of 16, and a defense of 2. The bomber with the longest range got the lowest ROF, while the bomber with the shortest range got the highest ROF.

The heavy bomber got a range of 7, a bomb strength of 16, with a ROF of 1, and a cost of 100 shields.
The medium bomber got a range of 6, a bomb str. of 16, with a ROF of 2, and a cost 100 shields.
The dive bomber got a range of 4, a bomb str. of 16, with a ROF of 4, and a cost of 90 shields.

The AI liked the dive bomber more but not by much, and would only produce a few more of these compared to the others. As for the other two it was a toss up and both were built in the same amounts.

I don't know if it matters but the only bomber that can be loaded on a carrier is the dive bomber.

One thing I did notice and I think it was mentioned before, but when a civ goes to war they change production. In this case the civ in question has its main cities + capital on an island and many others cities on the same landmass as the civ it is going to war with. The cities on the same landmass as the enemy would change production to land units while the island cities( I guess not feeling threatened ) would continue to build bombers. I will post more later.
 
Hi Meateater,

Interesting stuff -- especially as the AI's apparent lack of concern for range can be directly equated with its equal disregard for land MFs when choosing to build units.

The heavy and medium bomber split sadly coincides well with my theory that the AI does an eenie-meenie-minie-moe among the force pool under an alarming number of conditions -- surely an ROF of +1 (+100%) isn't "equal" to a range of +1 (+ ~17%) !

An interesting experiment would be to decrease the dive bomber's ROF to 2, increase the shields to 100 and keep the carrier ability -- As you know, one of our untested theories (I think we're all sort of holding our collective breaths and waiting for Conquests especially re: major issues like artillery) is that the AI build algorithm gives a decided preference to special abilities. Yours would be the first confirmation (hint, hint ;) ).

Thanks & Best Regards,

Oz
 
Back
Top Bottom