AI Persons - a formula to calculate how many you need

Discussions about scenario games and user-defined scripts.
Post Reply
User avatar
Stylesjl
Community Contributor
Community Contributor
Posts: 282
Joined: Sun Oct 29, 2023 4:01 am
Location: Sydney, Australia
Has thanked: 3 times
Been thanked: 14 times

AI Persons - a formula to calculate how many you need

Post by Stylesjl »

Hello, I have been some experimenting with this script line of late and I went down the rabbit hole:

Number of AI Persons=<number of competitors+8 to 120>

As detailed here it has the following rule:
https://www.capitalismlab.com/scripts/s ... vironment/
This is the total number of AI persons in a game. You may customize it using the above line, allowing you to create a game with more persons than a standard game. Please note that the game requires the number of AI persons to be at least equal to the number of competitors + 8 or 30 (whichever is greater). If you set it lower than this value, the game will automatically reset it to the minimum allowed value.
There is another rule not documented above but one I tested - if you set AI persons to 0, competitors to 0 and add 30 Venture Capitalists:
Venture Capitalists=30

The minimum number of persons will be 50, 30 of which are Venture Capitalists and 20 are other people.

This got me thinking however - how many AI persons should you have in a given game? Well I made the following observations regarding what 'AI persons' are actually used for:

- The CEO of a Corporation - 1 is required for each corp. This is why the minimum number is based on the number of corps you allow so that there are enough people around to start that number of corporations.
- Mayor of each city - 1 for each city. A mayor is not allowed to be both a CEO and a Mayor at the same time. All cities will have a mayor assigned no matter what.
- Venture Capitalist - Set in the rules of the game. If Realistic Money Supply = Yes then 5 must be in the game (unless it is Survival Mode, in which case 0 are allowed). They cannot be a CEO or a Mayor. All venture capitalists will be assigned no matter what.
- They can also be a COO, CMO or CTO of a corporation. Normally AIs do not hire these people but the human player can for themselves or their subsidiaries if they are not a Mayor, CEO, Venture Capitalist or a COO, CMO or CTO themselves.

So if that is the case how many people do you need then?

It would seem simple enough:
City Count + Competitors + Venture Capitalists + 8, right?

Nope, there is actually a bit more to it actually and that is the politics aspect of the game. Basically unless you want uncontested elections you need more people to run against the incumbent mayor. So how many do you need then?

Well it turns out that you need one person per city, per political party.

How many political parties are in the game? After testing it is City Count/3. If you 15 cities you will have 5 different political parties. That is rounded up, by the way so 13 cities also have 5 parties. Also you must have a minimum of 2 parties even if you have just one city.

You then need to add one political party to account for the possibility of the player adding their own.

So what then is the final formula to ensure you have enough persons?

Well let's define our parameters:

Number of Cities (NC)
Number of Competitors (NCO)
Venture Capitalists (VC)

Party Count (PC) = (NC/3) + 1
X = 8 //Not sure if there is any special significance to the number 8 but I will keep this in as that was part of the original script instructions.

This is your minimum number:

Code: Select all

Required Number =  (NC * PC) + NCO + VC + X
So if you have let's say 15 cities, 50 Competitors and 30 Venture Capitalists - how many people do you need?

(15 * 6) + 50 + 30 + 8 = 178

Yes, that's right for a full stack you can't get enough people as the max is 120. So what happens? Well it turns out that if you set the AI persons amount to 120 then when you open the game the number of persons you actually get is 149 (139 if there are 0 VCs, don't ask me why :?). All 50 corporations will get a CEO allocated but unfortunately it is unlikely that you will be able to contest the election in every city as all of the existing parties will 'Hoard' the limited number of possible candidates for themselves.

So I guess the solution in that case is to reduce the number of cities or competitors (or just put up with never getting political power in all 15 cities) - it is an extreme case after all that literally pushes the game to the maximum limit. I don't think I could personally handle 15 cities myself.

Also here is an interesting scenario: What happens if you have 50 Competitors, 15 Cities and you set the AI persons to 30?

You get 49 persons ( :? ). And there are not enough people for all of the corporation CEOs so you basically get something like 30 corporations.

Yeah, it's a bit weird like that.

Anyway, that is what I found out about AI Persons through testing. Hope it helps you in case the results you get during scripting appear counterintuitive.

Also, here are some other notes about AI persons and what they do as well:
- Each person will build at least 1 mansion (if they can afford it). Sometimes they sell their mansions as well, if you buy it they will just build a new one from my observations.
- Each person can buy/sell stocks. The venture capitalists will own stock in a newly founded corporation at the start of the game while the other persons may buy the stock later on (except CEOs, they also own part of their own stock at the start as well).
- If you find someone who has certain talents you want for a subsidiary or as a COO, CTO or CMO then sometimes you won't be able to hire them due to them being a City Mayor or an existing CEO of another company. If you really want them badly enough then try kicking them out of office by running against them or bankrupting/taking over their corporation and firing them as CEO. They are then all yours to hire! :lol:
User avatar
cantdownloadit
Community Contributor
Community Contributor
Posts: 661
Joined: Sat Aug 30, 2014 12:14 pm
Has thanked: 5 times
Been thanked: 11 times

Re: AI Persons - a formula to calculate how many you need

Post by cantdownloadit »

yes they need to allow more people, or maybe better idea would just be have a seperate name list for mayors, and have mayors be drawn from a separate name list, rather than using an in game AI person.
Post Reply