4 ms·
Modified the problem from this post to also include debt. If someone doesn't have the funds to pay during the turn, they have to borrow money from the person th
by kirillseva 9y ago
Modified the problem from this post to also include debt. If someone doesn't have the funds to pay during the turn, they have to borrow money from the person they should be giving it to, and pay back with interest.
Check out the source and the produced animation here: https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf11b64b27 https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf1...
- kirillseva 9y agowith the following parameters: NUM_PEOPLE = 45 INITIAL_BANK = 45 # everyone gets 45 dollars INTEREST_RATE = 0.1 # 10% per turn that you didn't pay ROUNDS = 5000 RENT = 1 # how much to pay each round everybody's cash goes to zero on step 1008. From that point on all trades are debt manipulations only edit(formatting)
- e12e 9y ago> everybody's cash goes to zero on step 1008 Surely not in the highly improbable case of everyone starting with 1 dollar, giving money to someone else in a chain that leads back to themselves? Theoretically such a system could continue indefinitely? (a gives to b gives to c gives to.... a)?
- kirillseva 9y agocorrect, if we sample without replacement here https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf11b64b27#file-simulation-r-L18 https://gist.github.com/kirillseva/961fa1f5b5d64254e0117caf1... then we'd indeed have a balanced situation where everybody keeps their initial balance. However, we do sample with replacement, and at some point a lucky winner is going to start hoarding cash. Until such time when no one has cash to pay the winner, and he's ultrawealthy... on paper