Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 7

Author Topic: Uristonomics: Dynamic Item Value  (Read 15915 times)

Shazbot

  • Bay Watcher
    • View Profile
Uristonomics: Dynamic Item Value
« on: August 09, 2014, 06:14:33 pm »

The idea of dynamic item value has arisen in a number of threads of late. In order to develop a system of dynamic value, this thread has been established. To ensure a common basis for discussion (the lack of which caused much wasted effort in prior discussions) the following terms and assumptions will be defined.

1. The term "Dwarfbucks" is a separate and unique "metacurrency" used by the game engine to make economic calculations. While currently in-game currencies and objects are pinned in fixed dwarfbuck values, it is not to be assumed this will endure into a revised economic system.

2. It will be assumed unless proven otherwise that computing power is sufficient to model the economic actions of every individual "dwarf" in "Dwarf Mode" and every trading partner in "Adventure Mode", but that some optimization or abstraction will be required for world generation, time advancement, or other large groups.

3. Economic activity is assumed to be governed by classical economic principles and traditional profit-loss motivations, save such unique circumstances of irrationality or charity as also found in the human experience. That said, it is desirable that any finished system be sufficiently robust to allow exotic societies (ant-women. etc) to also be simulated while respecting their value systems.

4. To facilitate varying combinations of computing power and simulation scale, as well as player preference, an init-line option should allow a less resource-intensive mode which ideally would emulate the current, simplified economic and value system.

5. Additional features, such as dwarves directly trading at the depot or in market activity zones, may be discussed as they relate to  or are enabled by a dynamic item value system, but should be properly discussed only after we have concluded the foundation framework of a price system.

If there are no objections to these terms of debate, we may begin.
Logged

Scruiser

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #1 on: August 09, 2014, 10:31:30 pm »

If anyone is wondering why we are discussing detailed terms... look up "more challenging trading", and "Random Dwarf Economy Thought and Ideas".  Basically, discussions have gotten derailed trying to both present basic economic concepts and prove there validity to individuals that completely refuse to acknowledge any of economics.  Even worse was the refusal or misinterpretation of basic economic terminology ("supply", "demand", "unlimited demand", "economic surplus", etc.) 

1. The term "Dwarfbucks" is a separate and unique "metacurrency" used by the game engine to make economic calculations. While currently in-game currencies and objects are pinned in fixed dwarfbuck values, it is not to be assumed this will endure into a revised economic system.
Agreed,
Yeah I really hated the one or two pedantic responses to the usage of the terminology DF bucks or urists.  I think these terms best describe the generic way that the game calculates value.  Right now that value directly determines what things or worth in trades or for room valuation, but that will almost certainly change with any kind of decent economy rewrite.  I might also use these terms to talk about the way individuals and entities assign value to things, prior to actually choosing the price they buy or sell them at.

2. It will be assumed unless proven otherwise that computing power is sufficient to model the economic actions of every individual "dwarf" in "Dwarf Mode" and every trading partner in "Adventure Mode", but that some optimization or abstraction will be required for world generation, time advancement, or other large groups.
Agreed,
Given world gen can have populations in the thousands, while fortress mode has populations in the hundreds, this seems like a reasonable rule of thumb guess for talking about implementation methods.

3. Economic activity is assumed to be governed by classical economic principles and traditional profit-loss motivations, save such unique circumstances of irrationality or charity as also found in the human experience. That said, it is desirable that any finished system be sufficiently robust to allow exotic societies (ant-women. etc) to also be simulated while respecting their value systems.
Strongly agreed,
I think classical economics is definitely the place to start any discussion, and the model to compare our final system with.  That said, there are cases that it should be able to handle that will break classical economic discussions (hive minded creatures, for example, individually do not have "unlimited wants and needs" and thus scarcity would only apply on the hive level, and not the individual level)

4. To facilitate varying combinations of computing power and simulation scale, as well as player preference, an init-line option should allow a less resource-intensive mode which ideally would emulate the current, simplified economic and value system.
Not fully agreed
Since economics will likely be fully integrated into multiple aspects and levels of the game, it might take modding to the entity and creatures RAWs to simplify it.  That said, I think discussing init and raw setups are important,

5. Additional features, such as dwarves directly trading at the depot or in market activity zones, may be discussed as they relate to  or are enabled by a dynamic item value system, but should be properly discussed only after we have concluded the foundation framework of a price system.
Agreed
I might start a new thread with some short term ideas that directly tie into economics, but don't result in a dynamic pricing system.

Again, if anyone is wondering why we want to set these terms in such details, see all the wasted wall-of-texts in some other recent threads.

I need to think for a day or two about how to best formulate and present some of the ideas I have been working on.
Logged
Things I have never done in Dwarf Fortress;

- Won.

Adrian

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #2 on: August 10, 2014, 04:56:25 am »

Any form of dynamic value should come primarily from an individual's tastes.

Using the hardcoded item value as a base it should be raised or lowered %-ually depending on how a individual thinks of a material, an item and any decorations.
ie. If Bomrek detests gabbro and brown recluses he wouldn't want to pay much for a gabbro statue of a brown recluse. Conversely, he'd want to sell it for a low a price as possible to get rid of it.

By adding a subjective perception of value, a working economy will be one step closer and the appraisal skill (The objective determination of value by ignoring personal preferences) will actually be worth a damn.
Logged

Scruiser

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #3 on: August 11, 2014, 10:41:29 am »

Any form of dynamic value should come primarily from an individual's tastes.

Using the hardcoded item value as a base it should be raised or lowered %-ually depending on how a individual thinks of a material, an item and any decorations.
ie. If Bomrek detests gabbro and brown recluses he wouldn't want to pay much for a gabbro statue of a brown recluse. Conversely, he'd want to sell it for a low a price as possible to get rid of it.

I think adding modifier for individuals is a key step in calculating actual prices that a good will be bought or sold for in fortress mode by individual dwarfs, but it isn't necessary for world economy and world-gen prices.

Shazbot, do you want to focus this discussion on world economy (off map sites and caravan trading) prices, or fortress mode prices, or both?  These pricing system do need to interface together with traveler from off map, migrant initial wealth, and individuals trading with caravans, but I think they can and should be separate systems.
Logged
Things I have never done in Dwarf Fortress;

- Won.

Adrian

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #4 on: August 11, 2014, 11:14:32 am »

I think adding modifier for individuals is a key step in calculating actual prices that a good will be bought or sold for in fortress mode by individual dwarfs, but it isn't necessary for world economy and world-gen prices.
Agreed. For world level economics it's logical to assume civs have competent appraisers to do the bartering.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #5 on: August 11, 2014, 12:04:30 pm »

1. The term "Dwarfbucks" is a separate and unique "metacurrency" used by the game engine to make economic calculations. While currently in-game currencies and objects are pinned in fixed dwarfbuck values, it is not to be assumed this will endure into a revised economic system.
Agreed,
Yeah I really hated the one or two pedantic responses to the usage of the terminology DF bucks or urists.  I think these terms best describe the generic way that the game calculates value.  Right now that value directly determines what things or worth in trades or for room valuation, but that will almost certainly change with any kind of decent economy rewrite.  I might also use these terms to talk about the way individuals and entities assign value to things, prior to actually choosing the price they buy or sell them at.
I haven't slogged through the other threads, so please let me know if I'm re-treading old arguments that have already been settled, but there are three different concepts involved.

1. The first concept is how much utility the individual gets from having/using/consuming/experiencing something.  Utility is measured in utils, which are not necessarily comparable across different people.  If A brings more utils than B, the person would be willing to trade away B to get A.  It is helpful, but not essential, that different people get different utility from the same things (personal preferences).  When dealing with anything more complicated than a simple barter economy, it'd be useful to assert von Neumann-Morgenstern utility.  The completeness and transitivity axioms prevent people from running in circles trying to buy back things they traded away, but it comes at the cost of making it a bit difficult to model a preference for variety.

2. The second concept is the price that a good/service would command in a relatively frictionless economy.  This depends on the thing's utility and its scarcity.  If utility is fairly consistent across people, the price should be relatively stable unless there is a large shock to supply.  If the utility varied wildly, the price will plummet once the few die-hard fans are satiated.  The value of Appraisal skill is determining the price of something independent of the appraiser's personal utility for it.

3. The third concept is the price of currency.  In principle, coins get traded just like any other good.  The liquidity effects of currency come from the fact that (almost) any trader will have use for currency whereas he/she might not have use for the goods and services you have for sale.  The relative prices of coins in a civilization are set by law (e.g., 1 gold coin = 10 silver coins), but the amount of goods that can be purchased with those coins is determined by the market.  Scarce coins make for weird outcomes, not the least of which is the entire coin collecting hobby.

A big challenge will be displaying prices to the player.  We could use dwarfbucks as the standard unit of price, but then we'd get confusing outcomes like "1 silver coin costs 4.705¤".  That might work out just fine, listing coins at the top of trade good lists for both sides.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Scruiser

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #6 on: August 11, 2014, 12:30:38 pm »

I haven't slogged through the other threads, so please let me know if I'm re-treading old arguments that have already been settled, but there are three different concepts involved.

1. The first concept is how much utility the individual gets from having/using/consuming/experiencing something. 
-snip-

2. The second concept is the price that a good/service would command in a relatively frictionless economy. 
-snip-

3. The third concept is the price of currency
-snip-
   The main issue in particular was that GoblinCookie basically disagreed with all of classical economics, refused to use economic terminology in the standard way, refused to recognize others usage of standard economic terminology and concepts and was willing to write massive wall-of-text posts to go into detail about his disagreement.  There was also the issue thgntlmnfrmtrlfmdr insisting that economics had to be the emergent outcome of extremely low-level simulation of more basic mechanics, without any high level mechanics to force things to act properly.  While a nice idea, this would be hard to pull of in practice.  Then there was numerous single posts of people that had one idea they thought would handle everything or get the most important economic stuff, without explaining how this would interact with the rest of the economy or why their idea would work.  And then they would post nothing else...
   So pretty much just by acknowledging proper economic terminology and attempting to structure your ideas into something practical, you are already above the standard of the other threads.

  So anyway, actually addressing your ideas, are you suggesting that entities and individual should be given somekind of utility function which controls there actions and trading, which in turn leads to prices, mediated by currency?  Or are you just laying down basic economic/game theory terminology?  Basic economics is both a good starting point, and a good end goal to measure the final economic system with, but in itself is not sufficient to describe how Toady should practically go about implementing it.
   Also since Shazbot requested we focus on dynamic pricing (to avoid the cluttering like in other threads), we should focus on how utilities lead to the price of goods, as opposed to the utility functions themselves.
Logged
Things I have never done in Dwarf Fortress;

- Won.

Deboche

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #7 on: August 11, 2014, 12:34:03 pm »

A big challenge will be displaying prices to the player.  We could use dwarfbucks as the standard unit of price, but then we'd get confusing outcomes like "1 silver coin costs 4.705¤".  That might work out just fine, listing coins at the top of trade good lists for both sides.
If the value of each coin is agreed upon by all races and kingdoms, it won't be necessary to display that info anywhere, just how much total cash you have. The only situation where it might be useful is if different merchants value different coins differently.

But in the end, will it be worth it to mint coins at all? What would be the purpose? You could much more easily sell your stuff for coins and use those and keep all your metal for fortress embelishment and what not.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #8 on: August 11, 2014, 01:13:06 pm »

I haven't slogged through the other threads, so please let me know if I'm re-treading old arguments that have already been settled, but there are three different concepts involved.

1. The first concept is how much utility the individual gets from having/using/consuming/experiencing something. 
-snip-

2. The second concept is the price that a good/service would command in a relatively frictionless economy. 
-snip-

3. The third concept is the price of currency
-snip-
   The main issue in particular was that GoblinCookie basically disagreed with all of classical economics, refused to use economic terminology in the standard way, refused to recognize others usage of standard economic terminology and concepts and was willing to write massive wall-of-text posts to go into detail about his disagreement.  There was also the issue thgntlmnfrmtrlfmdr insisting that economics had to be the emergent outcome of extremely low-level simulation of more basic mechanics, without any high level mechanics to force things to act properly.  While a nice idea, this would be hard to pull of in practice.  Then there was numerous single posts of people that had one idea they thought would handle everything or get the most important economic stuff, without explaining how this would interact with the rest of the economy or why their idea would work.  And then they would post nothing else...
   So pretty much just by acknowledging proper economic terminology and attempting to structure your ideas into something practical, you are already above the standard of the other threads.

Thanks, you just saved me a lot of reading :)

  So anyway, actually addressing your ideas, are you suggesting that entities and individual should be given somekind of utility function which controls there actions and trading, which in turn leads to prices, mediated by currency?  Or are you just laying down basic economic/game theory terminology?  Basic economics is both a good starting point, and a good end goal to measure the final economic system with, but in itself is not sufficient to describe how Toady should practically go about implementing it.
   Also since Shazbot requested we focus on dynamic pricing (to avoid the cluttering like in other threads), we should focus on how utilities lead to the price of goods, as opposed to the utility functions themselves.

My intent was to clarify notation, but I do believe that some kind of utility function is necessary to ground the rest of the system.  If I understood you correctly, this gets at most of thgntlmnfrmtrlfmdr's point.  The overseer doesn't meddle in trading any more than he/she already meddles with, say, labors and designations.  At present, a fortress operates as a commonwealth and there is historical precedent for such a thing in colonies, but it ought to transition itself over to a market economy in a relatively smooth manner after basic needs are met.  The only way to accomplish that (without some clunky "mode change") is to have individual preferences under the hood.

The utility function itself should be an extension of the Happiness score.  Many of the factors in Happiness are experiences that fit nicely within a utility framework ("talked with a friend recently"), and there's no reason why site-level or fort-level outcomes can't factor in ("proud to work in a wealthy fort").  Right now, Happiness is additively separable and gives oddball results sometimes (because a really nice dining room should not overcome the grief of losing several friends).  Cobb-Douglas or Constant-Elasticity-of-Substitution utility functions might drive more reasonable behavior.  Personally, I'd go with CES.

Whatever the utility function is, its parameters can be set in the entity raws, and then tweaked by personal preferences.  This could happen indirectly through VALUE tokens, set by hand with a crap-ton of parameter flags, or preferably seeded from VALUEs with overrides available to the modder.  Very dutiful Dwarves and Antmen would put more emphasis on site wealth whereas Humans or Goblins wouldn't mind being the only rich person in a very poor area.

Ideally, the game engine would aggregate all of the personal preferences to calculate prices.  Fudging this from distributions of preferences would be a very serviceable compromise, though I'd like to see some kind of influence from leaders (import mandates, if you will).  "I know, microcline is basically worthless, but for some reason the Duke of Quietboom loves figurines made of the stuff.  I'll take as many as you can make."
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Scruiser

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #9 on: August 11, 2014, 02:56:56 pm »

Whatever the utility function is, its parameters can be set in the entity raws, and then tweaked by personal preferences.  This could happen indirectly through VALUE tokens, set by hand with a crap-ton of parameter flags, or preferably seeded from VALUEs with overrides available to the modder.  Very dutiful Dwarves and Antmen would put more emphasis on site wealth whereas Humans or Goblins wouldn't mind being the only rich person in a very poor area.

Ideally, the game engine would aggregate all of the personal preferences to calculate prices.  Fudging this from distributions of preferences would be a very serviceable compromise, though I'd like to see some kind of influence from leaders (import mandates, if you will).  "I know, microcline is basically worthless, but for some reason the Duke of Quietboom loves figurines made of the stuff.  I'll take as many as you can make."
I think one of Shazbot's suggested starting points, which I agree with, is that for site-to-site world and world-gen economy, it will be a necessity to abstract out individual in some way.  With world-gen populations in the thousands and world-gen running for hundreds of years, it probably won't be practical (from a computing power standpoint) to run every single individual with an independent utility function making decisions that collectively result in an economy.


   Anyway, I'm starting to get off topic.  I think as placeholders for world economy mechanics, Toady could try hard-coding supply and demand curves for certain good, with modifiers for certain conditions (demand for weapons goes up in war, supply of food goes down in famine, etc.), and then later make the curves modifiable by RAWs, and then finally make the curves derived from utility functions (basically going top-down in detail).  For in fort pricing (for when economics gets turned on in fort mode), probably the opposite order of development.  Start with letting individual personalities drive prices, and then add in more and more connection to the overall world economy.
   This approach would result in reasonable dynamic pricing in the short term and would allows Toady room to expand and add detail to the system as reasonable.
Logged
Things I have never done in Dwarf Fortress;

- Won.

GavJ

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #10 on: August 11, 2014, 03:18:23 pm »

Okay this is better than I was expecting for a new thread - you might want to make the "economics" title clearer. Dynamic value sounds more like just a simplistic browser game/MMO economy type thing.

By the way, Nobody should bother to read the other thread. I found it personally useful for sharpening my understanding of some stuff I was rusty on to have a foil, but it really wouldn't be as helpful to others. I'll use it for personal notes and pull out good stuff if relevant here.

---------------------------------

Anyway, comments so far on this page

Currency: I think currency should be ignored at first at least, or if anything, just treated as something dwarves keep a tiny stock of on hand in order to fill in small trade differences.
1) Currency in the 14th century isn't fiat currency anyway, it would all be just the raw value of the metal, and would realistically be treated just like a commodity regardless.
2) You need a system able to handle bartering anyway, because lots of times you wouldn't have coins on hand even if you wanted to, so non-coin needs to be a feature anyway.
Conclusion) might as well start with bartering first, without thinking of anything as special "currency"

Scale: We should probably be focusing on "macro" (in DF terms) economics mostly, not within-fort stuff like rent and individual preferences and stuff. And we should be focusing on NPC trading. NPCs trading with NPCs on a large fort-fort scale is going to be the huge majority of trading in any world and the major determinant of markets. It also puts the most constraints on algorithms and rules. Once we figure out how to simulate a bunch of NPCs all trading with one another, slotting in a human fort should be easy -- the market will already be there, and it's mainly just removing some of the automation and putting it in the player's hands.

------------------------------

Also, some of the most challenging decisions I ran into from the last thread, summarized briefly:

1) How to integrate special things like survival needs versus economic profit trades? You can't just act like a disembodied profit machine at all times, because a long term investment is not a good investment if you starve to death before you see the payout. So food seems like it needs to be treated a bit differently (and medicine and sometimes weapons) This is considered in classic economics, but is a bit beyond my expertise as to exactly how.

2) Caravan pathing. The simplest way to think about it is to just send out a caravan to one trade partner and have it come back. But in real life this would be silly. You'd want to have it visit other intermediate stops along the way, and have "trade corridors" and things. But doing so massively increases the complexity and headache of figuring out how to code it.

3) Order of trade, even within just the "for profit" goods. Trickier than you might think. Let's say, for example, that you have the following possible trades, between party A and B:
A's surplus   B's surplus
50              70
40              60
50              10
40              40

Do you go in order of the highest sum of surpluses each time? If so, you're sort of unfairly favoring B here, because all the trades that have highest totals happen to favor B.
Alternatively, do you try to keep the surpluses roughly equal between both parties as you go? So you might start with 50/70 as the highest total, but then 50/10 to compensate. But if so, that's overall inefficient for the whole market.

There's not a clear answer I can tell.

-----------------------------------

And finally, a google docs rough outline of the whole process as far as I had it worked out so far, without too much algorithmic detail. Should be open for comments if this is a helpful format:

https://docs.google.com/document/d/1d3aLcs1g_zRbn9cXVAqsmLKkrpsyR4oNOg5DHLwLzJM/edit?usp=sharing
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #11 on: August 11, 2014, 10:11:44 pm »

Currency: I think currency should be ignored at first at least, or if anything, just treated as something dwarves keep a tiny stock of on hand in order to fill in small trade differences.
1) Currency in the 14th century isn't fiat currency anyway, it would all be just the raw value of the metal, and would realistically be treated just like a commodity regardless.
2) You need a system able to handle bartering anyway, because lots of times you wouldn't have coins on hand even if you wanted to, so non-coin needs to be a feature anyway.
Conclusion) might as well start with bartering first, without thinking of anything as special "currency"

IIRC, currently the game treats coins as teensie weensie bars of metal for value purposes.  There is no quality score, but they are stamped with a site and date.  So if there is only one type of coin, they don't need any special handling.  If two materials' values get too out-of-sync with their statutory exchange rate (e.g., gold gets to be much more than 10x the value of silver) then coins will drift away from their legal values.  The game won't care, but it might confuse a player.  Real-world governments respond to this by debasing the coin metal and giving it a fiat value in excess of its material value... not really an option for the 14th century (unless you're China with paper money).

Scale: We should probably be focusing on "macro" (in DF terms) economics mostly, not within-fort stuff like rent and individual preferences and stuff. And we should be focusing on NPC trading. NPCs trading with NPCs on a large fort-fort scale is going to be the huge majority of trading in any world and the major determinant of markets. It also puts the most constraints on algorithms and rules. Once we figure out how to simulate a bunch of NPCs all trading with one another, slotting in a human fort should be easy -- the market will already be there, and it's mainly just removing some of the automation and putting it in the player's hands.

I agree that most of this should be fitting supply curves and demand curves for off-screen trading.  That provides a "large market" which can survive having a small site completely mis-managed by a player.  A prosperous fort could affect the world economy, however, much like the Spanish colonies destabilized their trading partners in Europe.

Also, some of the most challenging decisions I ran into from the last thread, summarized briefly:

1) How to integrate special things like survival needs versus economic profit trades? You can't just act like a disembodied profit machine at all times, because a long term investment is not a good investment if you starve to death before you see the payout. So food seems like it needs to be treated a bit differently (and medicine and sometimes weapons) This is considered in classic economics, but is a bit beyond my expertise as to exactly how.

This is relatively easy if everyone is myopic (only cares about food when hungry, etc.).  Hunger or thirst gives a big dis-utility, which effectively increases the utility of (and intend to acquire) food/booze/water.

When actors are forward-looking, it gets murkier.  They anticipate future states and apply discount factors, using the same math as calculating net present value.  So the Dwarf knows he has an infinite flow of hunger pangs ahead of him, spaced more of less evenly in time.  The first one is discounted a bit because it's not here yet, the second one is discounted more, the third even more, etc.  Having the food on-hand to counter those hunger pangs gets more valuable as they approach, but he won't spend a fortune today to alleviate anticipated hunger pangs years from now because the NPV would be negative.

This can handle people even in desperate situations, assuming death has a ginormous dis-utility and people make reasonable predictions about lifespan.  A Dwarf on his deathbed will be willing to trade off all of his long-term assets for short-term utility.  That utility might come from knowing he's securing his family's future by giving them his stuff.  A selfish bastard would trade all his hoarded crap for a bucket list of experiences.  The hard part is getting the utility function correct.

2) Caravan pathing. The simplest way to think about it is to just send out a caravan to one trade partner and have it come back. But in real life this would be silly. You'd want to have it visit other intermediate stops along the way, and have "trade corridors" and things. But doing so massively increases the complexity and headache of figuring out how to code it.

I think point-to-point trade is a respectable start.

3) Order of trade, even within just the "for profit" goods. Trickier than you might think. Let's say, for example, that you have the following possible trades, between party A and B:
A's surplus   B's surplus
50              70
40              60
50              10
40              40

Do you go in order of the highest sum of surpluses each time? If so, you're sort of unfairly favoring B here, because all the trades that have highest totals happen to favor B.
Alternatively, do you try to keep the surpluses roughly equal between both parties as you go? So you might start with 50/70 as the highest total, but then 50/10 to compensate. But if so, that's overall inefficient for the whole market.

There's not a clear answer I can tell.

The principle you're looking for is Pareto efficiency.  Trade 1 is better than 3, and trade 2 is better than 4, because in each case B can be made better off without making A worse off.  Between trades 1 and 2, both parties favor 1.  If that tends to favor B, too bad the world isn't fair.  (This is assuming you can only make one trade.  If all four are possible, all four would happen because each one leaves both parties better off than not trading.)

Things get more interesting if some trades favor A and others favor B.  Again assuming you can't make multiple trades, it gets into bargaining power.  This would never happen at the level of a single trade (weight limits notwithstanding, caravans can trade everything they have), but it could affect trade routes.  Yes, the Human civ would be better off if it had nice steel weapons but you are better off if you sell it to the Dwarven civ which has important minerals to trade.  A player might spread things around a bit, but an NPC would likely get into a rut until the trading partner was satiated.

Edit: typo
« Last Edit: August 12, 2014, 09:02:17 am by Dirst »
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Scruiser

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #12 on: August 11, 2014, 10:24:11 pm »

Currency: I think currency should be ignored at first at least, or if anything, just treated as something dwarves keep a tiny stock of on hand in order to fill in small trade differences.
1) Currency in the 14th century isn't fiat currency anyway, it would all be just the raw value of the metal, and would realistically be treated just like a commodity regardless.
2) You need a system able to handle bartering anyway, because lots of times you wouldn't have coins on hand even if you wanted to, so non-coin needs to be a feature anyway.
Conclusion) might as well start with bartering first, without thinking of anything as special "currency"

IIRC, currently the game treats coins as teensie weensie bars of metal for value purposes.  There is no quality score, but they are stamped with a site and date.  So if there is only one type of coin, they don't need any special handling.  If two materials' values get too out-of-sync with their statutory exchange rate (e.g., gold gets to be much more than 10x the value of silver) then coins will drift away from their legal values.  The game won't care, but it might confuse a player.  Real-world governments respond to this by debasing the coin metal and giving it a fiat value in excess of its material value... not really an option for the 14th century (unless you're China with paper money).
Actually currency debasement happened in ancient times also... a few wikipedia links if you are curious: 
http://en.wikipedia.org/wiki/Japanese_currency#Currency_reform_.28760.29
http://en.wikipedia.org/wiki/Roman_currency#Debasement_of_the_currency
To model this in game, a mechanic for procedural generating alloys is needed or a mechanic for associating alloys with pure metals (i.e. debased gold which would be mostly gold with random metals).  If the civilization has the power structure to limit who can produce currency, those with that authority can produce debased currency to inflate the supply have coins at there own benefit.  In game, this might be modeled as a civ or entity with currency producing authority deciding to start making debased coinage.  The value would temporally float at the value of the original coin, and eventually drag the value down.

Thanks for the link on Pareto efficiency.  Its this kind of stuff why I wanted a economics and math heavy thread where everyone could assume that everyone else at least agreed on the basics of economics.
Logged
Things I have never done in Dwarf Fortress;

- Won.

Aquillion

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #13 on: August 11, 2014, 10:49:20 pm »

1) Currency in the 14th century isn't fiat currency anyway, it would all be just the raw value of the metal, and would realistically be treated just like a commodity regardless.
It varies from culture to culture.  China was using it in the 11th century.

(Although I think dwarves would be more likely to use Rai stones, which were also in use before the 14th century.)

In any case, measuring value quickly becomes complicated (outside of supply-and-demand, which is obvious but not enough on its own.)  There are a number of categories it would probably want to consider, weighted by things like cultural values:

Military use
Military equipment you can use has this value; stuff you can't (armor in the wrong sizes, weapons your culture doesn't train with, etc) would normally have reduced value here, although they might still have ascetic or cultural value, or be useful if the civilization has a 'niche' use for them (eg. they might not use a weapon for their normal troops, but a few could still be valuable for special forces or somesuch.)  Material and quality also matter a great deal.  The AI needs a way of determining which equipment is 'best' anyway, for all sorts of other things.

Food value
Most food has to be preserved enough to transport to wherever you intend to sell it, although merchants might want to buy enough to feed themselves for the journey.  Really, this could be divided into "rare spices and exotics" (below) and "raw grain, etc to feed cities that don't produce enough on their own", which are very different values; what I'm referring to here is mostly "ability to keep people from starving to death."  To a certain extent, though, this is covered by supply and demand.

Exoticness
Things you can't produce yourself have a higher value.  This is part of supply and demand, but also recognizes the fact that eg. exotic foodstuffs or curiosities have a natural value to the upper class.  The higher-quality dwarfwork might also be worth more to non-dwarves, since they don't seem to be able to produce craftsmanship of that quality themselves.

Aesthetic value
Aesthetic value gets even more complicated, because different people like different things.  I would categorize it according to spheres and concepts (minimal styles, realistic styles, abstract styles, cultural styles for specific cultures, etc), and have different people and civilizations tend to prefer certain ones, which may change in response to other events.  Obviously quality counts for a lot here.  Materials, instead of having set dwarfbux values, could have ascetic spheres attached, with some (eg. shininess, opulence, etc -- the ones that appear on silver and gold) being weighted to have cultures tend to value them more.  This is the hardest category, because supply and demand don't totally explain it (any high-quality work of art is unique, but people will value them differently, and the reasons aren't easy to explain.)

Symbolic value
Items with histories might have this, especially if the history is relevant to the people considering it.  Additionally, artistic works might have symbolic value if their subject has symbolic value -- eg. elves might place more value on a work of art that shows a sacred tree or a great elvish victory, and less value on one of a great elvish defeat.  (Though it's hard to say -- a great elvish defeat would still be relevant to them and therefore might appeal to certain melancholy or thoughtful elves, whereas a battle totally unrelated to them might be valued lower.)


Another thing I would suggest:  Skilled brokers should be able to determine not just what your trade partners value or how much, but why they do.  If you have a really highly-skilled broker, it'd be cool if, for example, selecting food for trade would have a note displayed with a comment from your broker that the high prices they seem willing to pay for it indicate they're probably experiencing famine, etc.
« Last Edit: August 11, 2014, 10:56:58 pm by Aquillion »
Logged
We don't want another cheap fantasy universe, we want a cheap fantasy universe generator. --Toady One

GavJ

  • Bay Watcher
    • View Profile
Re: Uristonomics: Dynamic Item Value
« Reply #14 on: August 12, 2014, 02:50:01 am »

Quote
To model this in game, a mechanic for procedural generating alloys is needed or a mechanic for associating alloys with pure metals (i.e. debased gold which would be mostly gold with random metals).  If the civilization has the power structure to limit who can produce currency, those with that authority can produce debased currency to inflate the supply have coins at there own benefit.  In game, this might be modeled as a civ or entity with currency producing authority deciding to start making debased coinage.  The value would temporally float at the value of the original coin, and eventually drag the value down.
But why do we even want to model fiat currency, versus purely commodity currency? If the extent of coins is, as it was worded above "eensy weensie bars of metal," it should serve all practical dwarf fortress purposes and be easier to code and more intuitive for players.

@Aquillion
This is definitely of interest for value determining:

Basically, psychological concept that you don't give a crap about things like pretty pictures of your race's military victories, if you're starving to death or living in an open field frequented by bandits.

So in addition to having categories like you are suggesting, some of them should be "grayed out" or perhaps more reasonably, reduced in weight, for game creatures/settlements that are currently under immediate-need quota for basic stuff. So like, if your people are hungry in a settlement, you somewhat undervalue weapons, severely undervalue statues, compared to if you were feeling fed and secure at trade time.

Tangentially, random nitpick: food value here should be purely nutrient value as you wrote it up, since the deliciousness and fanciness of a meal is already covered by subsequent categories of value.

Also, it is important to note that some kinds of value stack together -- such as nutrients and delicious pleasure of food both count at once, or the military effectiveness of a sword and it's aesthetic beauty. But other things don't stack, like something's prestige or symbolic value + its nutrient value (i.e. literally can't have your cake and eat it too)

AND then we also have to consider how all these categories of value change marginally if we want to end up with demand curves for an economics algorithm. They probably all operate differently in this regard.

Good start, though!

Quote
The principle you're looking for is Pareto efficiency.
That's an okay rule to keep in mind in general in the thread, but 1) It often implies the need for logistical oversight that is gonna be nonexistent for DF settlements (organizing all the types of necessary side compensations, etc.), and 2) I don't think it really addresses what I was describing in particular there.

To rephrase: the problem is that you arrive with a bunch of stuff you hope to trade with this dude, but your info is a little out of date, etc. etc. it will often not be perfect. Most especially, when your caravan arrives with more value for the settltment than their goods have for the caravan's owners. So you have to sort your potential trades into a list and determine which one(s) do or don't make the cut.  I.e assume that ALL of those trades help each of you a little bit. But some more and some less for different parties. How do you sort which ones happen and which ones don't, for imperfect-upon-arrival caravans?
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.
Pages: [1] 2 3 ... 7