I love this game and it’s getting great, but I found the following errors.
High earnings 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.
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…
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
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.
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 (x^2)]
[_HighIncome] [Charity] [0.62 (x^3)]
[_LowIncome] [CarUsage] [0.1 (x^3)]
[_LowIncome] [AirTravel] [0.1 (x^4)]
[_LowIncome] [Charity] [0.22 (x^2)]
[_MiddleIncome] [CarUsage] [0.2 (x^3)]
[_MiddleIncome] [AirTravel] [0.2 (x^3)]
[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.
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 ).
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)