Fun with math in dCity - Spaß mit Mathe in dCity

Grüßle 😀

Ab und zu kommt der Moment in dem man ein Rätsel hat, für das man Mathe braucht. Dank dCity habe ich genau so eines in der letzten Woche zumindest ansatzweise gelöst. Nämlich:

  • Wie kann man mit (relativ günstigen) Obdachlosen-/Immigrantenkarten die Bevölkerung der Stadt maximieren?

Greetings 😀
Every now and then the moment comes when you have a puzzle for which you need math. Thanks to dCity I have solved one of those puzzles in the last week, at least to some extent. Namely:

  • How can you maximize the population of the city with (relatively cheap) homeless/immigrant cards?

Die Funktion dazu ist relativ einfach: (Bevölkerung+x)*(1000-x+Beliebtheit)/(1000)
Bevölkerung (population) und Beliebtheit (popularity) kommen von den Gebäuden, x ist die Anzahl an Bevölkerung die von Obdachlosen+Immigranten kommt (-x ist gleichzeitig der Beliebtheitsmalus dieser Karten).

Das Bild der Funktion ist die grüne Parabel in der unteren Grafik. Das absolute Optimum an Bevölkerung ist leicht zu bestimmen; einfach die Funktion ableiten und die Nullstelle finden. "Maximum Pop with ..." mit Bevölkerung 297 und x=505.
Aber... Um zu dem Punkt zu gelangen sind die letzten (Bevölkerungs-)Meter gepflastert mit Migranten..
Würde man x um 200 reduzieren (also 100 Migranten, oder 200 Obdachlose), reduziert sich die Bevölkerung nur um 40! Siehe Efficient homelessnumber Absolut distance

The function for this is relatively simple: (population+x)*(1000-x+popularity)/(1000)
Population and popularity come from the buildings, x is the number of population coming from homeless+immigrants (-x is also the popularity penalty of these cards).

The image of the function is the green parabola in the graph below. The optimal population is easy to determine; just derive the function and find the zero point. "Maximum Pop with ..." with population 297 and x=505.
But... To get to that point, the last few meters (in population) are paved with migrants.
If you would reduce x by 200 (i.e. 100 migrants, or 200 homeless people), the population would be reduced by only 40! See Efficient homelessnumber Absolute distance

geogebraexport.png

Es liegt also nahe ein anderes Optimum zu suchen.
Momentan kosten Bevölkerungspunkte durch Migranten/Obdachlosenkarten nur ungefähr ein Fünftel im Vergleich zu den Punkten durch die Häuser.
Dieses Verhältnis wird durch den Schieber "Population/Homeless" angegeben. Hat er den Wert 1, wäre die Bevölkerung durch Obdachlose gleich teuer wie durch Häuser, bei Wert 0,2 hätten wir das aktuelle Verhältnis von 1:5.
Wenn wir nun die Ableitung der Funktion in einem Punkt als lineare Annäherung der Steigerung der Bevölkerung in Verhältnis zur Steigerung der Obdachlosenzahlen sehen (Δ Bevölkerung/Δ x), können wir als gewünschtes Ergebnis genau das aktuelle Handelsverhältnis eingeben.
Zur besseren Übersichtlichkeit habe ich aber ein Verhältnis von 4:5 gewählt, siehe Efficient Homelessnumber regarding ratio

So it is obvious to look for another optimum.
At the moment, population points through migrants/ homeless cards cost only about one fifth compared to points through houses.
This ratio is given by the slider "Population/Homeless". If it has a value of 1, the population through homeless would cost the same as through houses. If it has a value of 0.2, we would have the current ratio of 1:5.
If we now see the derivation of the function in one point as a linear approximation of the increase in population in relation to the increase in the number of homeless (Δ Population/Δ x), we can enter exactly the current trade ratio as the desired result.
For better visibility, however, I have chosen a ratio of 4:5, see Efficient Homelessnumber regarding ratio.

Die Grafik wurde mit Geogebra (https://www.geogebra.org/) erstellt, einem beeindruckenden, freien CAD Programm.
Die Bevölkerungsfunktion wurde leider gestern durch die Entwickler von dCity zu 1 + (popularity^0.7)/100 abgeändert..
Ich war also zu langsam mit dem Beitrag schreiben. Vielleicht gibt es ja ein Update zur Optimierung der neuen Funktion. 🤓

The graphics were created with Geogebra (https://www.geogebra.org/), an impressive free CAD program.
The population function was unfortunately changed yesterday by the developers of dCity to 1 + (popularity^0.7)/100..
Looks like I have been too slow with the post writing. Maybe there is an update to optimize the new function. 🤓


P.S. Die Assoziation von Obdachlosen/Immigranten mit negativer Beliebtheit ist Teil des Spiels, nicht meiner persönlichen Einstellung.

P.S. The association of homeless/immigrants with negative popularity is part of the game, not my personal attitude.

The article was translated with the help of https://www.deepl.com/



0
0
0.000
13 comments
avatar

Du hast ein Upvote von mir bekommen, diese soll die Deutsche Community unterstützen. Wenn du mich unterstützten möchtest, dann sende mir eine Delegation. Egal wie klein die Unterstützung ist, Du hilfst damit der Community. DANKE!

0
0
0.000
avatar

Wow, amazing work! Outrageous!

(Nah not that good, but I think I earned a little selfvote nevertheless :))
If you think otherwise, feel free to post :)

@tipu curate

0
0
0.000
avatar

Mind blown 🤯

0
0
0.000
avatar

And this is only one little experiment/analysis.
With some quite static parameters (population, popularity).

Will probably post tomorrow my battle plan for last week: how to optimize your main and your "parking" city for the weekly payout. 🤓

0
0
0.000
avatar
(Edited)

P.S. The association of homeless/immigrants with negative popularity is part of the game, not my personal attitude.

I like to think that I will need them later in the game... or soon... so I keep them on a different account to avoid having things messed up on my city.

By the way, this is great stuff, are you going to write in English too (I mean, have posts like this just in English and not mixed writing)? Not that I am particular in favor of one or the other, but I am guessing many others prefer English.

I wish there was a way of auto translate, like "tata" app has. Or that you can actually submit the post within the same post in several languages.

0
0
0.000
avatar

Or that you can actually submit the post within the same post in several languages.

That would be very useful.
So far there are two possible ways to keep it bilingual: The one with the citations like I did in this post and split the text in 2 columns, which is better on PC, but worse on little screens like smartphones..

You had difficulties to get a good read flow? Any suggestion how I could improve my text?

Dont know if double posts (simple translations) are seen in a positive light here on Hive.. Had the feeling that it is the opposite..

If I had to stick to one language, I would chose German; not only because I make less mistakes there, but also because I am very sure that different languages are an enrichment to humanity and would therefore always choose the smaller one (well not exactly, as my motherlanguage community would be way too small ^^)

0
0
0.000
avatar

Dont know if double posts (simple translations) are seen in a positive light here on Hive.. Had the feeling that it is the opposite..

I am not a fan too...

And I understand why you did like you did. Actually it was the first time I seen such format. I don't dislike it, it was just new to me. So, maybe I need a bit more time to get used to the fact that first is different, and then try to understand what I like or not about it. I will make sure to feedback don't worry.

Meanwhile, keep doing your stuff.

0
0
0.000
avatar

Toller post, gern mehr davon :D
Noch ist alles ja recht übersichtlich, sobald forschung, bildung usw hinzukommen wird es spannend😅

0
0
0.000