[1.0.2 (fc54)] AI errors in pop assignment and construction (with illustration)

  • We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Peter Ebbesen

the Conqueror
61 Badges
Mar 3, 2001
16.910
4.844
  • 500k Club
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
idiot_AI_pop_assignment.jpg
The screenshot is from my current game, save is attached.

Settings for the sector this planet is in is:
Allow redevelopment (OFF)
Respect tile resources (ON)
Focus on Energy.

It illustrates several clear bugs in the AI's pop and construction assignments:.
  1. Wrong allocation of available resources. It is currently using a pop to produce 2 food in a tile that has base +1 food and a basic hydroponics farm (+1 food, no cost), and in a tile that has base +2 food and no building (+0 food, no cost) while at the same time NOT producing food in the tile that produces 3 food from base +1 food and reassembled ship shelter (+2 food, no cost). Since the cost is the same (FREE!), 3 food is always better than 2 food and should be chosen when both are available to assign pops to.
  2. It is building a basic power plant on a +2 food tile rather than on the equally undeveloped +2 energy tile right next to it. Neither of those tiles are adjacent to the reassembled shelter, so they will never get adjacency bonuses. Absent adjacency issues, the AI should always prioritize building on empty tile resources matching the building resource before building on other tiles.
  3. It is building a basic power plant on a +2 food tile when there are empty tiles with no bonuses or with +1 food bonuses available. When placing a building that does not match the tile resource, it should be placed to do as little harm as possible. Not on the highest value tile available!
  4. It is overriding tile resources despite the setting respecting tile resources; Okay, that setting probably doesn't apply to food, as we'd all be sad bunnies if all food tiles were used for food, but it is an incredibly dumb move in the current situation. Overriding tile resources despite the setting should be for when it brings a benefit to do so and is absolutely necessary to place the building, not because the AI can't be bothered to check alternative locations.

In the case in point it is a size 14 planet, so it will eventually need 14 food, which effectively means 3 food buildings including the capital tile (4 low tech) for most of the game. It has only 2 food producing buildings currently, the reassembled shelter and the primitive farm. So even if it has enough food right now and doesn't use all its available production, the AI WILL be building 2 regular hydroponics farms sooner or later (hopefully one of them overwriting the primitive farm once past the 5th po). So that +2 food tile? Yeah, that SHOULD be reserved for a hydroponics farm sooner or later even if right now the AI has enough food.

[Peter's rule of thumb: "All else being equal, I'll probably need PlanetSize/5 food buildings by the time it fills up, so try to reserve space for it."

Addressing the last issue regarding reserving space for future farms is probably too much of a bother, but the other issues really ought to be addressed.
 

Attachments

  • 2232.04.04 -- idiot_AI_pop_assignment.rar
    1.014,6 KB · Views: 1
Last edited:
  • 1
Reactions:
Upvote 0

Blaze_1st

Private
22 Badges
Jan 15, 2016
16
23
  • Crusader Kings II: The Old Gods
  • Crusader Kings II
  • Stellaris: Necroids
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Megacorp
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
Agree the sector AI makes some very strange decisions... it crashed my economy briefly in my current game by replacing a load of power plants with hydroponic farms to seemingly max out pops as a priority above a stable economy. When I realised what it was doing I had to cut all sector taxes, rush colonies and outposts (which all obviously made the situation worse in the short term) in order to grab more power stations and create a single super sector. The AI seems to be coping a bit better after that so far but yeah it still wastes good tiles and ignores unique buildings.

What I believe as a result is that, until otherwise changed, it would be best only give fully populated planets where all tiles have a building to AI sectors and forbid them from changing anything other than to upgrade. I might also look at the config change to increase the Core Sector count to 10 to give a bit more flexibility with the above.
 

Peter Ebbesen

the Conqueror
61 Badges
Mar 3, 2001
16.910
4.844
  • 500k Club
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
idiot_AI_pop_assignment2_minimalfoodsurplus_tiles_used.jpg
Here's another fun pop assignment error from a few years on, where the sector AI again shows its incompetence in using the available resources. We are talking a planet with 9 pops, 4 of whom are engaged in food production, that only produces a surplus of 3 food. That's... not impressive.

Settings for the sector this planet is in is:
Allow redevelopment (OFF)
Respect tile resources (ON)
Focus on Energy.

  1. Wrong allocation of available resources: In this case the sector AI finds that it is profitable to employ two pops in +1 food tiles, while it has a growing pop occupying a +2 food tile (and, as all growing pops do, contributing absolutely nothing). All three tiles cost 0 energy to use. What it should do: Use the +2 food tile in preference to the +1 food tiles! It would free up a pop to either produce more food or do something else.
  2. Fear of upgrading: Not replacing the basic +1 hydroponic farms (from the reassembled shelter phase) with the +2 hydroponic farms available to planetary administrations is a mistake. Sure, they cost 1 energy credit to maintain each, but a single power plant provides enough energy for three farms so why not build one, upgrade farms, reallocate labour, and come out ahead in both food and energy for the same number of working pops? There's even an energy tile to use for a power plant if the sector AI doesn't have enough to cover costs otherwise. The sector has about a thousand minerals to spend, so the AI is not prevented from acting due to a lack of resources.
  3. Pops without buildings: The Orphan wanna-be scientist would like science building. Or any building, really. He's a pop producing 1 science. The sector AI has been told to respect tile resources and focus on energy, but surely building him a little science centre of his own would be a good use of resources if there's nothing more important to do and the sector has abundant resources? The sector has a thousand minerals and a positive energy flow, so it can easily afford it. Or if it doesn't want to do that, how about using him in the +2 food tile instead?
  4. Also, I don't quite understand why the AI thinks it is a good time to clear that dense forest. In its defense it cannot clear kelp, so it is the only available land that can be cleared, but why does it think it is a good time to spend resources on it? There are four cleared undeveloped tiles on the planet, one of them occupied by a pop. There are four basic +1 farms that desperately need upgrading. And the AI chooses to clear a kelp tile with no bonus. I just don't get it.
 

Attachments

  • idiot_AI_pop_assignment2_minimalfoodsurplus.jpg
    idiot_AI_pop_assignment2_minimalfoodsurplus.jpg
    297 KB · Views: 0
Last edited: