Is the source code for this simulator available anywhere? The post's code itself is minimized/obfuscated: https://thomassimon.dev/assets/cashloss.1fca21f6.js I couldn't find anything on the author's GitHub. I'm mostly just curious how it's built.
Author here, if there is enough interest I can clean the code up and put it on GitHub. It is basically a state machine.
Building an economy simulator from scratch
201–210 of 217 posts
Re: Building an economy simulator from scratch
#202dont' mistake a beautiful map for the territory, you'll find yourself lost amongst lines that aren't a real place.
On Exactitude in Science By Jorge Luis Borges …In that Empire, the Art of Cartography attained such Perfection that the map of a single Province occupied the entirety of a City, and the map of the Empire, the entirety of a Province. In time, those Unconscionable Maps no longer satisfied, and the Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and which coincided point for point with…
Re: Building an economy simulator from scratch
#203Re: Building an economy simulator from scratch
#204In the late 80s, I typed in a BASIC economy simulator I found in some computer magazine. It ran to two or three closely-typed pages (sides). As Chancellor of the Exchequer, you set the tax-rate, interest rate, level of public spending and so on; then you ran a cycle. I can't remember whether a cycle was a month or a year. After about three years, the workers would be on strike and there would be rioting in the street…
Economist here. Why Modern Monetary Theory in particular? Just curious :)
Because I don't understand it. Having a model to tinker with might help me to understand it better. It looks a bit like voodoo, but then a lot of economics looks like voodoo to me; I'm not an economist.
Re: Building an economy simulator from scratch
#205Re: Building an economy simulator from scratch
#206The MONIAC built in the 1950s by Bill Phillips (of Phillips curve fame) attempted to model economic processes with coloured water (fluidic logic) https://en.m.wikipedia.org/wiki/MONIAC
Re: Building an economy simulator from scratch
#207First, I really appreciate author trying to understand economy better in this way, even though this simulation is quite naive. I think everybody should do that. But as others have noted, it has no concept of capital, private property, and labor market. Therefore, it's not capitalism. It's not anarchism or communism either - it lacks flexibility of workers to do something else, or state planning telling workers to do…
> To people who wonder why don't we have good economy simulators that would reflect a real world. Well, I think the answer is pretty simple - rich people don't want that. The comment above is an example of an explanatory theory [1] > An explanatory analysis will try not only to describe the information but also to provide causal relationships between the various data presented. Simple, yes, but also too simplistic .…
You already seem to accept that there is evidence that powerful people do not want economic transparency. This is my (anecdotal) observation as well, some of it directly from economists.
As far as economics as a profession, it's odd that (neo)classical economics held for a century despite many criticisms against it over the years (in particular the criticism that it is never really positivist). It seems pretty inline with the idea that powerful people are willing to pour a lot of money to maintain its hegemony.
Whether the economists realize it.. Steve Keen discusses this a lot. Lot of neoclassical economists did some research themselves that disputed basic neoclassical assumptions, only for these assumptions to be continued to be taught to the next generation. So lot of them are probably pretty honest, just misguided.
Re: Building an economy simulator from scratch
#208First, I really appreciate author trying to understand economy better in this way, even though this simulation is quite naive. I think everybody should do that. But as others have noted, it has no concept of capital, private property, and labor market. Therefore, it's not capitalism. It's not anarchism or communism either - it lacks flexibility of workers to do something else, or state planning telling workers to do…
So if you feel that way, why not program your own model introducing the "concept of capital, private property, and labor market"?
I wouldn't use the word 'program' here; I think it misses the essence of quantitative modeling. Quantitative models can be defined on purely mathematical terms. Some of these also benefit tremendously from computer simulation. Still, many can be analyzed and understood based on mathematical properties.
The worlds of declarative programming and formal analysis can come together in very interesting ways w.r.t. modeling and simulation.
P.S. This comment isn't aimed particularly at the commenter above; I'm writing this comment because I don't think the domain of 'modeling and simulation' is generally well-understood among software developers nor HN participants.
Re: Building an economy simulator from scratch
#209In the late 80s, I typed in a BASIC economy simulator I found in some computer magazine. It ran to two or three closely-typed pages (sides). As Chancellor of the Exchequer, you set the tax-rate, interest rate, level of public spending and so on; then you ran a cycle. I can't remember whether a cycle was a month or a year. After about three years, the workers would be on strike and there would be rioting in the street…
Ah, you see, you have to turn off the IS_FRANCE option.
Re: Building an economy simulator from scratch
#210Is the source code for this simulator available anywhere? The post's code itself is minimized/obfuscated: https://thomassimon.dev/assets/cashloss.1fca21f6.js I couldn't find anything on the author's GitHub. I'm mostly just curious how it's built.
If you just want the javascript file (195 lines of code), let me know too
I'm currently working on Simulation 15