@Devs: Sophisticated suggestions for AI improvements

4X strategy game from Proxy Studios

Moderators: Pandora Moderators, Slitherine Core

Zak0r
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 189
Joined: Sat Jan 25, 2014 1:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Zak0r »

I think you are right about the buildings.

Thinking about the ocean tiles, a small point for fungal could be that you are more independent in your choice for the food city. I mean, with fungus you can specialize any city to your food city. Even if it is right in the desert or arctic only with one garden of eden which you were already milking with food buildings throughout the whole game. A big point is also that you can increase your food output twice that easy when compared to ocean and ~33% faster when compared to grassland with farm. This is important when you are conquering cities which often leads to a huge increase in food demand.

edit: protip related to the last sentence: When conquering a city set it to destruction until the foreign migration drops to 1 pop per turn tops (=same decrease as destruction). This way you save a lot of food and don't lose that much population fleeing to your enemy. The production losses due to destruction are small because the morale is bad anyway during the first few turns after capturing a city.
Temphix
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 4
Joined: Mon Jun 23, 2014 11:36 am

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Temphix »

Well now that the conversation of Mushroom Economics 101 has finished, I would like to get this post back on topic.

One thing I would like to see from the AI is playing to thier strengths, and having different score strategies depending on the faction. It was mentioned about leaving mushroom fields alone at the start for Terra Salvum, but even for them it's always better for them to have something else at the start until they get the mushroom upgrade (especially forests). As far as I can tell, other than aggressiveness, the AI don't play too differantly from each other. Togra University should be trying to go for a research victory (most of the time).

Maybe even have a unit preferance for each faction, Imperium likes tanks, while Togra prefers high tech mechs, for example. This is more of a flavour change than balancing though.
Xilmi
Pandora Community Developer
Pandora Community Developer
Posts: 523
Joined: Fri May 23, 2014 3:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Xilmi »

With the addition of another buildable operation, the amount of operations available has gone up.
Unfortunately the AI, while knowing how to use them, does not build them.

My suggestion would be something along the lines of:

Build Operation X Score=Available Units/Operation-specific modifier-Available Charges of Operation X

For example:
With 12 Units and one Drop-Pod available the drop-Pod-Score could be:
Drop Pod Score=12/5-1=1.4

If a Drop-Pod get's used, the score would jump back to 2.4 and it thus would be way more likely that a new one is built.
Operations, as units, should have a reduced likelyhood of being built in cities with a low amount of Built Buildings:Unbuilt Buildings

But there should be a special-rule for the promotion-operation, as it doesn't make sense to be built anymore once any given city has the level 3 barracks.
Xilmi
Pandora Community Developer
Pandora Community Developer
Posts: 523
Joined: Fri May 23, 2014 3:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Xilmi »

After having tried out Zak0rs strategy concerning expansion, or more precisely the lack thereoff, it becomes appearant, that the AI expands way too quickly to use their cities to their potential.
I think you also have witnessed the massive economical power from the "as few cities as necessary"-strategy deployed by Zak0r and me in the "Liveabend"-event.

I suggest that the will to expand should depend on unfilled habitats while ignoring habitats given from field-improvements in that. (because those could be replaced by something else if they are no longer needed)

Assuming there is a strategy-score-modifier for expansion, a formula to calculate it could be this:

StrategyScoreExpansion=TotalPopulation*1.1-TotalHabitats+HabitatsFromTerrain-ExistingColonizers*8(6 for Noxium)

Examples:

30 Population
34 Habitat, 2 from Terrain

30*1.1-34+2=1

33 Population
34 Habitat, 2 from Terrain

33*1.1-34+2=4.3

32 Population
34 Habitat, 2 from Terrain
1 Colonizer built

32*1.1-34+2-1*8=-4.8 (don't build more colonizers!)
(negative results should be considered as 0)

An exception to that should be made if the AI lacks minerals in the max-potential area of it's capital.
A "Lacking minerals"-Strat-Score-Boost could be a formula like:

CurrentPopulation/3-TotalMineralsInPotentialArea/2

Example:

18 Pop, 10 Minerals in Area:
6-5 = 1

18 Pop, 5 Mienrals in Area:
6-2.5 = 3.5

18 Pop, 20 Minerals in Area:
6-10=-4
(negative results should be considered as 0)

So the complete formula would be:

StrategyScoreExpansion=MAX(0,TotalPopulation*1.1-TotalHabitats+HabitatsFromTerrain+MAX(0,CurrentPopulation/3-TotalMineralsInPotentialArea/2)-ExistingColonizers*8(6 for Noxium))

This way the AI would only consider colonizing when it actually runs out of living-room or minerals. This would result in less cityspam but way more powerfull cities.
Zak0r
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 189
Joined: Sat Jan 25, 2014 1:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Zak0r »

Sounds very sophisticated. :)

I would like to add one aspect. I have noticed the AI is building colonizers and formers even when the city is besieged. Imo there should be something to prevent them from doing that until they have enough units to defend or even repell the invasion.
Xilmi
Pandora Community Developer
Pandora Community Developer
Posts: 523
Joined: Fri May 23, 2014 3:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Xilmi »

Zak0r wrote:I would like to add one aspect. I have noticed the AI is building colonizers and formers even when the city is besieged. Imo there should be something to prevent them from doing that until they have enough units to defend or even repell the invasion.
I agree Enemy Units on their territory should make them set their strat-score for Expansion/Formers and even non-military-buildings drop to 0.
Doesn't mean they shouldn't build em if the war is far away and they brought it to their enemy.
Igorputski
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 300
Joined: Sat Nov 14, 2009 1:08 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Igorputski »

Zak0r wrote:In Pandora up to three population units can work on one tile together. For example if you build a lab on a grassland hill a scientist, a farmer and a miner can work on the same tile (which isn't very useful is this case, but on t3 fungus it is). It is different than Civilization games where you get all resources from the tile with one population unit.

On a single fungus tile you can have one farmer and one miner bringing 4 base food and 4 base minerals home while a mountain with a mine and grassland with a farm only yields you 3 of ONE resource. So with your mountain+grassland strategy you need one more tile and still have a 25% smaller yield than fungus.

The limit is therefor not workers but (land) tiles with improvements. Having more field labs or factories will always be superior because each adds 50% value to one worker or scientist and this counts for all bonus modifiers the resource gets in the specific city too (observatory, lab buildings, morale, faction bonus/malus).

Analyzing the worth of fungus terraforming for the AI - which is the topic here - has to be made in 3rd era environment because only then fungus gets its 4/4 yield. For the time before the AI has both techs finished you can simply set the score to zero or maybe set a low score for Terra Salvum with only 1 of the two techs if it has huge problems with minerals and no hills in the city range. This is mostly a no brainer and doesn't have to be discussed. A T2 example otherwise is useless because you need both T2 and T3 fungus tech for it to be relevant. Earlier fungus simply isn't useful and should be automatically removed by AI formers.

It is quite obvious that you will have more buildings in the 3rd era. But it would unnecessarily complicate the example and wouldn't add any difference because you can build the same buildings in both cities for the same cost. It would only make the absolute gap bigger but it would still be almost 20% in favor of fungus when looking at the two cities above (a little less than 20% because you get the absolute bonus of +2 for each building regardless in both examples). It is therefor sufficient to concentrate on the differences.

To refer to your example: a 200% bonus (actually it is 175% but we can simply add 25% from morale for this example) would make a difference of 6 production in the above example (12 production + 200% + 6 (t1,2,3 building) = 42 production; 10 production + 200% + 6 (t1,2,3) = 36 production) = fungus ~17% better. This works only if we ignore food and minerals or assume enough minerals are provided by others cities to sustain production. (FYI t2 and t3 buildings also provide only +2 resource and not 4 or 8. This was patched long ago but the tooltip wasn't changed.)

When looking at minerals and food fungus is slightly more ahead in production (39 to 33 = 18%) and much better in overall efficiency because the no-fungus city has a small deficit in minerals and loses 3 production without help from other cities and has less food surplus (+7) and no potential for more (while fungus city has +3 minerals and +10 food surplus and can provide a lot more food easily).

fungus city

food:
1 farmer with 4 food + 200% + 6 (t1,2,3) = 18 food (10 food surplus).

minerals:
3 miners with 4 mineral per miner + 200% + 6 (t1,2,3) = 42 minerals.
42 minerals would be enough to sustain the cities production. However, we would have to add one more tile of fungus for the 3rd miner (we can use the free farmer here) which would cost us 3 production because of the factory we lose (1 worker produces 1 less production times the bonus of 200%, but we have still 1 more factory than the no-fungus city). But this also means we have 3 minerals surplus from this city and two more farmers could get us another 12 food each when the city grows or we suddenly need more food because of a city we conquered. The no-fungus city wouldn't be able to provide this.


no-fungus city

Now let's look at the food and minerals in the city without fungus. We only need one tile of grassland with farm but (at least) 3 mountains with a mine so we transform a grassland to mountain with mine. We can send the free farmer to mine as well as in the fungus city.

food: 1 farmer with 3 food + 200% + 6 (t1,2,3) = 15 food (7 food surplus)

minerals: 3 miners with 3 minerals per miner + 200% + 6 (t1,2,3) = 33 minerals (3 mineral deficit)



btw: If you don't build farms and mines after T1 you are doing it wrong. If you need more farmers and miners for food and minerals your science and production will be smaller because you have less people working in those categories. Always try to max out the yield from food and minerals with the smallest possible number of population in a single city with all important buildings for this resource. Then you can push more population into the important output jobs worker and scientist. If a single city isn't enough build another specialist for food or minerals. Actually with fungus a single city can be able to sustain your whole empire both for minerals and food at once. But never ever let all your cities work +2 tiles with factories or labs on it and build all the bonus buildings to get bigger yields as you seem to suggest above (please correct me if I misread). Energy parks are also one of the worst possible choices unless your city is still too small to use all its tiles for factories or field labs, simply because they don't get all bonuses while factories and field labs do.

And let's not forget that you can use formers for minerals and food too. T3 Fungus would be the best choice here as well.
Perhaps you didn't understand the part where it was mentioned: "IT's NOT NECESSARY" you can win the game just playing without fungus. If you want to min/max that's ok but "IT'S NOT NECESSARY". Might be an advantage in multiplayer, but, the majority of players here ARE NOT multiplayers.
Xilmi
Pandora Community Developer
Pandora Community Developer
Posts: 523
Joined: Fri May 23, 2014 3:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Xilmi »

Igorputski wrote:Might be an advantage in multiplayer, but, the majority of players here ARE NOT multiplayers.
That's exactly the reason while I'm trying to "translate" the strategies of the best multiplayer-players into algorithms to be used by the AI.
Zak0r
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 189
Joined: Sat Jan 25, 2014 1:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Zak0r »

Igorputski wrote: Perhaps you didn't understand the part where it was mentioned: "IT's NOT NECESSARY" you can win the game just playing without fungus. If you want to min/max that's ok but "IT'S NOT NECESSARY". Might be an advantage in multiplayer, but, the majority of players here ARE NOT multiplayers.
I'll tell you a secret. You can easily win when you focus on getting as much credits as possible on turn 50 (capture hives and milk your pop with taxes). Then you can win an economic victory practically all the time. All the other shit is not necessary. ;)
Xilmi
Pandora Community Developer
Pandora Community Developer
Posts: 523
Joined: Fri May 23, 2014 3:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Xilmi »

Btw. about the Fungus-discussion.
In my recent game, I could have but did not use it.
Simple reason: Pollution.
I couldn't even use as many industry-workers as I wanted to use up my minerals in my size 64 city without causing pollution despite having all anti-pollution buildings. Thus the Shrooms would have severly hampered my cities output.
Zak0r
Sergeant - Panzer IIC
Sergeant - Panzer IIC
Posts: 189
Joined: Sat Jan 25, 2014 1:21 pm

Re: @Devs: Sophisticated suggestions for AI improvements

Post by Zak0r »

You're right. With huge cities and no room for smaller ones the pollution gets a big issue. If you had space for a small city with 6 fungus around it you could easily outsource your food production there and lower your pollution in the big cities (moving farmers to science) though.
Post Reply

Return to “Pandora - First Contact”