The Flux by Epistemix

Democracy 3.0: Bridging Policy and Technology with Tom Pike

Epistemix

In this episode of The Flux, hosted by John Courtier, CEO at Epistemics, we delve into the fascinating world of agent-based modeling (ABM) with Tom Pike, co-lead for MESA. Recorded live at the Complex Systems Society conference in Santa Fe, New Mexico, Tom shares insights on democratizing ABM through Python, its significance in decision-making, and innovative applications such as COVID-19 policy modeling in Costa Rica. The discussion explores the accessibility challenges of ABM, the potential of large language models, and the transformative vision of 'Democracy 3.0.' Tune in to learn about the impact of ABM in fields ranging from economics to public policy and how it can lead to better decisions for a complex world.

00:00 Introduction to The Flux

00:47 Meet Tom Pike: Agent-Based Modeling Expert

01:29 The Origins and Growth of MESA

04:05 Innovative Applications of Agent-Based Modeling

05:06 Future of Agent-Based Modeling and Accessibility

06:58 Economic and Policy Implications

10:17 Challenges and Opportunities in Complex Systems

20:47 Advice for Aspiring Modelers

Thomas Pike
[00:00:00] Welcome to The Flux, where we hear stories from people who have asked what if questions to better understand the world and talk about how data can help tell stories that impact decisions and create an intentional impact on the future. This is your host, John Courtier, CEO at Epistemics. In a world where the flux capacitor from Back to the Future does not yet exist, people have to make difficult decisions without always knowing how the future will play out.
Our guests are people who've taken risks, made decisions when uncertainty was high, and who have assisted decision makers.
John: Welcome to the next episode of The Flux. today we're on with Tom Pike. So Tom, glad to have you on. 
Thomas: Glad to be here, John. 
John: Yeah, so we're both at the Complex Systems Society conference here in Santa Fe, New Mexico, talking about complex social science, agent [00:01:00] based modeling, and a number of other topics.
so Tom, why don't you tell some folks what you're working on these days. 
Thomas: I'm a co lead for MESA, which is agent based modeling in Python. and a lot of what I'm trying to do is figure out how we can, essentially democratize agent based modeling so it's, people can use it for better decision making, effectively, right?
So how can, essentially you have a virtual lab where you try out things, before you do it in real life, whether that's selling a car, or, policy on,some economic policy that will affect millions of people. 
John: Prior to starting the MESA project, what were some of the gaps that you saw in the agent based modeling space that made you and the others that got behind MESA together?
Thomas: so I came a little bit for a sideways. So MESA was started, before I joined it. It was very small and over a couple of years we did it. but what we got me into this is, many 2002, 2003 timeframe, I was a infantry platoon leader in Iraq. and so sitting there in our Ramadi, and the question was really, very close to [00:02:00] after the initial invasion, it really became,what is a democracy?
and then it became,first it was how, how do you set up a democracy? And then as I continued to study and figure that out, it became, what is a democracy? and now I'd say my view is that it's like what's a, it's a society where nobody can win. So that way you always have compromise.
But,trying to understand that,and get after it. I stumbled on a book called the origin of wealth by Eric Beinhacker, which led me to the Santa Fe Institute, which led me to complex adaptive systems. And after that very long windy road, I ended up going through George Mason's, computational social science program, where Jackie Kaysel and David Massad had started MESA.
and then I jumped on, started to contribute in about 2018 or so. 
John: Okay. Cool. so from 2018 to present, what are some of the big things that have made MESA take off? 
Thomas: I would say we're getting better at reaching out, and recruiting people. So a lot of the, problems were just.
ease of making contributions. A lot of it is people don't like [00:03:00] think there's some kind of massive barrier to entry, right? When, in fact, and that was the same for me. It was just really Jackie and Davey and a couple other people making contributions, and I was trying to fix a bug on my code for my dissertation, and then I said, Hey, you guys know this is wrong.
They're like, Hey, do a pull request, right? I started showing up to the meetings. It's Oh, this is a very small group. so we, we made some changes to improve that, so it's easier for people to contribute, start reaching out to a lot of academic institutions,that were, doing contributions and it turns out Europe is really big into agent based modeling.
Sure. and so they've done some great contributions and are now, maintainers from various universities, like the technical university of Delft is a big one.but, yeah, so once we more people started learning about it, more academic institutions started doing agent based modeling.
Right, then, and Python being a very popular language, we started getting more contributions. and we've gotten better at reaching out and the, I'll say the human aspect, of building a network besides just the coding. 
John: The project has [00:04:00] expanded and people probably done some unexpected things with Mesa.
I'd imagine. Yes. What are some of the cool things that you never thought somebody might build an agent based model of that might have some positive impact on other people? 
Thomas: yes. So there's a couple people or something that have come here or when a couple that stick out in my mind, was somebody who's using it, with COVID being a big deal, pandemic modeling or agent based modeling being very good for pandemic modeling.
One person built one, a pandemic model for COVID that actually was informing policy in Costa Rica and how they were handling some of their pandemic policies. We just finished up Google Summer of Code. So people, quite literally from all over the world, Singapore, India, and Italy, building contributions.
So we have a reinforcement learning connection now. we saw the reinforcement learning libraries out there. we have,without getting too technical, but, ways to speed up, your agent based modeling, as well as ways to, I know that you can, have a video [00:05:00] where you can go backwards and forwards, to see critical transitions in your simulations.
Cool. 
John: Very cool. so what are some of the things looking forward that are exciting you about where the field of agent based modeling and computational social science is headed? 
Thomas: I would say,our big goal is to Problem and challenge, is how do we make it more accessible, right? So you can look at some of the machine learning libraries out there.
and once you figure out your data, which is always a challenge, you can do, number any number of machine learning approaches with three lines of code, right? that is not the case for agent based models. It's still requires a lot of effort to think through your dynamics on how that works.
I think, so the accessibility problem. I think is our biggest challenge. I think, large language models might become, a huge help on that,just because the, the search space is so big and they could rapidly develop stuff. I also think, as the community grows,that will, more people in their particularly niche field and more people become technically literate, there'll be more contributions so you [00:06:00] can build out.
more, I'll say elegant and complex ecosystem. the, my goal, I was going to say is could, the next, if The next pandemic comes, could you have a elementary school principal sit there and rapidly throw together a model of the new pandemic dynamics, how it's transferred their school with their students with like behaviors of a kindergartner to a sixth grader so they can, try out policies and maybe learn unexpected things which agent based models are good at, Hey, if I just have a teacher sit outside the bathroom when everybody from kindergarten to second grade washes their hands, we actually flatten the curve significantly.
And so they have that virtual lab, digital twin, where they can experiment with ideas and policies. that would be my goal is that, it's super accessible to people to just take all those building blocks, for whatever their problem is and throw it together.
And beneath that, is a lot of rigor, and, and science and knowledge. 
John: Yep. share very same, very similar vision on the epistemic side. That's cool. So you mentioned one of the [00:07:00] projects that you're pretty proud of right now on inequality. You want to talk a little bit about that? 
Thomas: Yeah, so that's actually a kind of a long pole and the Ted as we say right now, but so working so Lord Natway out of the UK House of Lords reached out to Mesa And said how can you know, we make this more accessible?
So his problem is a legislature Is that, it's like, Hey, I'm, having to pass these bills and, and do these things, but I'm not really sure of the implications or all the stuff that goes underneath it. I'm being coached by my,coach to say, Hey, we should vote for this on this one.
It's so his problem is, how do I see the impact of this change to this law? and so the approach right now is. And hopefully we have,like a base model, here in the next couple, a couple of base models, the next couple of months. And the idea, or so I guess some videos that kind of walk people through it.
but the idea is building a rigorous model at the legislature level, at this point will be a very hard undertaking, but building a simple model [00:08:00] that helps people. evolve their understanding so we could get past some of these kind of, I'll say, tired and worn debates, is now like that goal to really help,much like chat GPT or whatever, popularize this type of approach, in people's minds, right?
So the first one we're looking at is wealth inequality, because really a lot of the debates are still,in the popular, kind of culture are still, Marx versus Smith, from the 1800s. and economic system. Learned a lot more since then. and so without getting into too many details, the idea is can we give a simulation where people can go and be like, oh, these ideas that I've had are really, no longer relevant, right?
Now, these seem to be the critical issues, right? And I can sit there, and see how, See how, manipulating, different policies then produces results that I find unexpected. And now I know, it's like, Oh, maybe this is the problem that legislation and policy should get after. The other bit on that is, is, how do we make it auditable, right?
So it's more accessible to more people. So I and [00:09:00] we have a Another library called Jupiter Bridge, that's just come out. and the idea is that you can have a simulation, but you can flip actually into essentially interactive documentation that gives you like, hey, these are the major muscle movements.
That this, simulation is doing. And here's an explanation and, it goes so far as that you can, change the code to see what that impact is. . Or toggle a button that tells you, it's like, Hey, line by line, this is what's happening in this particular, chunk of code.
so I think that's where we're going right now is number one,to, I guess get. more people understand as well. First, phase one is let's see if we can popularize it with simple models that are approachable to people that address issues that are very relevant to them that are being.
driven by, I'll say old and tired debates that are just being exploited by populous leaders right now. Sure. and then it's not only that, but how do you make it audible so it's not just a black box or it just does it, but I don't know what's under the hood, and you can actually see what's under the hood.
John: Yeah, absolutely. it all comes back to the accessibility [00:10:00] argument. Yep. Yes. Accessible for the, policy makers, executive decision makers, and. Whoever their technical right hand person is so they can go in, look at the models, observe it, and that creates trust, which is exceptionally important for anybody in the decision making role.
So one of the things you mentioned related to some of the maybe economic policy or public policy. if you look at the world in the 1800s, it wasn't changing as quickly as it was today, and the field of economics, as the world changes, behavior change happens more quickly. maybe 20 years ago, behavioral economics started becoming more and more of a thing.
And recently, a couple people started mentioning, the work that Don Farmer's been putting into complexity economics for, the last 20 years or so to get that popularized. he just came out with a book. there's some others who are trying to get behind this, complexity economics movement.
so in the field of economics, if you're applying agent based modeling. [00:11:00] Clearly there's some good examples. do you have examples of people working in Mesa on some economic challenges? 
Thomas: yes. So off the top of my head, the, I know, now I can't remember the exact day about the university of Maryland.
They actually have a, an economic toolkit, and underneath the hood, is Mesa. I haven't seen any rigorous, I'll say policy ones. but, Yeah, I'm sure there's some,some papers or whatnot, that are out there, that people have, have written on it. yeah, it is. complexity economics is a thing.
And I think that goes back to the point of,the world is changing very fast, but the bit with that is you have, to include myself, experts that have spent decades understanding the world in one way, right? and, and that has not been easy to gain that, say, understanding of the world.
Of classical economics, then you have, I'll say disruptors like doing farmer coming and be like, Hey, maybe you should think about the world like this instead. And I think that becomes The great challenge or the breaks in that right, which is that, Hey, I've spent 20 years learning the world this way.
Now you're saying I should look at it this other way that I'm not familiar with. [00:12:00] So I think that's a great promise of potential of agent based modeling and making it more accessible is that interaction will help you see the world in new light and ideally help you adapt your,help you adapt Preconceived notions, which I have, are an understanding into a new understanding because now you have this interactive tool to explore how you think, how you understand the world, maybe some new ways to understand it.
John: Cool. so let's put economics aside and epidemiology epidemic pandemic planning aside. What are some of your most favorite use cases of agent based modeling or where do you feel like? from now we look back and it's Oh, it was so obvious that agent based modeling was the right tool to solve this type of challenge.
Thomas: I think why I'm so interested, why I spent so much time, working on this is because we'll make better decisions, but we have, there's significantly hard problems, and, and as I think as Einstein said, you can't, [00:13:00] solve new problems with the same old way of thinking, 
and so I think for me, that would be the. the great promise would be like, hey, we have this massive homelessness problem, under house problem. What are some policies we can try I in, in Silico, as they say, in this virtual world before we spend, millions of dollars on it, or billions of dollars on it and then find out that, wasn't the impact that we wanted, right?
and I mean,so I think that's, the end, Even mundane things, right? I would say mundane things, but things that don't capture the mind of the populace,the popular consciousness as much as other things would be like, okay, what's the, fertilizer policy in central Iowa, that helps mitigate, red tides in the Gulf of Mexico, right?
What's the,how's, I'm from Fairfax County, how's Fairfax County going to improve its roadways or do its school investment policy, combined with its,housing development policy to optimize its, its public schools, right? how do you,so I think the [00:14:00] possibilities are endless with these very hard, complex problems where it's even things like, okay, how do we, make our infrastructure more robust, right?
how do we, optimize as electric cars come up? How do we optimize installation,of, electric chargers. And the big deal is, is that you can ideally make better decisions sooner. So you're wasting less money. you're getting past. preconceived notions that legislatures have, and you're getting at like the root problems that nobody's talking about, unless you're an expert in the field, and then you're frustrated because now the legislatures or populists will listen to you, even though you're like, no, I've studied this for 30 years.
This is how this works, right? So I think, sounds a 
John: little bit like the movie. Don't look up. 
Thomas: Yes. Yeah. Yeah. Yeah. and Yeah, and I'm I think, piling on to that, it's, we've talked about this in this project with Nat Way, right? Is that it's like, what, I think this type of, these computational tools have the approach, To take us to like democracy 3.
0 or governance 3. 0, right? It's that next level of [00:15:00] governance where now the legislatures, the experts, the politicians, the experts, and the population, can talk more effectively to each other. 
John: Yeah. 
Thomas: And have that common, that common drawing board where, it's, they're not talking past each other, but more effectively discussing the issues and where they disagree.
And there's still be the same debates is like, you're using this approach here and this part of the code and I disagree. You should be using that approach. You get a completely different answer, right? But I think to your earlier point, like the trust bit is okay, yeah, you can't hide it though.
it's it's here. This is what we're doing. And we're actually our problem is we disagree with this, right? And hopefully, she's always questionable. We could be more grown up about how we,how we have that debate Right. we're appreciates like, we don't know the answer.
Let's try one or the other. And then we can now see how the results compared to the, to the model or the simulation and now make better decisions and gain better understanding together. 
John: Yeah. one of the people who was on the podcast recently, who's at the conference, Timothy [00:16:00] Clancy, he was talking about how the first 48 percent of identifying or solving a problem is, are we all pointing our brains at the right thing?
Yep. So do we have alignment there? 4 percent of the middle is let's get the right model down, whether that's an agent based model or a systems dynamics model, whatever it might be. So long as we can observe it, have conversations about it. Great. But then the last 48 percent is can you build consensus as to what's the next action we collectively are going to take?
And,we take a very similar approach to what you just described on the epistemic side, where you have to bring all these stakeholders along. they each have to see their part of their contribution into. informing a model, some people aren't, great at coding, they might be able to describe a scenario.
They might be able to describe the strategy. They're not going to write a line of code. so they're reliant on somebody else to do that. But once it's there and you could see a model diagram, you could see here's the levers that you actually have control over. it helps bring the technical folks and non technical [00:17:00] folks together, which is certainly really important when you're solving these big complicated challenges.
Thomas: Yeah, and that's the kind of lead developer on this project, Jupyter Bridge. That's why she called it Jupyter Bridge, right? Because the idea is, how do you keep that bridge between the technical folks, and the experts and others, right? and so the idea is, because, and I don't know if you've seen this, but massive personal experience.
You show certain people code, it's I'm out. Like they just completely shut down. All right. So this is that's the problem. Let's see if we can hide all that code and focus on the meat of the thinking under, that's associated with that code. 
John: Yeah. really love the idea of democracy 3.
0. I don't know if we're in 2. 0 yet or whatever, but, there's a group of computer scientists that are now starting to adopt agent based modeling a little bit more, through an initiative called common good AI. Okay. So taking things like collective intelligence, agent based modeling, inference to do better policymaking, and engage, through the collective intelligence side of things, engage an entire [00:18:00] community, which might be all of the stakeholders in a certain jurisdiction.
Here's the challenges that we're facing. Where are your ideas? That comes back to a group of folks who can put the models together. Models get presented back. And next thing you know, it creates this. It's more public discourse around Oh, here's what we think, and here's how these things might actually play out.
so that's a really cool call and I haven't heard anyone use the democracy 3. 0, before. So 
Thomas: yeah, that's definitely a lowered way. and I think, that's, I got like a story I tell a lot, that, and this goes back to what in fact is democracy? and I think the, critical dynamic in democracy is like a good idea can come from anywhere.
And so I do this thing called Tale of Two Printing Presses, where, the Chinese invented the printing press 400 years before Gutenberg did. And then they, not only did they invent it, but they stopped using it. It was like, eh, nothing to see here 80 years before he invented it. So then Gutenberg invents it, it becomes this massive disruptive technology of catalysts, and really it's, a knowledge replication tool.
[00:19:00] And then it's why is that? I was like,that China at the time was under the emperor, very autocratic rule. And you had the bureaucratic elite that were incentivized to maintain their position. and continue to be the elite, which gives you a very kind of narrow focus on who has ideas and how those ideas spread.
You go to Europe and you had this, new network of fiefdoms that were all just sitting there fighting with each other. And quite a lot of people like Copernicus and Galileo could sneak out their works underneath the, the Catholic church has tried to the attack. Try to be the autocrat of the entire europe to the netherlands, right?
And then it just became this force. You couldn't contain sure And it in my assessment it fundamentally started to undermine the ideas of like divine right and things of that It's no, I got a good idea. I'm gonna write this down and put it out to you and so democracy thrives when you're For my view at this point when you optimize How you're the population?
You Is able to store and share knowledge so the rest of the population could be like, [00:20:00] Oh, that's a really good idea. I want to use that, right? And coding and, combined with the Internet combined with these repositories like GitHub and stuff like that is just the next optimal way of storing and sharing information.
And I think there's a lot of what we've talked about is that, how do we make that accessible to more people, but not just the computer science majors? Like, how do we let that, that person with, with a great idea on whatever, right? It's how can we store that in code and now let everybody else take a look at it, and say Hey, this is a really good idea.
I can use that in my particular against my particular problems. 
John: Yeah, I'm fully believer in that. This is a way to make better decisions in the future. And I think we can get there so long as all the different, pieces can find a way to communicate and work together. Yep. 
Thomas: Yeah. 
John: last question for those people that are tuning into the podcast that might not be familiar with agent based modeling, might want to take a first step, might be a high school student or a college undergrad [00:21:00] who's considering what they want to be when they grow up.
what advice do you have for people that are trying to get into agent based modeling for the first time?
Thomas: Probably the easiest way at this point, because you could just install it and play with models. Would still be net logo. Sure. so net logo is, outta the University of Chicago, I say with Walinski, URI Walinski, and it's just like you can install an app, And then immediately start playing with simple models so you can,start to experiment with 'em. 
John: So just go down and just start trying. 
Thomas: Yeah. I would do that. and then we start to. learn more underneath it. I would always encourage you to learn some coding if you go to pythonas a fairly straightforward language to learn.
Although there is some initial investment, right? May say we have. We have tutorials. We don't need to know any coding, right? But like our intro tutorial, you can literally just walk, through the cells, hit the play buttons, right? And then have a dashboard to play with the model on. And hopefully soon we'll get to the point where there's just, some website you go to and you can play with models.
Mhm. other than that, my recommendation would be, since we're in Santa Fe, just down the hill from the Santa Fe Institute, they got great, [00:22:00] free line, free on demand courses,as well as not, as well as synchronous courses, through their complexity Explorer 
and so getting that baseline of, in essence why agent-based model, why a lot of,the, I think a thing that's people don't appreciate is there's a. Very large amount of problems that science and experts have never really been able to dress, right? But once you start getting the digital computer in the 1960s and now we're at we and now with like machine learning other forms of AI and tools like agent based modeling system dynamics models Humanity as a whole is now able to start tackling problems that for literally thousands of years that knew about but just couldn't address Sure, right and so I think that foundation in Understanding That realm of problems, which, you can put on the umbrella complex adaptive systems I think is will give you a good baseline to start, you know I guess breaking down some of those preconceived notions because you know when you learn stuff in school you learn what we know [00:23:00] And education doesn't often talk about hey, we just learned this and it's a really cool tool and now you can do it You know Gaussian distribution of all this stuff.
It's but we're not good. They never talked about this is all the crap We don't know what to do with it Sure. Just too hard. and I think that,maybe gives us a bit of the,Dunning Kruger effect as a society, where we just think we know all these things because we never stop to say, what are all the things we don't know?
what is a democracy? How do we do, effective policy to maintain a healthy and thriving democracy?and so I think, start, so I guess a short version is, yeah, play around with some models. there's lots of them out there. You can probably just search agent based models and find some that are, are just internet,thing.
Nicky Case has some great tools that kind of help you, see some of these dynamics. and then, yeah, and then start learning about complex systems. Start learning about those things that we just, you know, these are all the hard problems we're still trying to get after. 
[00:24:00]

People on this episode