My code is trying to kill me

Project Economix 5

11.01.2015In Projects

Quick summary of the project structure so far:

  • there is a world that contains a list of resources and a list of human agents
  • resources are renewable sources of products (forest gives wood, quarry gives stone...) with defined capacity and regeneration speed
  • processes are activities that require input and produce outputs, input being a resource or product and output being another product (stone cutting require query and produce stone, axe making require wood and stone and produce stone axe...)
  • humans are agents that can decide to run a process once per tick (world is ticking)
  • humans have basic needs that must be satisfied regularly to keep living: they have to spend food to eat, wood to warm up and cloth to dress
  • humans can reproduce when they decide to
  • executing a process takes time, this is simulated with cooldown time during which human cannot do any action
  • when human decide to do nothing, it's considered rest and counts as increase in quality of life
  • whem human executes a process, it gains skill in this process, meaning it takes less time to do it (shorter cooldown time)

With this framework in place, I can create various implementations of human and test how they fare in the world. They differ in how they make decisions, do they just consume everything they find or do thy plan in long term, how they behave in abundance of resources and what they do when resources are scarce.