Live data from Hacker News

Building an economy simulator from scratch

thomassimon.dev

201–210 of 217 posts

Re: Building an economy simulator from scratch

#201
post #19
post #6

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.

I'd love to take a look too. Just a suggestion, push it to github then clean it up. It's always helpful to see not just the product but the process. Great work.

Re: Building an economy simulator from scratch

#202
post #5

dont' 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…

I was thinking about this the other day and it seems like the problem of map size is also the problem of the story of our lives. How much detail is really necessary.

Re: Building an economy simulator from scratch

#204
post #193

In 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 :)

> Why Modern Monetary Theory in particular?

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

#206
post #37

The 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

Have never been able to ascertain what model it actually uses e.g. a system of linear equations, if so which ones?

Re: Building an economy simulator from scratch

#207
post #113
post #82

First, 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 .…

I thought about your comment quite a lot. I don't think whether something is conscious act or not has nothing to do with causality. Steve Keen actually did some simulations according to which oligopolies can form without firms even knowing each other, just through a common pricing mechanism. That doesn't mean that oligopolies are not causally responsible for lower economic performance.

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

#208
post #82

First, 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"?

> why not program your own model

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

#209

In 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.

Top tier comment right here. Well done.

Re: Building an economy simulator from scratch

#210
post #6

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.

Not the author, but I am trying to replicate it[1] without looking at the code (so sort of blackboxing it)

If you just want the javascript file (195 lines of code), let me know too

I'm currently working on Simulation 15

[1]: https://github.com/ldd/economy-test/tree/master

Post reply on HN