10 ms·
Peter Norvig's Economic Simulation (2018)
- dang 7y agoAnyone know the original year?
- jpiabrantes 7y agoCaptain Obvious: real world transactions don’t look anything like this.
- empiricus 7y agoHow would you better model real world transaction?
- ploika 7y agoTo be fair, the answer to that question is probably someone's PhD thesis.
- empiricus 7y agoQuite possible, but he started with "Captain Obvious" so I hoped that meant he knows other models that are obviously better.
- randallsquared 7y agoEven if they do know other economic simulations which are better, it isn't a given that a better tool exists for every tool that doesn't ideally meet a need. Of course, you did say "hoped" instead of "expected"...
- TuringNYC 7y agoSometimes we needs to start with a simpler model, demonstrate concepts, and work our way up. Of course, it is important to acknowledge the model is simple.
- G8WyaX 7y agoPrevious (2016): https://news.ycombinator.com/item?id=10962026 https://news.ycombinator.com/item?id=10962026
- Anderkent 7y agoI guess what I always find unconvincing about these kind of arguments is that they require 0-sum trades, and real world trades are positive sum. I think this is more of a gambling simulation than an economic one. However, even with positive-sum games, the nature of the transaction can have big impact on the wealth inequality. There's a great writeup on that in https://jasoncollins.blog/2020/01/22/ergodicity-economics-a-primer/ https://jasoncollins.blog/2020/01/22/ergodicity-economics-a-...
- cryptica 7y ago>> and real world trades are positive sum. Not in the tech sector. Everyone is competing for monopoly position for each area and niche. Once an area is monopolized, the incumbent gets complacent and inefficient but doesn't lose their winning position. Also people don't make money by creating value, they make money by picking the winners and following the money.
- notahacker 7y agoIt can still be a positive sum trade to purchase something from a corrupt and inefficient monopoly. Indeed generally the only reason corrupt and inefficient monopolies can stay in business is because having access to the good/service still has value to its customers, even if they'd be happier having an alternative. Sure, VCs make a few negative sum trades when they invest in companies that aren't going to generate the exit they were hoping for, but they're aware of that and trying to balance them out with ridiculously positive sum investments anyway...
- Anderkent 7y ago>Also people don't make money by creating value, they make money by picking the winners and following the money. This is still creating value.
- TheOtherHobbes 7y agoNo, it isn't. That's not value - that's just rent-seeking i.e. moving money from one pocket to another.
- zerr 7y agoSlightly off-topic: it was mentioned here earlier that the reason Norvig switched to Python (from Lisp) was because of his job (Google). But in fact he uses Python for most of his personal stuff as well.
- Scaevolus 7y agoIt's because Python more closely resembles pseudocode, making the examples in _AI: A Modern Approach_ more accessible to readers. https://news.ycombinator.com/item?id=1803815 https://news.ycombinator.com/item?id=1803815
- fizixer 7y agoAs a long time python user who recently got into s-exp languages (scheme to be specific), I realized the differences between python and scheme are more than just syntactic, in the following sense: Programming in scheme forced me to think and code with a functional mindset. Python never forced me like that, even though you could stick to a functional subset of python (essentially forcing yourself). I've also realized that a strictly functional mindset doesn't match well with CS curriculum. Case in point, there is a textbook called purely functional data structures, and I'm personally fully convinced that there is a whole class of functional algorithms that I have not explored, and these look nothing like the usual algorithms and data structures taught in a standard CS curriculum. I also believe that SICP doesn't even scratch the surface of this different kind of thinking. SICP is small booklet of (dynamically typed) functional programming 101. So if your standard CS graduate doesn't have a bleep of an idea about how to think with a functional mindset, and all of a sudden, has to program in a language which practically forces you to do so, they're going to have a bad time. P.S.: You could develop an imperative framework on top of scheme (or lisp) and move on with your life, never having to think functionally. But that's a whole different story.
- pjmlp 7y agoThat depends pretty much on the university's teaching quality. I was lucky to study in a very good one, so not only did I got exposed to all programming paradigms during those 5 years, I also got access to a rich library that exposed me to the real history of systems programming across several platforms all the way back to the late 50's, due to their rich book and conference proceedings collection.
- universa1 7y agoThe standing ovation problem is another nice and easily understood problem, that allows a view into dynamics and the impact of structure on the results. One can easily model that as an agent-based simulation and introduce all kinds of stuff on top. https://www2.econ.iastate.edu/tesfatsi/StandingOvation.MillerPage.pdf https://www2.econ.iastate.edu/tesfatsi/StandingOvation.Mille...
- ur-whale 7y agoMMmh ... there's no wealth creation function anywhere. Is Peter assuming that economy is a zero-sum game? Or is he assuming that the simulation is unaffected by working with normalized numbers? My gut says both assumptions need to at least be justified. I'd be happier to see an actual wealth creation mechanism added. Also, the final metric (Gini coefficient, aka the jealousy index), how much does it actually to speak to individual's happiness? A rather controversial choice: happiness is probably much correlated to absolute rather than relative wealth, something Gini entirely fails to capture.
- dagw 7y agohappiness is probably much correlated to absolute rather than relative wealth Studies show that it's much more complex than that. Basically both are always a factor, but if you're below a certain level absolute wealth is the most important factor, but once a above a certain level relative wealth dominates[1]. The level where the switch over happens differs quite a bit between countries and places, although most studies looking at salary seem to put it in the $75k-$120k/year range for the US. All that being said most studies also find that income/wealth (both absolute and relative) have relatively small impact on overall happiness when compared to other factors. [1] https://link.springer.com/article/10.1007/s11205-007-9217-0 https://link.springer.com/article/10.1007/s11205-007-9217-0
- anoncake 7y ago> Is Peter assuming that economy is a zero-sum game? Of course production is also part of the economy but that is not what he's modelling. He's modelling the distribution of the wealth created. Of course you could model positive-sum trades but that just affects how much wealth is distributed after in each transaction, not how. > A rather controversial choice: happiness is probably much correlated to absolute rather than relative wealth, Absolutely not. Else our ancestors would all have died of depression in the stone age.
- tasubotadas 7y agoThat's amazing. I've always wanted to do something similar but I had a much more complicated simulation in mind. Apparently, you can get some interesting insights even with such a rough approximation. I would be very interested to see, how the "connectivity" and information would affect transactions. For example, I am more inclined to buy from Apple because Apple is a well-known company and my friends bought from there. The more you are known, the more transactions you can expect to make.
- qubex 7y agoThis doesn’t model B2C-type asymmetrical situations, but pure P2P-type symmetrical situations. An easier first step for the interested beginner would be modelling visibility as a kind of dynamic network. That leads to interesting considerations about imperfect information and agents’ profit-maximisation under such conditions. (Economist here.)
- tasubotadas 7y agoWhat's visibility?
- arnold8020 7y agoBack in 2017, I was wondering about this in the context of the 80-20 rule, and believe I have a simple answer (posted to hacker news way back, https://news.ycombinator.com/item?id=16618385 https://news.ycombinator.com/item?id=16618385). Basically you need two things: 1) Some slight advantage 2) The network effect, that is, the probability of competing depends on the current winnings. If you have these two things, you get 80-20 like distributions, you get the explanation for why winners keep winning. If you are interested, you can find my simulation and analysis at http://www.cs.toronto.edu/~arnold/research/80-20/ http://www.cs.toronto.edu/~arnold/research/80-20/ Kind of shocking how well this works. The intuition is, why has coke won, well they had some initial advantage, and so they won a bit. Now that they have won a bit, they can finance themselves into more competition. For example, they can place themselves into more stores, into more restaurants etc. Now they get a chance to compete more. Running the simulation yields interesting results, for example, in the two columns below, the left is Household income in 1970 broken into quintiles. The right column is simulation results. 4.1% 6.7% 10.8% 11.5% 17.4% 16.0% 24.5% 23.3% 43.3% 45.6% Interesting how well the top 3 or 4 quintiles match between the simulation and the real world data. If you run the simulation with different rules, the real world quintiles do not match the simulation quintiles nearly as well. You can tweak the simulation to see this as well. The simulation can be tweaked to handle cases such as inheritance, so an actor with different ability inherits the wealth of a past actor. I modified the simulation as follows: I allowed it to evolve for a single generation, enough time for the top 20% of the population to have 80% of the wealth. I now choose a random sample from the top 20% of the population to follow, lets call them T20. I now repeatedly 1) pass the wealth of all actors to actors with new, random abilities 2) let the new actors compete for a generation (the same number of competitions we used above) Result: After 3 generations of steps 1 and 2 above, 80% of T20 has lost almost all their wealth, 10% has lost 75% of their wealth, 10% has done really well, growing it by a factor of 8, due to capable ancestors for three generations. Amazing, it matches the statistics in https://www.theglobeandmail.com/globe-investor/globe-wealth/eroding-family-fortunes-how-the-cycle-can-be-broken/article33757468/ https://www.theglobeandmail.com/globe-investor/globe-wealth/...
- rodolphoarruda 7y ago> "Many students will have preconceptions about how economies work that will be challenged by the results shown here." I wonder what those preconceptions might be.
- oli5679 7y agoThis is just modelling transfers. A lot of economics focusses on gains from interaction/trade.
- leto_ii 7y agoIn case you find this interesting, there's an entire field dedicated to this kind of models: https://en.wikipedia.org/wiki/Agent-based_computational_economics https://en.wikipedia.org/wiki/Agent-based_computational_econ...
- epiteton 7y agoQuick self-promo, you can run the simulation and play around with it (and the rest of the repo) in Deepnote: https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FEconomics.ipynb https://beta.deepnote.org/launch?template=python_3.6&url=htt... (Disclaimer: I work there.)
- deleted 7y ago[deleted]
- lngnmn1 7y agoThe classic case, the gold standard - the math is correct, the programmer is one of the best in the whole world (I have read PAIP) but the simulation is completely meaningless. First of all, almost no (zero) transactions occur across different social strates (or castes), at least in real world, like here, in India (where I am living for now). Second, randomness does not exist. Each social dynamic has its causes, too complex to capture, so it is much easier (and profitable) to assume randomness. However, randomness implies lose of any meaning. A blur which ruins the original image. A naive model superimposed on a too complex to comprehend reality is neither explanatory or even meaningful. This is just a philosophy 101. Map is not a territory, simulation (a cartoon) is merely, well, a cartoon. Third, this kind of modeling bullshit nowadays is literally everywhere, and this is called "science".
- scottmsul 7y agoReal life wealth distributions have a very interesting property not shown here. The "random give/take" always ends up with an exponential distribution, which models real life for about the bottom 99% and doesn't have any really high values or long tails. However the top 1% follows a power law in real life, which does spread wealth across several orders of magnitude and has long tails, and the transition is very sharp. Presumably this is because the top 1% made their wealth in a way that is scalable, such as though starting businesses, investing, etc. If you search papers in econophysics you can see this effect.
- jpttsn 7y agoSmh. I’ve modelled the economy too. For simplicity, I model every actor as a pool ball on a pool table. Collisions are transactions. While simple, my model really challenged some preconceived notions about how the economy works.
- snowwrestler 7y agoAn important take-away here is that larger personal economic buffers (the percentage of their wealth each person does not need to transact regularly) resulted in a lower final Gini coefficient. This matches our real-world experience that growing savings is the path to financial stability, and real-world data that forced saving functions (home ownership, social security) improve average financial stability. I would be interested to see death included in the model, as that is an important and common way that pools of wealth get redistributed over the long term in an economy.
- sjg007 7y agoIt can be averaged into the redistribution function he already used.
- maroonblazer 7y ago>I would be interested to see death included in the model, as that is an important and common way that pools of wealth get redistributed over the long term in an economy. Only in the narrowest sense of 'redistributed' though, right? I.e. upon death wealth typically transfers to kin, modulo whatever estate taxes apply for a given country.
- snowwrestler 7y agoYeah, I mean just the basic inheritance tree—if there are 2 kids then each gets half, and if each of them has kids then it gets further subdivided, plus some heirs will spend down or lose money and have less to pass down...
- xyzzyz 7y agoEach gets half, but typically their spouse also gets their half from their parents.
- k2enemy 7y agoThis is interesting and a fun link between statistical mechanics and observed income and wealth inequality. But I think the statistics chosen to compare to the real world are a little cherry picked? The wealth distribution matches, but in the simulation, I think the identities of the wealthy change over time. The rich get poor, then rich again, then poor again. Over an infinite time, everyone is in every wealth percentile. But an important political economic problem in the real world is that the rich stay rich and the poor stay poor. So in that regard the simulation does a poor job of explaining income and wealth inequality.
- SkyMarshal 7y ago> But an important political economic problem in the real world is that the rich stay rich and the poor stay poor. I’m not sure if this 100% true. The highly visible super rich like Bezos and Gates and, say, the top 50 billionaires may stay rich, but the merely rich like millionaires and low billionaires are more likely to have turnover in their ranks. I recall seeing some data on this but forgot where. Will post if I can find it.
- kebman 7y agoI might be wrong, but IMHO the amount of billionaires don't really constitute a big enough population to say something definitive about that claim. Clearly the list of rich people isn't static. A billionaire might be shoved off the list of billionaires and further down, for instance. Though certainly, the chance of a billionaire becomming poor is most likely lower than a millionaire becomming poor, though I'm sure this can be tested. But without a better definition of "rich", then it really doesn't say much about social mobility or economic equality, if that is what you're going after. If you assume that the claim "the rich becomes richer" is true—which seems to be the case in this simulation—then the thing to find out is probably, "why?" and "what can be done to make a more fair distribution?" Given that this system is even unfair that is. As I see it, this is clearly up for discussion (i.e. whether what is basically Capitalism is unfair), though the simulation does not take it up explicitly, and instead merely hinting to that with such a system, the rich would necessarily become richer, and the poor poorer. I mean, who said economic equality is even a goal? Do not those who make life better for others, also deserve a good life themselves? And if you don't make life better for others, you obviously still deserve to live, but do you deserve as much comfort and self-determination (in terms of economic wealth) as those who manage to offer more?
- NPMaxwell 7y agoWhat makes the increasing-Gini result confusing is ignoring variation. This is done by thinking of the full distribution as if it were its average. In this case, the pot is distributed using a pull from a uniform random distribution: The assets of a pair are combined into a pot, and a number, s, from 0 to 1 is drawn. One person gets s of the pot. The other gets 1 - s. On average, s = .5. When s = .5, the Gini coefficient of the pair after the transaction is zero. Their pair of assets are equal. As ABS(s) approaches 1.0, their inequality becomes larger. For example, in Russian Roulette, s is either 0 or 1. With p = the portion of the pot that came from one person, then, when ABS(s - 0.5) > ABS(p - 0.5), the transaction increases inequality. When s is a constant 0.5, every transaction will either reduce inequality or maintain the perfect equality. The system increases inequality in the population until it matches the inequality in the pool from which s is pulled. There's nothing surprising there unless you make a simplifying assumption that s = 0.5, the average of its distribution. Using this simulation to model economic systems comes down to choosing a distribution for s: whatever you choose, that's what you get. UNIFORM(0.49,0.51) will result in lots of equality. UNIFORM(-1,2) will produce some people in debt to others.
- sudoaza 7y agoI doubt wealth is exchanged 1 on 1 so clearly, there is lot of wealth accumulated in assets that change price for example. Or the commons, a limited wealth up for grabs at the expense of everyone else.
- nabla9 7y agoHypothesis does not rely on wealth exchanged 1 on 1. The idea of modelling is to capture essential features. This model looks at the case where everything is fair and everybody is equal. In the sense it's the best possible world scenario and it demonstrates that inequality builds up even if no player is better than other.
- BlueTemplar 7y agoAnother fascinating aspect of simulations like these is how the shape of the final distribution depends on the number of actors - with links to statistical thermodynamics.