This takes a little explanation.
An agent-based model is a tool used in a lot of different disciplines. It’s essentially a way of examining the emergent behaviors in a complex system. An ABM creates a number of software ‘agents’ and allows them to interact with each other using whatever rules the researcher wants to explore. So, for example, a programmer can creating interesting ‘flocking’ behaviors by creating a bunch of virtual birds and giving them different rules of motion depending on the proximity of other birds.
One of my favorite books is Growing Artificial Societies by Robert Axtell and Joshua Epstein. The authors use agent-based models to represent human societies, starting from a simple model where agents move across a changing ‘landscape’ of variable resources, and building up to include reproduction, cultural transmission, warfare, trade, and disease. It’s fascinating.
My very simple ABM is a model to represent a direct-democracy legislative system. There are eight citizens, and each citizen has a randomly-generated “preference string” that represents its political views. The string has eight digits, and the digits have no relation to one another (so they shouldn’t be read as single number, but simply a series). There is also a big string of eight digits which represents the law of the land.
Each citizen wants to be “happy.” That means that each citizen wants the law to be as close as possible to its preference string. Happiness (or more technically, Baysian Regret) is measured by adding the difference in each digit in the law from that citizen’s preference; therefore a low total is happier. So a citizen whose string exactly matches the law has a zero Baysian Regret and is perfectly content. As the difference increases, the citizen becomes less happy. Each citizen is color-coded to represent its happiness level (pure green for BR 10 or less, shading through yellow to pure red for 40 or above).
Each round, one random citizen proposes one random digit from its preference string. Then three other random citizens are selected to “vote” on this proposal. (This means they calculate their happiness under the current law and the new proposal; if the new proposal makes them happier, they vote in favor of it.) If 2 or more citizens vote in favor, the law is changed. Otherwise it stays as it is.
The global happiness is measured across all citizens. (Again, a lower number is better.) Then the process iterates.
At any time during the run, you can press ‘g’ to see a chart of the global happiness. The chart is bounded at the top by the maximum possible BR, and at the bottom by the minimum possible. The yellow line is the starting BR, and the cyan line is the average BR to date (stopping at 1000 iterations). The vertical chart lines are red when the law changes, and blue when it remains the same as the previous round.
As I hoped, the model is very consistent. No matter where it begins, it always averages about 8% to 15% above the minimum possible BR. (By contrast, when the law is changed at random, the average BR is about 33% above minimum).
This is obviously (and deliberately) a very simple model – the citizens never change their minds, no one ever dies or has children, there is no possibility of innovation, no variation in political conviction. But what the model suggests is that an algorithmic democracy, in which no one ‘represents’ the citizens and in which legislation proceeds as a dynamic process between all citizens, can work, at least least better than randomness.
I have also adjusted the numbers (within the code; I have yet to add an interface which allows the users to adjust this themselves). Even when there are 10,000 citizens, and only three voters per round, the system still performs much better than chance. I want to do some more work with this, trying to get a sense of how the various numerical configurations affect the average Baysian Regret.
Click it here and watch it go!