Some bugs and suggestions (v1.14)

Hello everybody!

I love this game and it’s getting great, but I found the following errors.

  • High earnings :arrow_right: Car usage: I guess that what is intended here is to simulate a proportional (not lineal, but exponential) growth of car usage with high earnings. 0 high earnings should entail +0% car usage and 1 High earnings should entail the maximum growth, which I think is +20%. However, presently a 0,5 High earnings leads to a +0% Car usage, whereas that both a 0 and a 1 leads to a +20%. It seems like an exponential centered in 0,5, as could be the function: 0,8*(x-0,5)^2

Indeed, the graph gets weird when High earnings is lower than 0,5, with the dot outside, to the left of 0 value. But even in the first image the dot is not actually where it should be.
Probably this issue also happens in other simulations, I don’t know right now.

1 Like
  • 1 Tax evasion :arrow_right: +80 Automation Tax (Income): Here the issue is clear. Automation Tax (income) behaves just like the other taxes, but using a +x% instead of the *x% that I guess should be.
1 Like
  • Achievement: Cult of personality: The target is to attain a 75% on the three personality perceptions, but it’s currently impossible to pass a 50%.

  • Succesful liar: I won two consecutive elections breaking a manifesto pledge (two the first time and one the second) but I didn’t get the achievement. I don’t know if I would get it if I only break one pledge each time, but this should have scored.

  • Start your engines: One of the conditions for getting this one is to have the Fuel Efficiency Standards policy below 25%. But it should be ok as well if you directly don’t have this policy at all. Probably this issue happens in other cases too, I don’t know.

  • Finally, just a suggestion. Currently, if an item that normally influences another one, incidentally has no effect (tipically because the first item has the 0 value), it doesn’t appear on the causes list of the second item. Just for example, if Alcohol consumption is above 0, it appears in the causes list for Productivity (with a negative effect). But when it reaches 0, it dissapears. I consider that it would be helpful to keep it on the list, even if its current value is 0.


Thanks…looking into this stuff now…
That first item… actually the equation is what it should be, but the way the graph plots it is wrong, because the source item (a simulation value) actually ranges from -1 to 1, instead of 0 to 1. I need to edit the graph data to reflect this…

1 Like

Oh, sorry, I hadn’t notice that the income simulation values ranged from -1 to 1.
But anyway, that equation, which appears at cell K3 of simulation.csv, 0.2*(x^2), leads to an incremental Car usage when High earnings approachs -1 (graph below, on the left). But I guess that is not what is intended here, is it? I wouldn’t know why less high earnings (below 0) means an additional car usage. So maybe, shouldn’t it be like the graph on the right?


Yes it should. the UI is wrong, and I suspect underlying code is too…looking at it now :smiley:

1 Like

Minor pet peeve of mine: y’all talking about exponential curves when you mean polynomial curves.

If x is your variable and n is some constant,

x^n is a polynomial (more specifically a monomial, a polynomial with a single term)
n^x is exponential.

This isn’t a minor difference. Exponential grows WAY faster than polynomial. And for many situations, it’s the natural way for things to grow. Arguably some of the values that are currently modelled by polynomials of some sort ought to be exponentials instead.

1 Like

Ha, yeah I am crap at remembering the terms, I look at the outcomes in a graphing calc and pick it from there, and its all expressed like 0.8*(x^n)

FWIW I have done extensive checking, and discovered this problem is only affecting a handful of effects:

[_global_liberalism] [LegalDrugConsumption] [0.25 (x^5) Narcotics]
[_HighIncome] [CarUsage] [0.2 (x^2)]
[_HighIncome] [AirTravel] [0.3
[_HighIncome] [Charity] [0.62 (x^3)]
[_LowIncome] [CarUsage] [0.1
[_LowIncome] [AirTravel] [0.1 (x^4)]
[_LowIncome] [Charity] [0.22
[_MiddleIncome] [CarUsage] [0.2 (x^3)]
[_MiddleIncome] [AirTravel] [0.2
[Capitalist] [shareipocancelled] [0.25*(x^4)]

I’m looking at better ways to represent the effects right now. Shouldnt be too hard. TBH that impact at the end there from capitalists to ipo cancel is a bit strange anyway. I guess the implication was that if we had lots of happy capitalists we should balance things by crashing an IPO. It might make more sense to tie that to a low level of business confidence instead. It already has a bunch of other influences.

The air travel/car usage/charity effects can just be linear, ditto the drug consumption
edit: the first one is fine, its only even numbered exponents causing an issue.

1 Like

So you want that kind of effect, with the slope increasing when the simulation value moves away from 0…
Can’t you use the sign function? Like in the graph below on the left. Or maybe a piecewise function (below, on the right). I can’t think any other easy way to get it with an even-degree polynomial (you’re totally right, @kram1032 :grinning_face_with_smiling_eyes:).

1 Like

If that trajectory (both sides going down with the middle being flat) is what you want, then the most generic form would be

sgn(x) * abs(x) ^ n

This will work for any real n, including fractional values.

an (actually) exponential version might be

a * sinh(b * x)

with two separate parameters to fiddle with.
If you want that to be -1 or 1 at the end points, the way to do it is to go

sinh(n * x) / sinh(n)

1 Like