On cappies and AI investment strategy

  • 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.

StelarCF

First Lieutenant
67 Badges
Apr 5, 2013
234
102
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Naval War: Arctic Circle
  • Magicka
  • Heir to the Throne
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Hearts of Iron III
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Humble Paradox Bundle
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • The Showdown Effect
  • Europa Universalis III Complete
As we all know, the capitalist AI in Victoria 2 often made very unfortunate investments that resulted in player frustration and strongly incentivized state capitalist/command economy systems. Due to this, it appears that there is an incentive to remove capitalist autonomy from Victoria 3. While there's many things to be said about how that issue can be treated differently (like greater access to state capitalism-style laws early on), I think the biggest thing that can be fixed (and which needs to be fixed regardless) is in fact how the AI decides to build factories.

To that end I propose the following algorithm, for either cappies or AI government investment:

1. on every 'investment tick', do a fit (quadratic or otherwise) of the price, demand on the last five years with a high weighting on the last year; if necessary it can be simplified so the fit is faster to compute on the fly, so long as there is a fit)
2. use the fit to extrapolate the addressable market in another year (forecasted price of good in a year multiplied by forecasted difference between supply and demand); let's call this factor M
3. compute the (partially estimated, only using the fitting for input goods) cost to produce the good (in a year); divide the forecasted price by the forecasted cost, less one, to get a profit margin P = (Price / Cost) - 1 (in percentages)
4. We throw away all the investments with P < 5% as unprofitable
5. compute the capital cost C
6. there are now two situations: when the addressable market is larger than a single investment and when it is smaller than a single investment
6a. when it is larger, we cap M to a new value m, the market that a single investment addresses
6b. when it is smaller, m = M
7. We calculate tROI = C/(m*P) - the time of return on investment in the same unit of time in which the demand is evaluated over.
8. we now take the tROI of all or a selection of the possible investments and sort them. The lower the tROI, the better the investment. Since we threw away all investments with P < 5%, all the remaining investments should be expected to be profitable, with some caveats

Obviously, the supply, demand, price calculations must be done based on the market they're done in, its integration etc. Cost to market would have to be included, as would trade routes.

As for the caveats - since capitalists would be doing a fairly uninformed fit of the goods, instead of good market due diligence, you will have cycles of boom and bust if a good suddenly increases in price/demand, only to be met with an investment bubble which produces more supply than necessary. It would be enough to make it so cappies aren't horrible, but not perfect either, and it wouldn't be a pain to let them run some of your economy.

(mostly copied from a discord post I made)
 
  • 3
  • 2Like
  • 1Love
  • 1
  • 1
Reactions:

UBERWASP

Captain
51 Badges
May 28, 2018
425
952
  • Stellaris - Path to Destruction bundle
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Semper Fi
  • Stellaris: Galaxy Edition
  • Crusader Kings II: Conclave
  • Victoria 2
  • Hearts of Iron III
  • Crusader Kings II
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Sign Up
  • Crusader Kings III Referal
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome - Magna Graecia
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
Removing capitalist autonomy is not the solution here, and cannot be an option, after all, this is Victoria! Removing that is only a "easy way out". Once a month AI should look up goods price list and pick 5 of the most in demand goods to build a factory plus a small change for something else to be built. Then there should be country state goods list that AI can look and decide where to put this factory, example building a glass factory to somewhere with coal
 
  • 4
  • 3
  • 2Like
Reactions:

General WVPM

Lt. General
23 Badges
Nov 14, 2012
1.618
1.082
  • Hearts of Iron III Collection
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Victoria: Revolutions
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Europa Universalis III Complete
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Steel Division: Normandy 44
  • Stellaris
  • Victoria 2
  • Europa Universalis III Complete
  • Crusader Kings II
  • Crusader Kings II: The Old Gods
I like the idea. @StelarCF goes too deep into the details though.
One thing I'd like to add is that if a factory goes bankrupt, there should be a large negative modifier to the likeliness of capitalists building that type of factory.
 
  • 2Like
  • 1
Reactions:

Vernichtere

Lt. General
57 Badges
Mar 26, 2010
1.615
4.199
  • Crusader Kings II
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Nemesis
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Necroids
  • Stellaris: Galaxy Edition
  • Majesty 2
  • Rome: Vae Victis
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Mass Transit
  • Stellaris: Megacorp
  • Stellaris
Where is the expansion and reinvestment?
Why do you try to simulate a kind of competition on the micro level, even though important building blocks are missing?
 
  • 2
  • 1Like
  • 1
Reactions:

PatriotCreeper

Sergeant
61 Badges
Apr 6, 2016
91
816
  • Europa Universalis IV
  • Europa Universalis IV: Pre-order
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Stellaris: Galaxy Edition
  • Dungeonland
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Surviving Mars
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Stellaris: Federations
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Horse Lords
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Crusader Kings II: Holy Fury
  • Stellaris: Nemesis
  • Crusader Kings II: Rajas of India
  • Stellaris: Necroids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Stellaris: Lithoids
  • Victoria 2
  • Stellaris: Galaxy Edition
  • Crusader Kings III
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Stellaris: Megacorp
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Europa Universalis IV: Conquest of Paradise
Your algorithm would only make sure they build the right type of factory, not where to build the factory. The AI would still need to gauge which states have the machinists and engineers to make the factory profitable, or which states have sufficient infrastructure to carry goods to market/receive imports. It also doesn't resolve how capitalists in AI countries would interact with their governments, and vice-versa. How much should the government tax them? Is the government going to place a tax on this specific good? Making them both controlled by the same AI would make that process a whole lot simpler. AI is hard. Every time you solve a problem three more pop up. I have no idea why people think Paradox is capable of making an AI that can interact with a system this complex; they have never made an AI anyone has ever considered 'good'! Victoria 2's capitalist AI was horrible. Victoria 1 didn't even have AI, they just placed buildings randomly. In Crusaderkings the AI is unable to interact with the court intrigue mechanics except in very simple ways(I'm next in line to the throne, better kill my dad. But marry for claims I can actually push? Forget about it.) The sector AI from Stellaris only improved when they redesigned the game's economy to be better comprehended by an AI. And this last I want to place an emphasis on. They changed the game to suit the AI because the key to making good AI is to make a game where the AI doesn't have to be good.

In just about every deckbuilder the enemies don't play with their own deck. In basebuilders only the player builds up a base, not the computer. In simulation/management games, things like rival businesses are often abstracted into the background. This is because, as any game designer will tell you, they need to make one half of the game interesting and engaging for a human, and the other easily accessible by the computer. If the AI also has to do the player's half of the game, you either need to re-work mechanics to make them easier to automate, spend an amount of money on AI comparable to what governments put into bomb development, or give the AI bonuses. Most go with option 3, including paradox. For example, the AI in eu4 gets a free diplomat they only use for instant actions like war declarations. Paradox couldn't make the AI good enough to interact with the diplomat system, they were unwilling to re-work a system players actually enjoyed just to make better AI, and so they let the AI cheat past it.

Paradox seems to have come to terms with the fact that their AI isn't very good as a consequence of the AI playing the same game the player is. The fun of EU4 isn't seeing if you can beat an AI, its seeing if you're good enough to beat hundreds of crappy AIs fast enough to conquer the world in 400 years. In Crusaderkings you're interacting with characters who don't act in their own best interest, they act in accordance to their character traits. This makes it far more believable when the AI does something dumb as you can attribute it to their character traits instead of their inability to comprehend what's happening. And in Victoria, the point of the game isn't to 'beat' the other countries, it is garden your nation into what you want it to be. Incompetent capitalist AI would be a direct detriment to that, as only economies that place the player in control over industry would be viable. Dumbing down the economy so the AI can understand it would be catastrophic. Giving capitalist AI arbitrary bonuses would wreck the game's economic simulation. Making competent AI just isn't something paradox has ever done, and there is no reason to believe they could pull it off here. Thus, putting the player in charge of the capitalist investment system is the best way forward.
 
  • 3
  • 2Like
Reactions:

alexti

Field Marshal
24 Badges
Jul 25, 2010
3.644
1.432
  • Europa Universalis III
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Divine Wind
  • Crusader Kings II
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Cadet
  • Stellaris
  • 500k Club
  • Victoria 2
  • Europa Universalis IV
  • Stellaris - Path to Destruction bundle
That's a sound mechanism. Price and cost would obviously need to include effects of current subsidies, tax incentives and so on. There is also a labour availability check, but from what we know right now it would probably apply to all industries, so it might not matter for the purpose of selecting specific one. As it was mentioned, including some cooldown for the failed industries is also necessary as a safety measure in case algorithm isn't taking some important (in the current situation) into account.
 

nuarbnellaffej

Lt. General
32 Badges
Jul 27, 2009
1.211
2.200
  • Europa Universalis IV
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Darkest Hour
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Victoria 3 Sign Up
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • 500k Club
  • Victoria 2
  • Cities: Skylines
Giving capitalist AI arbitrary bonuses would wreck the game's economic simulation.
The problem with this point though, is that arbitrary bonuses are the only way to simulate the IRL superiorities of a free market vs a centrally planned market.
Making competent AI just isn't something paradox has ever done, and there is no reason to believe they could pull it off here.
Unfortunately I am in agreement with you here, I don’t think their AI is that bad compared to their competition, just that the games are quite complicated in ways that benefit a human more than a scripted AI. AKA it’s “easy” to make an AI that can beat humans at chess, but not so easy to do so for a paradox game.
Thus, putting the player in charge of the capitalist investment system is the best way forward.
For the player’s country I agree, for AI countries I’m okay with some bonuses to keep them competitive since it wouldn’t be as in your face as cappy bonuses in your own nation.