Monday, April 28, 2014

Update and thoughts on economic simulations, and massive pregenerated worlds for tabletop RPGs.

So, I've decided to try and run another 4 or so turns of Worldsim in September 2014 (edit: well this ended up not happening... but it was a good thought!). At a rate of 4 turns every year and a half, we should finish the game by the end of the decade, which is a perfectly comfortable pace for me. To prepare, I'll write some better admin tools, and come up with some interesting scenarios to throw at the different countries.
One major change I want to make is to base resource prices and availability (and if possible, population growth) on some kind of computer simulation. There is an interesting article by Doran and Parberry, 2010, about using agent based models to simulate price fluctuations in computer role playing games. I think their model would be a good basis for simulating prices in the WorldSim economy, I also think it would be fairly straightforward to implement their model in Simpy.
The model would work something like this:
Between turns, depending on what the player did during their turn they would have a certain number of resources in available in the country. The agents would be the farms, factories, and people within the country and they would exchange, consume, and produce goods among themselves, and that's what would determine the starting state for the next turn.
The challenge in this approach is mapping variables that make sense in the context of the main Worldsim game, to variables that make sense to the computer simulation. Each turn, the players would usually start with a shortage of various resources, whereas in the computer simulation between rounds, things would be more continuous. It's a matter of a difference in time granularity. Each human round represents maybe 10-15 years and prices stay constant the whole round, whereas you could have thousands iterations of the simulation loop in a computer simulation representing the same amount of time. So variables in the computer rounds will change relatively smoothly within the simulation, whereas there could be huge variations in the allocations for human players. There is also no obvious way to represent the concept of "minimums" in the computer simulation, or to take into account things like technology improvement, or depletion of mineral resources or arable land. I think all of these problems are surmountable.

On a kind of related topic, I've recently started GMing a pen and paper rpg set in a modern setting. I'm really intrigued by the idea of human-computer synergy in game and story design. Computers are great at generating lots of random people and locations, and people are great at seeing connections and inferring backstories an personalities from the random output of the computer. I started out with the ambitious plan to pregenerate the population of an entire city. I definitely think this is possible to do this, but I've come to the realization that it is probably entirely unnecessary. I spent quite a bit of time thinking about how to do this, but I never ended up implementing much (though I still may). The way it would work would be you'd start with a map of a city filled with buildings, but no people. The city could be procedurally generated by a computer program, or it could just be a map of a real city. Basically what you'd need is a list of addresses, (possibly associated with x,y coordinates), and with each address you'd note whether it is a residence or a business (you may have other categories too), and how many people occupy it. You'd also have some basic demographic information, such as age distribution, and household composition. Then you'd fill each of the residences with people, and assign people jobs at the various businesses. Stats for the people in terms of game mechanics could be generated with the tool inspiration pad pro (documentation, command line version), which has a command line version that should allow it to integrate with a pipeline written in any language. Once you had all of the people (or in the process of generating them), you establish relations between them on the basis of a scale free network. That is: you'd start by picking a person at random, then establishing a relation between that person and another random person in the community (possibly with a probability weighted by distance from the original pick), you'd continue this process of randomly establishing relations, but each random pick would be linearly weighted such that people who already have relations established are more likely to establish more relations. How many relations in total to establish, I'm not sure. You would want to create several kinds of (probably independent) relationship networks, maybe an iteration for business relations, and one for social relations.You'd also want to associate some kind of additional information with each relation, maybe how strong the connection is, what each person thinks of the other, how long they've known each other etc.

The idea is that the players will have complete freedom to explore this city without the GM ever having to say "Woops, no, you can't go there, I haven't written anything up for that yet." When they enter a building the GM just has to look up who lives or works there, and pull up a map (Time-Saver Standards for Building Types the third edition (1990) is $10 or less used and contains hundreds of floor plans, and seems to be more than sufficient as a source for maps of pretty much any kind of modern building). That sounds great. But, as I mentioned in the previous paragraph, I've come to the realization that it is probably completely unnecessary (which is probably also why no one seems to have attempted it before). The scope of a gaming session is actually pretty limited. Most times it's 3 or 4 fights and a bit of exploring and talking to people in between. In many ways, a table top RPG is a lot like a movie, it's much more important to have an intriguing story (even if it is a story with a limited scope), and a few strong characters than a whole city full of cardboard cutouts.