Turns out it's difficult (Feb. 27 '17)

Here's an attempt to be more honest with myself and you: I've been bullshitting myself into thinking that even the first step of implementing economy (in my ambitious sense) will be fairly straightforward. It's not.

I found this powerful abstraction of using chemical-reaction like activities (in which people and businesses convert some resources into other resources) as the basic building block to model all of the economy in a microscopic way. It seems like in theory I could model all of everyday life in a pretty detailed manner with that.

That is good. Feeling happy about this is good. Jumping to the conclusion that after this great inspiration everything will be easy is stupid. Still, I told both you and me that now I'm just "taking a couple days" to "figure out the last details" before I could get going with implementation.

Well turns out the details are really difficult and if I'm really honest with myself, it starts looking like I only figured out the details, but not the mostly everything.

I am humbled and reminded of this:

So in my slight feeling of discomfort I start looking into recent urban microsimulation research if maybe some people tried to do the same - turns out that, yes, others had exactly this idea.

But they were much more specialized in their applications of it, or, when they tried to show its suitability as a tool for modeling a whole economy (like me), they have still been much more humble in their goals for that (for example "food" being the only consumable resource in a very simple world).

Still, I conclude from reading these papers that my general approach is exactly the ideal theoretical way to go about it, that my "difficult parts" are indeed difficult. Others have just been much more careful in approaching them then me in my naïvety.

What is difficult?

I'll try to keep it short: I want to use activities not just to model what people do and what's going on at each moment in the simulation, but also use imagined 'what-if' activities to inform all kinds of high-level decisions, such as:

  • "Is this higher-quality, but further-away school worth commuting to?"
  • "Will my way to work be shorter if I lived here instead?"
  • "Can I produce pretzels at a competetive price and at high enough volumes to make a profit in this place?"

The first example is pretty simple, since it just affects one person which is evalutating one place, but even there, a large number of activities that this person can do at this school have to be evaluated according to different dimensions.

The second one is even worse, since moving will affect a whole household and now you suddenly might have to trade off the shorter way to work with a longer way to kindergarten, noisier roads and less places for social life, affecting multiple household members, for each all kinds of places of interest, each again offering several potential activities to be judged according to several metrics.

The third example is the worst in that the future pretzel-baker has to incorporate the shopping behaviour of all of his potential customers. Who are they even?

When I lay it out like this, the problem seems to be pretty obvious: a horrible combinatorial explosion of imagined activities to be evaluated, for decisions of just a single person or household.

Maybe slightly less clear is the underlying source of the problem (and this is my biggest insight so far, thanks to my research literature): I'm making a mistake by trying to model perfect knowledge and rational, motivated and flexible people.

The hope: more human humans

In reality, people are not always aware of all the choices they have, they might just have heard about a couple other options and only if the best option they know about is much better than what they currently have, they are motivated enough to change something.

Even then, they never fully evaluate each option, but use lots of thinking shortcuts and approximations to make quick judgements.

Even the business owner has to mix exact calculations with gut feeling when evaluating something as unpredictable as a market or as undefinable as a neighborhood.

By trying to model such imprecise decision-processes, I should not only get much more human behaviour in the simulation, but benefit computationally by doing orders of magnitude less comparison work.


So my new most difficult part is thus to somehow write down all of this handwavy gut-feeling intuition as concrete, programmable rules that are not just stupider, but actually make efficient use of being stupid...

The bright future

If I do manage to pull all of that off, I not only have exactly what I wanted (a cool-to watch, detailed, complex and realistic economy), but I also implemented as a proof-of-concept what current research papers only seem to carefully hint at! That would be cool.

What does this mean for our short-term plans? Well, obviously the February-feature-month will be extended, since it was only a concept-month so far, and I will keep you up to date with my progress on untangling this challenge!

Discussion on Reddit

Support Citybound on:

What I did (Feb. 22 '17)

I'm now living for one month in one of the most beautiful cities I know (and that's very tough with St. Petersburg in the race), can you guess which?

Otherwise, I'm still gnawing on some tough problems with the economy design, but my strategy for solving them becomes more and more clear.

  • I wrote down the rural-town scenario which we implicitly converged on in our discussions, as a minimal, but all-edge-case-covering proof of concept for the economy prototype.

  • I decided to not continue to blindly try to invent all the abstract algorithms around economy without any examples

  • So I started writing down everything that I need in the rural-town scenario, starting with resource types today, and continuing tomorrow with activities and household types

  • I also decided to put all of this kind of data into simple text files that are loaded by the game, instead of directly into the code

  • This should make it possible in the ideal case to add new resource types, business types, new activities and even whole new professions including their interactions without having to compile any code! This will hopefully be the first example of really straightforward and easily discoverable moddability!

Discussion on Reddit

Support Citybound on:

What I thought about (Feb. 17 '17)

I'm still a bit in isolation/meditation mode because I would really like to get my attempt at implementing economy as right as possible from the beginning.

I am starting to have the full picture and there are only a couple open questions left that I'm gnawing at, mostly concerning the mechanisms of scheduling people's days, interaction of schedules between family members and how to do long term planning (rescheduling) in a performant way.

Thank's for bearing with me - next week I'll already be in another city and country and I hope to update you again then with something more concrete!

Discussion on Reddit

Support Citybound on:

What I thought about (Feb. 13 & 14 '17)

Pretty chaotic couple of days, but I had time to think through all the economy goals we came up with in the planning livestream, to review all the great discussion around that and to start sketching some solutions.

Here's a rough first gist:

  • Central concepts:
    • Resources
      • raw materials (wood, grain, milk, iron, ...)
      • processed materials (food, gasoline, paper, ...)
      • processed items (TV, car, printer, machine, ...)
      • money
      • intangible/needs (hunger, health, social life, leisure, education)
      • can be subcategories of each other
    • Activities
      • are conversion recipies / "chemical reactions"
      • have specific resource consumption rates on one side of the reaction, and specific resource production rates on the other side
      • can have "catalysts" that make the reaction faster, or can even be stirctly required to do an activity
      • e.g. "Eating" 0.5 food => -1.0 hunger + 0.1 garbage
      • e.g. "Milking Cow Manually" nothing => 1.0 milk + 0.3 hunger; requires: 1.0 cow
      • e.g. "Milking Cow with Machine" nothing => 5.0 milk + 0.3 hunger; requires: 1.0 cow + 1.0 milking machine
      • e.g. "Walking through park" nothing => 0.2 hunger + 1.0 leisure + 2.0 environment
    • People
      • have private resources & needs
      • travel to participate in activities
    • Households
      • e.g. family or business
      • have shared resources, needs & items
      • offer activities based on available resources
      • do short-term planning for emergencies (always) & spontaneous nice-to-haves (if free time is available)
      • do long-term planning: try to achieve some kind of preferred resource rate equilibrium through scheduling recurring routine tasks (work, buy groceries, ...)
    • Buildings
      • house households

I will try to work this out in more detail over the next couple days, probably already capturing some of that in code, which can then be discussed by everyone interested!

Discussion on Reddit

Support Citybound on:

January '17 Review & February Plans

Text Summary:


  • earning as of now $466 per month
  • got my first payment, real money from real people for doing something I love!!
  • obviously not enough to survive yet
  • but looks feasible to reach that soon if more people become Patrons!
    • small and big contributions: not only support but imply trust!

The Roads & Traffic Prototype

Well, it's just roads...

  • Really liked your reactions
  • Amazing to see what people already managed to build
  • BSOleader’s hilarious & just slightly tipsy first release review captures really well how experimental this release is and actually contains a couple implicit bug reports
  • People reported bugs really diligently, with helpful screenshots or even videos/GIFs
  • Made it possible to address some of the most annoying bugs in the 0.1.1 and 0.1.2 releases
  • If you had problems with the first release, I encourage you to check those out

Open Source

  • Scary decision, but blew my mind how much it already paid off in just January
  • Contributions both on
    • very concrete things like better camera controls (kingoflolz & Herbstein)
    • background architectural things like switching to the newest version of Rust and cleaning up rendering code (kingoflolz & martinrlilja)
    • getting a head-start on long-term strategical issues like: modding
      • based on some very active discussions in our new developer chat
      • martinrlilja took the initiative and started prototyping a mod architecture and programming its parts
  • Contributions prove that people already understand my code and are able to provide helpful work, which I didn't expect at this early stage at all

Working in Phases

  • I decided to work in two alternating phases:
    • one month new features
    • one month fixing, cleanup & improvements
  • Decided to use January as the first “cleanup” month
    • highly simplified the inner simulation core, it ended up more robust, understandable & even faster!
    • heavily cleaned up the hacked-together mess of road-planning code
      • fixed a couple bugs in the process
      • made it much easier to fix further bugs and add new features
    • documented in detail a lot of “building-block” code of Citybound
    • setup automatic release building, allowing me to quickly and frequently create new releases from the newest code for all three platforms
      • will hopefully give you fast access to bugfixes and the latest features
      • giving us quick development iteration & a quite large group of testers!

Feature Phase February

  • Will be about getting rudimentary economy and agents beyond cars going
  • Dubbed it the “Homes & Businesses Prototype”
  • Not much more than a Milestone
  • Actually want to do the initial planning for this Milestone with you
  • One of the next days I’ll do a planning livestream!
    • I actually want to try out YouTube Livestreaming for that
      • even though it has a slightly higher chat-to-stream delay
      • All existing subscribers get notified
      • quality options for everyone
      • automatically ends up as a video on YouTube for watching it later
    • I will announce the livestream on YouTube, Reddit, Email and Twitter

Thank you for the wild ride and let me know what you think!

Discussion on Reddit · on Something Awful

Support Citybound on:

Release: Citybound 0.1.1 & 0.1.2

a.k.a. Road and Traffic Prototype 1.1 1.2
a.k.a. the result of one month of clean-up work
a.k.a. the first release made with automatic build tools, coincidentally on the day the build tools suffered a major outage

What Changed

After the hotfix/version 0.1.2:

Try it!

Instructions and downloads (NEW: v0.1.2)

What else happened & what's next

  • Maybe even more than what you can see in the release today happened behind the scenes in January!
  • I want to announce how we're going to proceed with feature development in February.
  • I'm planning to create a video update about both tomorrow very soon, stay tuned!

Discussion on Reddit

Support Citybound on: