Bay 12 Games Forum

Please login or register.

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

Author Topic: Supply, and not Demand. Base for an economy.  (Read 2671 times)

thisisjimmy

  • Bay Watcher
    • View Profile
Re: Supply, and not Demand. Base for an economy.
« Reply #30 on: December 22, 2012, 10:15:54 pm »

@Phlum
It's great that you're thinking about these issues and offering your insights.  I certainly don't have any "hate" for anything here.  However, I think you are mistaken in how supply works.

See, you posted an algorithm that looks at the quantity supplied and determines the "base price".  However, the supply side of a supply/demand graph is supposed to be the opposite: it should show the quantity that industry will supply for any given price.  See http://en.wikipedia.org/wiki/Supply_and_demand#Supply_schedule.  (Confusingly, supply/demand graphs by convention put the independent variable on the y-axis.)

When the market price for a good is high, the industry producing that good will expand and produce more.  As the price drops, less of the good will be produced.

Look at the graph you provided in the above post.  It wouldn't make any sense if it was a graph of how supply affects price.  If that were the case the graph would be saying, "low supply causes low prices and high supply causes high prices".  Which of course is the opposite of reality.  The graph is actually indicating that low price causes low supply and high price causes high supply.

If you want to do the supply side, you need to make an algorithm that takes a price as input and determines the quantity supplied for that price.
Logged

Phlum

  • Bay Watcher
  • Above Is my true form, no mortal shall see it!
    • View Profile
    • Idontwanttowork
Re: Supply, and not Demand. Base for an economy.
« Reply #31 on: December 24, 2012, 03:35:33 pm »

base price as in, demand is differant bettween individuals, and differant people value differant things differantly.

unless you mean to say that demand is how much of a recource is used and lost, in which case you would be right. I never though of that,  im thinking of maths again.
Logged
So I have spoken, may this thread live long!!

I don't share my age online, no one takes horny 14 year olds seriously.

"dwarf fortress is autism in a game"  -a guy named rick

thisisjimmy

  • Bay Watcher
    • View Profile
Re: Supply, and not Demand. Base for an economy.
« Reply #32 on: December 24, 2012, 05:14:47 pm »

I'm not clear on what you mean by base price.  What I'm trying to say is that you should model how market price affects supply.  That's what the supply curve in the graph you provided represents.  It's not how supply affects price.
Logged

Tsumi

  • Bay Watcher
    • View Profile
Re: Supply, and not Demand. Base for an economy.
« Reply #33 on: May 30, 2013, 02:13:20 pm »

I know this is an old thread, but rather than post a new one, I'll toss my ideas around here.

One idea I had for getting a simple economy running, would shift prices depending on both how many of an item are in the fort, and how many are needed by the population. I'm sort of at a loss for how to explain it so here's the equation that slipped through my head applied in an instance of weapons.

EX1:
Your fortress has 6 well crafted aluminum spears, 20 total population (10 military, 10 civilians), 3 military dwarves with spear skill, 5 unarmed military dwarves, 8 unarmed civilians, and 4 others. The 3 speardwarfs have the highest need for the spears as it corresponds to the skill they prefer, the 5 unarmed military dwarfs also have a relatively high need for the spears no matter what their skill preferences are (at least they'd have a weapon), the 8 unarmed civilians don't really have much use for the spears, and the 4 others have no interest in them at all.

So I set the modifiers as follows along with their variables for the equation.
3 speardwarfs == A*2 
5 unarmed military == B*1.5
8 unarmed civilians == C*1.25
4 others == D*0.6
base value of item == E == 1440
Total population == F == 20


[A*(2 * E)] + [B*(1.5 * E)] + [C*(1.25 * E)] + [D*(0.6 * E)] == Y / F == Finished price

[3*(2 * 1440)] + [5*(1.5 * 1440)] + [8*(1.25 * 1440)] + [4*(0.6 * 1440)] == 37296 / 20 = 1864.8 price per unit

Of course the values would probably have to be tweaked around some in order to properly balance it for the entire trade system, but for starters it gets the job done. The price of the spears goes up because there is more need/want for them than there is supply.

ALSO!!!! >>>>>
I'm aware that this is not ACTUAL supply and demand, but it functions well enough (i think) to accomplish what needs to be done in this aspect.

This seems to work especially well with items dwarfs equip to their person (Weapons, armor, clothing, picks, axes). But I could also see this working with trade as well (caravans) by assigning values for how easy certain items are to get in certain civilizations.

For instance say your modifier values ranged from 1 - 5 (horrible values really, but for examples sake) each civilization could be ranked as to how easy (or hard) it is to produce certain items, the higher the value, the harder it is to get the item. So something that only elves produced would be marked 1, and every other civilization would be marked 5. using the equation above, this would set the price QUITE high for anyone other than elves.


ANYWAYS!! ENOUGH RAMBLING!!
tl;dr  all in all, this is basically a glorified (weighted) percentage equation, but it seems decently equipped from what I can tell, correct me if I'm wrong. I'd love to hear your thoughts!






Logged

Timeless Bob

  • Bay Watcher
    • View Profile
Re: Supply, and not Demand. Base for an economy.
« Reply #34 on: May 30, 2013, 02:55:56 pm »

I was reading through the history of a town last night (I'm doing historical stories and maps for the Museum community game), and in going through the histories, I kept on wondering why "XX became a farm worker" or "XX became a ranger", ect... was important enough to be included in the history of this entire city.  Then it came to me: each time someone became a new worker for that job set, the industry had expanded, and that meant that one of their trading partners or the city itself had increased the need for the products of that particular resource. 

After reading through this post this morning, I'm wondering if using the "randomly" assigned jobs in Legends wouldn't create an artificial spread of "need" for various trading partners during worldgen that could affect the trading prices with new fortresses within their spheres of influence? Add in the price for outfitting a caravan with wagons and gaurds, plus a -say 1%- price increase for every number of squares distant that the caravan would have to travel from a city or village to get to the fortress and back and goods prices would be set at highly diverse variables.  Add in a variable depending on how dangerous the terrains are the caravan has to travel through, using an A* algorithm to determine the "cheapest" route and actual trade routes would be generated as well.
Logged
L33tsp34k does to English what Picasso did to faces.

Dwarfopoly
The Luckiest Tourist EVER
Bloodlines of the Forii
Pages: 1 2 [3]