Announcement

Collapse
No announcement yet.

Economy Model Version 0.2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #91
    Basically this pattern will continue as long as people have more money to spend. When the amount of money they have left drops below 10 they will simple spend the rest of their money on the next good in the list (I will describe this in more detail tomorrow). If they have spent more money than they earn then the latest demand calculated will be removed, and a function will be made to make sure that people just spends their last money on that good. Again I will explain this in greater detail later.


    Korn:

    I agree with you that this should happen (well, actually I think supply should be a function of the price - which would then be a function of demand), but I think having it being done within each turn would create just more problems than it would solve. It would mean that a lot of variables were depending on each other, which could make it hell to design and program. Just changing supply between turns is much simpler and really not any less functional.

    But I don't really think I understand your function.

    So, to make an examble using it, if the demand is 500 and the price is 10 (which would mean equilibrium) then the next turn supply would be 500/(10^2+1)~5

    ????????

    It doesn't seem to be completely thought through. Or maybe I am misunderstanding something.

    I think a supply function could be made simply by basing it on the price of the good (or later on the profit per sold item of the good). This would mean that when demand exceeded supply the price would rise, which would cause supply to rise too.

    ------------------
    "It is only when we have lost everything
    that we are free to do anything."
    - Fight Club
    "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
    - Hans Christian Andersen

    GGS Website

    Comment


    • #92
      Add two techs to the tech tree which radically screw with the industrial powers...

      1) HMRF, or Hypermagnetic Molecular Rearrangement Fabrication- first developped in 2052, this technique allows the fabricator to manipulate mass ammounts of individual molecules to form any desired product with exactly the structural qualities indicated. Result: all goods produced by HMRF are grade A, an HMRF equipped factory product-to-resources ratio increases 2-4 times depending on the product, HMRF equipped reclycling centers increase to 100%-meaning 100% of refuse is turned into resources.

      2) SAF, or Sub-Atomic Fabrication- Finally completed in 2098, this technique involves the precise and direct manipulation of sub atomic particles to form the desired isotope of a given element. While sucessfully performed more than 40 years earlier, it wasn't until Dr. Jane Janeson figured out a way to do it in mass quantites sufficient for industrial use. Result: All raw materials cost exactly the same - nothing, quality index for all goods (even grade A goods) goes up, gold-based economy destroyed...

      Anyway just some thoughts about how implementation of technology might impact gameplay

      ------------------
      Peace and trust can win the day despite all your losing
      -Led Zepplin
      He's spreading funk throughout the nations
      And for you he will play
      Electronic Super-Soul vibrations
      He's come to save the day
      - Lenny Kravitz

      Comment


      • #93
        Add two techs to the tech tree which radically screw with the industrial powers...

        1) HMRF, or Hypermagnetic Molecular Rearrangement Fabrication- first developped in 2052, this technique allows the fabricator to manipulate mass ammounts of individual molecules to form any desired product with exactly the structural qualities indicated. Result: all goods produced by HMRF are grade A, an HMRF equipped factory product-to-resources ratio increases 2-4 times depending on the product, HMRF equipped reclycling centers increase to 100%-meaning 100% of refuse is turned into resources.

        2) SAF, or Sub-Atomic Fabrication- Finally completed in 2098, this technique involves the precise and direct manipulation of sub atomic particles to form the desired isotope of a given element. While sucessfully performed more than 40 years earlier, it wasn't until Dr. Jane Janeson figured out a way to do it in mass quantites sufficient for industrial use. Result: All raw materials cost exactly the same - nothing, quality index for all goods (even grade A goods) goes up, gold-based economy destroyed...

        Anyway just some thoughts about how implementation of technology might impact gameplay

        ------------------
        Peace and trust can win the day despite all your losing
        -Led Zepplin
        He's spreading funk throughout the nations
        And for you he will play
        Electronic Super-Soul vibrations
        He's come to save the day
        - Lenny Kravitz

        Comment


        • #94
          Ok, I have been doing some math on the demand, and I may, just may have found a working function.

          Mostly it is like it has always been. Demand is a function of the price:

          D(p)=M+Ep

          Where M is the max demand – the demand where price will be 0, E is elasticity (a constant for each good – it would actually be not a constant, but a constant multiplied by D’ (see below), since elasticity is a percentage of the demand of a good and not a constant), D is demand and p is price.

          But we don’t have M in our initial demand function. In stead we have D’ – the demand where p=10 - also called basic demand or initial demand. In the economy model demo design doc I have made a list of the D’ for the different goods at different income levels. Therefor D’ can be found in this list easily.

          Therefor we need to find a way to replace M with D’. It can be done this way:

          D’=M+10E =>
          M=D’-10E =>

          D(p)=D’-10E+Ep

          We also have a supply function S(p). This, unlike D(p) is constant at all prices when looking at a single turn. Therefore S(p) can be replaced with the constant S – a certain amount. And D(p)=S(p). Therefore:

          S=D’-10E+Ep =>
          Ep=S+10E-D’ =>
          p=(S+10E-B)/E=10+(S-D’)/E

          This is the function I will be using when calculating the price.

          Unfortunately this demand function opens for the possibility that when faced with extreme situation the price might end up being negative. A more advanced demand function could remove this problem, but since this would make the math needed much more complex and not at the simple level we have here, I in stead introduce a simple rule, that, although it’s not a perfect solution, avoids the most annoying problems with little extra needed detail: The rule is simply, that the price can never drop below 1 per item. This means that if the price via the price calculator is below 1 the price calculator would simply not be used, and be replaced with the rule, that p=1. But D(p)=S would still work.

          For the demo I have chosen these elasticities for each of the 3 goods:

          E(food)=-0,05D’
          E(housing)=-0,07D’
          E(clothing)=-0,1D’

          This will mean that:

          p(food)=10+(D’-S)/0,05D’
          p(housing)=10+(D’-S)/0,07D’
          p(clothing)=10+(D’-S)/0,1D’

          The price calculations would then simply follow the list of goods demanded from the top down:


          Examble:

          We have just 1 PU in this examble.

          I decide that:

          S(food)=10
          S(housing)=3
          S(clothing)=1

          Income=100

          D’(food)=5

          Since these are the first 5 goods demanded.

          p(food)=10+(5-10)/(0,05*5)=10-20=-10

          Therefore the price rule kicks in, and

          p(food)=1

          D(food)=S(food)=10

          So people spend 10 credits on food. Since they have money left we will proceed down through the list of goods:

          D’(housing)=1

          p(housing)=10+(1-3)/(0,07*1)=-18

          Again the price rule kicks in:

          p(housing)=1

          D(housing)=3

          Money spent on housing: 3. Again they have money left so it will continue…


          I gotta go now, but I will be back tonight and finish this.

          ------------------
          "It is only when we have lost everything
          that we are free to do anything."
          - Fight Club
          "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
          - Hans Christian Andersen

          GGS Website

          Comment


          • #95
            the Joker

            seeing as this is a turn based game i never thought that supply, demand or price would change inside of the turn...all of the action should happen at the end of the turn...

            ok i have been thinking about how all of these factors interact together and here is what i have came up with so far...
            [*]as price increases demand decreases[*]as price decreases demand increases[*]as demand decreases price decreases[*]as demand increases price increases
            [*]as supply increases price decreases[*]as supply decreases price increases
            [*]if supply is increasing then price should be decreases thereby increases demand[*]if supply is decreases then price should be increases thereby decreasing demand
            [*]if demand is increasing then price should be increasing and if possible supply should be increasing too[*]if demand is decreasing then price should be decreasing then supply should be decreasing
            [*]if demand increases then so should price and if possible supply should increase thereby decreasing price until demand and supply balance out
            [*]if demand decreases then so should price thereby making supply decrease which would raise prices until demand and supply balance out

            also we need to have one way functions as illustrated by the following
            [*]when demand decreases price should not increase (because of market factors)[*]when demand increases price should not decrease (because of market factors)

            you cannot set functions equal to each other in an algebraic sense if they are one way by that i mean this
            [*]as supply increases price falls (because of market factors) however this is a one way equation...increase in supply decreases price but decrease in price does not increase supply

            i would like to make clear that all instances of change in price, supply, and demand is due to MARKET forces in my list of rules...if there is only one gold mine that is running at maximum capasity and can't be upgraded then supply will never increase no matter what demand does...if because of technilogical innovation it becomes much cheaper to manufactor a product then prices will fall even if supply low and supply is going down, the markets might giving "lift" to a product, even as air gives lift to a brick, but technilogicl innovation like gravity will force the price of a product towards the ground

            i know my first function was just a shot in the dark but i will keep on looking for a better set of functions to help simulate the situation...

            it may be time to break out the calculus book

            korn469

            Comment


            • #96
              Hi Korn:

              Your list sounded exhaustive, though a bit difficult to follow. But I got it, I think. It brought me to think, that we might not want to use simple algebraic equations; those would perhaps be over-simplified, and also it might not be realistic to use a simple formula to find the optimum prices, when there are so many factors to take into consideration.

              Computers are not good only at making calculations; they are also quite efficient at making comparisons and thus reacting to simple events, taht can be described with short sentences. So, we might want to make the economy algorithm perform some kind of simple analysis of the current situation, and then make a small correction to prices, that might not be optimal; then next turn same would happen again. In crisis situations, the actions might be more drastic. This way I think we could take into account more factors, and that would also be quite simple to do. Also we would make the system much more realistic.

              About prices changing: I'd like to add, that the government might decide to support one industry, if it seems to be necessary. This way, they could lower their prices and become more competitive. Perhaps we'd like to add also some other tools for the governments to control the economics.

              Which brings to my mind: I have understood, that it would be difficult to model inflation very efficiently. But could we have some kind of simple figure, that could be used to model the effects of extreme situations, like hyperinflation? The figure might not have to work excactly like inflation, but it would serve as a tool that could affect some things, and it would have quite a lot effect in economical crisises. Just a thought. Hyperinflation is after all quite a significant phenomenon.

              Comment


              • #97
                Korn:

                In-turn supply and demand calculations:

                Of cause. You're right. I hadn't really thought it through when I posted that. What I meant to say was, that to avoid making the system too hard to create, I thought that supply and demand should be calculated one after the other, and not simultaneously. If we do the latter then a lot of variables will be dependant on each other, which will make it very hard to create the system. In stead I suggest that it should be done something like this:

                First supply is calculated via the price set the turn before.

                Then this suppply will create a new demand for labour, and therefore a new income and thus a new demand. This demand will be used to calculate a price, combined with the supply calculated before. But by now the supply should be unchangeable. This will mean that no matter what the price is the supply will not change untill after the next turn. This might not seem very dynamic, but since the changes in supply and demand should propably never be more than a few percent each turn it should work.

                If we are to have demand and supply both changed at the same time it would mean that when supply changed so would the demand for labour, and therefore also the wages and thereby the demand itself, which again would change the price and the supply etc. It would be overwhelming to create such a system.


                Guildmaster:

                That sounds like reasonable features. We will need a way to calculate how advances effects economy. Of cause mostly the result would just be a rise in productivity and not extreme ones like those sci fi techs!


                About using math or sentences:

                Since math is the language of economics I suggest that we use math in our model, in stead of just some vague sentences.

                Amjayee, I think that using simple algebra would propably prove not just simpler, but also more efficient than to use sentences.

                I can't really see how a non math economy model should work...

                At least I suggest that you should try programming more than 1 version of the economy model demo, one using math and one not doing so. This way we can see which one works best.


                Inflation:

                The main reason why I would find it hard to model inflation is, that I don't really know what causes it . The hyperinflation in Germany in the 20s was mostly caused by the government increasing the amount of money dramastically. I think it could be possible to model inflation in the game, but right now we should think about more basic things, like gettin a demo that works!

                Also, Amjayee, could you post in my "OpenCiv3 changes name to GGS" thread at the Civ3 forum? Sir Shiva seems somewhat interested in helping us out, but I can't really tell him much about programming issues - I believe you can!

                ------------------
                "It is only when we have lost everything
                that we are free to do anything."
                - Fight Club
                "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
                - Hans Christian Andersen

                GGS Website

                Comment


                • #98
                  quote:


                  10+(S-D’)/E
                  -----------
                  S(food)=10
                  ----------
                  D’(food)=5
                  -----------
                  p(food)=10+([5-10]/[0.05*5])=10-20=-10



                  hmmm, I'm not understanding this. You say the s(food)=10, d(food) = 5,
                  but you say (s-d')=5-10. You do this often. Am I not following, or is the formula
                  10+(D'- S)/E

                  Or should the equation have read
                  p(food)=10+[(10-5)/(0,05*5)]=10+20=30

                  Or am I just lost

                  heardie

                  Also http://members.nbci.com/acchiron/econ.zip has a small 'calculator' that will calculate the price of an item using the formula. (I swithcced your number around so it is 5-10 so it still give's -30 and -18, except it says 1)
                  [This message has been edited by heardie (edited October 01, 2000).]

                  Comment


                  • #99
                    To my knowledge inflation is mainly determined by quantity of money and velocity of circulation.
                    This is a citation from the Britannica:

                    quote:


                    Inflation

                    in economics, collective increases in the supply of money, in money incomes, or in prices. Inflation is generally thought of as an inordinate rise in the general level of prices.

                    From a theoretical view, at least four basic schemata commonly used in considerations of inflation can be distinguished.

                    The quantity theory

                    The first of these and the oldest is the view that the level of prices is determined by the quantity of money. The ratio of the stock of money that people want to hold to the value of the transactions they perform each year (or the inverse of this ratio, called the velocity of circulation) is supposed, in the simplest version of this view, to be fixed by such factors as the frequency of wage payments, the structure of the economy, and saving and shopping habits. So long as these remain constant, the price level will be directly proportional to the supply of money and inversely proportional to the physical volume of production. This is the celebrated quantity theory, going back at least as far as David Hume in the 18th century. But the theory assumes that productive capacity is fully employed, or nearly so. Because, in fact, the extent to which productive capacity is used varies a great deal--indeed, sometimes more than the level of prices--the quantity theory fell into disfavour between World Wars I and II, when the level of activity provided more reasons for anxiety than did the long-run movement of prices.

                    In a refined version, the quantity theory was revived by Milton Friedman and other University of Chicago economists in the 1950s and '60s. Their basic contentions were that short-period changes of the money supply are, in fact, followed (after a varying interval) by changes in money income and that the velocity of circulation, though it fluctuates to some extent with the money supply, tends to be fairly stable, especially over long periods. From this, they concluded that the money supply, while not a reliable instrument for controlling short-term movements in the economy, can be effective in controlling longer term movements of the price level and that the prescription for stable prices is to increase the money supply regularly at a rate equal to that at which the economy is estimated to be expanding.

                    Against this, it has been argued that in highly developed economies the supply of money varies largely with the demand for it and that the authorities have little power to vary the supply through purely monetary controls. The correlations observed by this so-called Chicago school between money supply and money income are attributed by their critics to variations in the demand for money to spend, which elicit partial responses from supply and are followed after an interval by corresponding changes in money income. The relative stability of the velocity of circulation is attributed by them to the facility with which the supply of money accommodates itself to demand; they argue that insofar as supply may be restricted in the face of rising demand, velocity will increase, or (what really amounts to the same thing) new sources of credit, such as trade credit, will be exploited.


                    (source:www.britannica.com, article 'inflation')

                    There are some other theories explaining this phenomenon but this one will remain of fundamental importance.
                    My advice is to leave inflation alone for the time being. Making a functioning economic model is already difficult enough!
                    Jews have the Torah, Zionists have a State

                    Comment


                    • Heardie:

                      What on earth have I been doing there?

                      My advice is to believe my formulas, but to always check when I put numbers in them. At my highschool math final I had made all the right formulas and everything, but in 3 or 4 places I had switched two numbers, added in stead of substracted or some other stupid thing. So I mastered integrals and 3D geometry, but couldn't figure out what 3+12 was.

                      When looking at my post I can see that I have switched D' and S several times. Sorry about that.

                      The function should be D'-S. So if initial demand is higher than the supply then the later half of the function will be positive, and the price will be higher than 10. Andf if initial demand is lower than the supply then the price will be lower than 10.


                      Korn:

                      Hmmm....

                      Why not use the formula I had made? First, the price is not a variable we know. In stead it is the thing that we want to calculate. So in stead of having to calculate demand we would actually know demand, as it will equal supply. What we have to calculate is the price. Try looking at my formula and tell me what you think.


                      S. Kroeze:

                      Thanks again for providing us with some advanced knowledge. It seems overwhelming to create a model that can portray inflation, at least right now. I completely agree with you that we should work on getting a functional model, and wait with all the more advanced features.

                      ------------------
                      "It is only when we have lost everything
                      that we are free to do anything."
                      - Fight Club
                      "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
                      - Hans Christian Andersen

                      GGS Website

                      Comment


                      • ok after having put some more thought into it i think i have came up with a possible solution to one of our formulas. it needs more refinement but i this its getting there

                        how does this sound for the formula for demand...

                        you will need to have the following variables
                        [*]change in price (delta P if i knew how to make a triangle but since i don't i'm going to use k)[*]price elasticity (represented by e)[*]current demand (represented by d)

                        then you'd have the following formula

                        f(d)= d/(k*e)

                        ok now here is the formula in action...

                        ok lets say a provice wants to buy 10 pizzas in one turn pizza have a relatively high price elasticity (this means that the product has a low tolerance for price increases) of .90...all of the sudden there is a strike by the pizza workers and pizza production get cuts making the price of pizza double...so pizza now cost double what the used to

                        so we would get

                        f(10)=10/(2*.9)
                        f(10)=10/1.8
                        f(10)=5.56

                        so demand would be a little over half of what it was

                        now if the price of pizzas got cut in half that turn instead of doubling we'd have the following

                        f(10)=10/(.5*.9)
                        f(10)=10/.45
                        f(10)=22.22

                        now lets say that the same province wants demands 15 units of asprin which has a fairly low price elasticity (this means that the product has a high tolerance for price increases) of .20 if the price of asprin doubled we'd get the following

                        f(15)=15/(2*.2)
                        f(15)=15/.4
                        f(15)=37.5

                        which means that there is something wrong with my formula...

                        because if the price of asprin doubled there should be less demand rather than greater demand...hmmm does anybody have any thoughts or suggestions?

                        though like i said earlier i think that this formula is on the right track even if it's not there yet...we could possibly restrict e to being greater than a certain number something like that

                        korn469

                        Comment


                        • This is what I'm learning in my history class (and who says I'll never use this knowledge)

                          Abour massive inflation in Germany during the 1920s, what happened was this: Germany told France that the reparations payments outlined in the Versailles treaty were too high and that they couldn't pay them, so they stopped trying. France moved in to occupy the Rhineland then all the german workers went on strike. They were told by the German government not to work for the French and that they would be given money to buy food and stuff. Well to come up with this money, they started printing more of it. As there was more money going around, prices started going up and so the government had to print even more money and etc. that's what caused that.

                          Here's something else to consider: The Great Depression hit the world and shortly thereafter there was war. In the 20s everyone was all about peace and ending wars and coming together, but when the economy fell no one cared about making peace anymore. It makes sense too, the big reason why married couples fall apart is quarrels over money or lack thereof. When there is economic prosperity that should play a supersize role in international politics and vise-versa.

                          Also, before WW1 war was though of as a good thing. Part of "Social Darwinism," which is this idea where people believe in the advancement of the species by thinning out the heard, if you will, the people who get killed are weak. The monarchs felt a moral obligation to go out conquering and making wars because they were superior to the ones being conquered. War was thought of as a natural selection process. However, the casualties in the Great War were so tremendous that it kinda changed all that.

                          Just a few things I learned in school...

                          I'm actually impressed that this thread is up to 101!

                          ------------------
                          Peace and trust can win the day despite all your losing
                          -Led Zepplin
                          He's spreading funk throughout the nations
                          And for you he will play
                          Electronic Super-Soul vibrations
                          He's come to save the day
                          - Lenny Kravitz

                          Comment


                          • Guildmaster: It sounds like you have got a great history teacher. This is how things must have been, but I have never been taught them like this... Anyway, all that sounded interesting; it proves that history is completely logical, and there are good changes of modeling it with computer; just that it requires lots of work. That certainly encourages me, and makes me feel confident about that we are on the right path.

                            Comment


                            • You're completely right, Guildmaster. A recession leads to protectionism, which leads to hostility, which leads to way. This was especcially the case with WW2. The cause of WW1, however, was more obscure. As far as I know it started in about the same way as all wars in Civ2 started: The countries became more and more pissed at each other, for no other reason than the fact that they were all the strongest in the world.

                              There should definately be strong links between the economy model and the political models.

                              But right now I am satisfied with seing a working economy model. So, how's the programming going, Amjayee?

                              BTW: I am currently learning to program. I don't expect that I will ever get really good at it, it is just something that I have been wanting to learn for a long time now. I have bought some book that promises that it will teach you how to program, and with it is MS Visual C++ 6.0 Introductory edition. Just wanted to let you know.

                              ------------------
                              "It is only when we have lost everything
                              that we are free to do anything."
                              - Fight Club

                              "It is ok to show horrific violence
                              as long as noboby says any naughty words."
                              - South Park
                              "It is not enough to be alive. Sunshine, freedom and a little flower you have got to have."
                              - Hans Christian Andersen

                              GGS Website

                              Comment


                              • see if I can compress this in the 15 minutes I have to write it...

                                WW1 was started on the same premise that most other wars until that one were started... "war is a good thing"
                                Ethnicity and Nationalism both played key roles. Alliances made it from a localized conflict into what it was. Pan-slavism, was the idea that all people of slavic ethnicity should be under one roof, or one nation for slavic people (Russia) and Pan-germanism was the same idea only for german people (Germany). Serbia was this little country in the Balkans that wanted to expand their territory in the same way that a Civ2 empire does. There were serbs living in Bosnia which was occupied by the Austro-Hungarian empire. So Serbia wanted to gain control of that territory. So to gain power and prestige for that they invaded Albania, until Austria stepped in and said no, get out or we will attack you. Ok more to it, France and Russia had an alliance because of Germany, this was after the Franco-Prussian wars. England and Japan had an alliance after Japan beat Russia's navy in the russo-japanese war. England did this as a "Welcome to the Club" jesture. Japan defeated Russia (a superpower) and in doing so became a superpower. So theoretically England and France should go to war against each other. they didn't want to do that so they signed an agreement called the "Entente Cordiale" which meant that if a conflict arose in Europe England and France would work together to arrive at a mutual policy. Russia had an alliance with Serbia because they were both slavic nations. With all this Germany, Austria and Italy formed the "Central Powers" and became allies that way. (This is very-very abridged) England and France invite Russia into the Entente Cordial and they become the "Triple Entente."
                                Back to Serbia. They and Austria had been going at it for some time now and since Serbia wasn't strong enough to go against Austria directly they formed the Black Hand, a terrorist group. They assassinated the Archduke Franz Ferdinand who was the ONLY surviving heir to the Austrian throne. So Austria goes to war against Serbia with Germany's full support, Russia promises full support for Serbia, Germany attacks France and if you want more details I can give them later.

                                ------------------
                                Peace and trust can win the day despite all your losing
                                -Led Zepplin
                                He's spreading funk throughout the nations
                                And for you he will play
                                Electronic Super-Soul vibrations
                                He's come to save the day
                                - Lenny Kravitz

                                Comment

                                Working...
                                X