Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Alternative Civs > Guns, Germs & Steel > Economy Model Version 0.2
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread   
Pages (6): [ <<   2   3   4   5   6   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 11-10-2000 23:48
Edit/Delete Message Reply w/Quote
#121 Report this post to a moderator
Help yourself to an AD-FREE life

I agree with you completely, Guildmaster. It is always more cool to have thing occuring because of the actual mechanisms of the model, in stead of making special submodels to handle them. And it also makes a lot of sence to vary the demand of people from some basic factors - like age, family level etc.

------------------
"Never underestimate the power of denial."
- American Beauty

ElmoTheElk is offline ElmoTheElk
Prince
Leiden, The Netherlands
Jul 2000
time: 06:14
Post  Old Post 13-10-2000 12:33 Visit ElmoTheElk's homepage!
Edit/Delete Message Reply w/Quote
#122 Report this post to a moderator
Enter the AD-FREE zone

O.K. I agree, but does that mean that you'll have to log the age, wealth, etc. of every single little person (or every 10,000)? Isn't this too time consuming for our cpu's?

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 13-10-2000 20:32
Edit/Delete Message Reply w/Quote
#123 Report this post to a moderator
Support Apolyton buy from Amazon

Elmo:

I think we will only need the wealth of each class (workers, capitalists, farmers, nobility etc). We will then assume that all members of a class has the same wealth.

And age groups will simply be handled by determining the percentage of the pop in each group, and then multiplying this with the number of people to find the number of people in each age group.

------------------
"Never underestimate the power of denial."
- American Beauty

ElmoTheElk is offline ElmoTheElk
Prince
Leiden, The Netherlands
Jul 2000
time: 06:14
Post  Old Post 15-10-2000 16:22 Visit ElmoTheElk's homepage!
Edit/Delete Message Reply w/Quote
#124 Report this post to a moderator
Support Apolyton buy from Amazon

k.

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 16-10-2000 12:17 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#125 Report this post to a moderator
Support Apolyton or Terrorists Win

It seems that my time for replying messages is really limited, but here are some feedback:

Windows vs. DOS demo:

I agree that windows programs are more professional, easier to use, more good-looking and all kinds of other things. I said that in the beginning the demo will be DOS-based, because it is easier to make the core classes and functions to work that way, since you need to think only about them. Later I could make a windows environment, but I think the most important thing is to make the model work... Also, the demo is simple and does not need any fancy event-driven programming - just a simple loop. It is no task later to extract the classes (that are designed for use in the final game) and insert them to the event loop of the final program. One more point, since we will not use windows GUI in the final game, the win environment for the demo will be extra work, but I think that's ok if you want that.

About compilers, I haven't used the Borlan one, but everyone is saying it's better. Might be. I have VC++ 6, and so does my university, so I will be using it, so it seems. The question why VC++ is used more could perhaps be answered by considering the dominant position of Microsoft... I don't know how you make a GUI with Borlan. It is really fast to design and draw the environment in VC++, but it also requires some code to create the functionality to it - which is the case also with other compilers. If you know what you are doing, I think it wouldn't take much longer to make an environment than with Borland. The time-consuming fact is, that I'm not very experienced in win programming, yet... I'm glad if I can get some practice with this task, so I'm quite happy with that. It will just take some more time from other tasks.

Joker:

What you said makes mostly sense. Here are some further points, hopefully more clear than in my last message:

-How do we keep track of how much houses and clothing is produced? In the final game, we would use the company idea. In the demo, we would need to know the amounts of people producing each good, task that is taken care by the company thing later. So, I solved this by making three classes - food, housing and clothing producers. They would have different amounts of people, different incomes etc. That would also make changing jobs more clear in the program.

-I'm still a little puzzled by the people buying things system. It sounds a little odd to buy some of good a, then some of goods b, c and d, then again good a... Later, when we have some 60 goods, this would be an enormous task to make. It is also a little slow to perform on computers. I think we would need to come up with something simpler. Consider your own life; how do you decide what you buy with your money? First you take the money, then you take the prices of things you need. Then you think what you really need to buy, and buy those first. With rest of the money you buy the luxury goods, or save it. Luxury means here those things you don't necessarily need.

So: this is what I thought with the requirement system. Also notice that not all of the money is spent every turn! If people are left with much extra money, they will not (averagely) buy large amounts of unnecessary goods. They will save, or in game terms, invest and create new production or stuff. So, I still think people would try to buy at least what they require, and not much more than the demand.

You are right about that the requirement thing is not needed in the way I proposed; it can handled by demand. If much extra money is left, people will correct up their demands, thus rising in social status. But still, there are some things people require. They need some food; they need some housing money. Consider your life: every month, you spend roughly the same amount for your rent, and for buying food. You also need to pay your telephone and electricity bills. These are "essential" costs. With the rest, you buy gas, or go to movies, or partying, or save to buy a new computer.

This shows us that people of higher social status really _do_ have more requirements. People living in caves or cardboard boxes don't need to pay rent for their housing, those living in apartments do. Those who own their house, pay for the bank from which they have taken a debt to buy it. If the people don't have money for that, they will live simpler, and decrease their demands, _but_: they will get some trouble, and those who own the houses get some trouble, since there are not enough people to pay for the upkeep of the houses. So: demand takes care most of the requirement thing, but some things we need to consider. I leave this open for debate, in the first demo we don't need it. But think about this, and suggest what we should do.

So, here is what I think about the buying thing. People look at their money, and the prices. They will need to pay the rent (or other costs of housing) and buy food. Then they would also like to buy newer clothes. Which one is the most important? I think it depends on the situation. If it looks that you can't afford everything and if you get well enough to eat, you consider the rent most important, and pay for it. Then you look how much you have got left; if it isn't enough to satisfy the demand for both clothes and food, you buy a little less food (that's what at least students are doing every day) and use the rest for clothes.

If you have only a slight shortage of money, you will pay for rent and food, and use less for clothes, I think. If you have little more than you need, you buy what you need, perhaps a little extra for food and clothes, and also increase your demand for those a little. If you have lots of extra money, you might change to a bigger apartment, buy little fancier clothes, and buy some more expensive food; rest you might invest. There should be some limit for rising in social status; most of all, the region perhaps can't offer any better apartments or food. Then the extra money would be used to invest for producing those, and the social status would rise slowly.

If you are already short on food (there has to be a lower and upper limit at least for food) and get less money than last turn you might buy lower grade food, or, more reluctantly, change to smaller or cheaper apartment. Some money should always be used for clothes - remember this is an average. Some people will need new clothes every turn. If there is money only for food, people will buy it with all their money, and live in cardboard boxes, steal money and clothes etc. What about alcoholics? They would use only minimal amount of money for food, or even steal food, and buy booze as much as they can.

Just some thoughts - there are many situations to consider.

This sounds to me more clear now. I haven't yet tried to program this, so I don't know how it would work, but I think it would be more simple. The key idea is, that the people should emphasize the goods depending on the situation. Some goods would be "essential" in that situation; people would try to meet the demand first in those. There would also be cerated some kind of priority list for those goods. Here we had only three basic goods; when we add more, it doesn't become much more complex, since the rest are usually luxury things; people buy them according to how much they demand them. Non-luxury things, in addition to those already mentioned, are also telephone, electricity and water for modern people. How do we deal with those? Telephone belongs to communication. Should el and water belong to housing, or should we have some kind of "infrastructure" good? We don't need them now, but it would be good to decide... In some situations, also cars and gas would be non-luxury.

I will try and make some kind of function to decide how much people buy and then report.

-What I wrote before has brought me to think, that we absolutely need grading also for food. Think about it; we can't eat much more than our stomach can take. Instead we are eating more expensive and fine food. Poor people just buy some low-grade ingredients, like grain and vegetables grown in their own area, and cook their own simple food. We middle-class people in western countries cook our food from exotic ingredients imported from faraway countries, and perhaps prepare several dishes, or eat in restaurants. Rich people might have their own cook and special worker buying fresh ingredients from the producers, and they would drink expensive wines. If you can't afford the grade you are buying, you can buy lower grade, thus saving money. Here, we definitely need grading to achieve this.

The rest of the things you have been discussing here sounded beautiful. Keep on!

[This message has been edited by amjayee (edited October 16, 2000).]
[This message has been edited by amjayee (edited October 16, 2000).]

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 16-10-2000 13:12
Edit/Delete Message Reply w/Quote
#126 Report this post to a moderator
Support Apolyton buy from Amazon

Hey Amjayee! So, you're buissy with school or what? I, on the other hand, have a vacation this week , and I don't have much planned, except for the usual hang out with friends, go clubbing a bit etc.

In other words I have a lot of time to work on GGS this week. And so I will. I will also dedicate it to expand my programming skills.

I can see, that for now it is most important to have a demo that works.

I hope you understood my feeble attempt to convert my thoughts into something codeable (oct 9).

If not all you gotta do is ask.

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 16-10-2000 13:49 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#127 Report this post to a moderator
Help yourself to an AD-FREE life

Hi! I was wondering, whether someone would read the message right where he shouldn't...

I was writing it in a computer class at my school. There was some teaching starting in the class, and I had to go to another class and continue there. So I sent the message, hurried to the class next door, and edited it. Be sure to read also the new things...

I'm not in massive hurry with my school, but when I have free time, it seems that I use it for making some little exercise programs, or doing my homework, rather than other things, like reading apolyton forums or answering my email. But that's OK, I think...

Your former 9.oct message was good, The things considering job shifting and stuff were good. Of course to be code-like, the text should be more detailed; code-like text is called pseudo-code. It is usually written with non-programming language specific english sentences, where every sentence could be replaced by one line of code in every language.

About programming, the best thing to do to learn is to practice; make simple programs, use all the tricks you have learnt, try new things. That is about the only way to become at least decent programmer; you may learn how to write code by reading books, but programming is also experience, knowledge of what is good practice, and also code design. Those are learnt only by practice.

Guildmaster is offline Guildmaster
Warlord
Up your butt and around the corner
Jun 2000
time: 05:14
Post  Old Post 17-10-2000 19:46
Edit/Delete Message Reply w/Quote
#128 Report this post to a moderator
Support Apolyton buy from Amazon

I don't know what you guys spend your money on, but I buy mostly what I want. If I want something bad enough like those speakers that are in my car. 2x12" RF punch XLCs and a 360 watt amp alltogether with a box and everything was $600. I spent my rent money on that, I put off my phone bill, I even ate about half as much that week before I bought them and to me they're worth every penny.

The point here is one thing that I learned when I was in sales is this: People will buy what they desire before they consider what they need or what they can afford. Back in the 1900s before WW1 there was this notion that you should save your money for a rainy day. After the war and 10 million people were killed all over Europe people started buying like crazy under the realization that you could go any minute so there's no sense living for the future. Well the buying is what fueled the economy of the early 20s.

------------------
Goes down smooth when I get a clean hit of that skunky, funky, smelly green sh.t
- Cypress Hill

Guildmaster is offline Guildmaster
Warlord
Up your butt and around the corner
Jun 2000
time: 05:14
Post  Old Post 17-10-2000 19:47
Edit/Delete Message Reply w/Quote
#129 Report this post to a moderator
Increase Your PM Length

I don't know what you guys spend your money on, but I buy mostly what I want. If I want something bad enough like those speakers that are in my car. 2x12" RF punch XLCs and a 360 watt amp alltogether with a box and everything was $600. I spent my rent money on that, I put off my phone bill, I even ate about half as much that week before I bought them and to me they're worth every penny.

The point here is one thing that I learned when I was in sales is this: People will buy what they desire before they consider what they need or what they can afford. Back in the 1900s before WW1 there was this notion that you should save your money for a rainy day. After the war and 10 million people were killed all over Europe people started buying like crazy under the realization that you could go any minute so there's no sense living for the future. Well the buying is what fueled the economy of the early 20s.

------------------
Goes down smooth when I get a clean hit of that skunky, funky, smelly green sh.t
- Cypress Hill

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 18-10-2000 02:45
Edit/Delete Message Reply w/Quote
#130 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Amjayee:

So what you're saying is, that you are actually hanging around at Apolyton when you're in class, in stead of listening to the teachers???

And sure, it's cool that you spend your time on other stuff than Apolyton.

I tryed to make my 9 oct post as code like as I could. Obviously I didn't write anything like unsigned int or int main(), but I tryed to put things into something codelike. The places where I have replaced the code with text are actually places where I really have no idea on how to code that. It simply involves some coding techniques that I don't know about yet.

And I am not just reading about programming. In fact, right now I am programming a pop model program. It is about half done - I have handled births, now I just need deaths. But it will have the worst interface any program has ever had, since I lack some knowledge (which I can only get from reading about programming) about how to create more program flow. It will print the # people in each age group, the total population, and then a few other variables, and then it will post the population the next turn. But to compute the turn after that you will have to manually go into the source code and change the values to the new ones recieved. But when it is done I can upload it some ... some place where you guys can see it. But without a compiler it wont really be much good.

But Amjayee, could you please tell me how to get the line numbers added to your source code, so you will always know each lines number?


Well, to reply your econ questions:

quote:


How do we keep track of how much houses and clothing is produced?



Well, I think you answered this yourself. Add different classes and it should work.

quote:


I'm still a little puzzled by the people buying things system.



I think everybody (including me) are. First I didn't mean that people would necessarily by one thing first, then another thing, then the first again. Just that this will show what things are most important to people. And I think that is the best way to make sure that people spend the same amount of money that they earn.

I agree that the task might be overwhelming with a huge number of good. But there I think that we should handle each demand group as one good, so there will be no more than 10 to 12 goods. We can then calculate the actual goods inside the demand groups seperately later, propably via a simpler model.

I must also say that I strongly oppose to having some good that people need and some that they just want. I don't think that difference exists in reality. Obviously some goods are more basic than others, but it's not like you can seperate luxury goods from other goods. It all depends on the wealth of people. Therefor I think all goods, luxury and other goods, should be handled the same way.

But when this is said I agree that there is propably/possibly a better way to handle supply than the one I have come up with. I just don't know what it is. I have spent most of my GGS time the past 3 months trying to figure out a better way to handle it, and I can't think of one. The problem when doing demand is, that you can't really include price directly into demand, since price is really a function of demand, and demand changes price.

What I like about my model is, that it uses real economic mechanisms, like price elasticity. And, that it can function in all enviroments without having to be changed.

But still, I am open to suggestions on how to improve it. But any demand model should remain precise. So we can't just have a statement that says, that if demand is higher than supply then demand will drop. We have to know how much it will drop. Basically, I don't know that answer to this one!


quote:


If you have only a slight shortage of money, you will pay for rent and food, and use less for clothes, I think. If you have little more than you need, you buy what you need, perhaps a little extra for food and clothes, and also increase your demand for those a little. If you have lots of extra money, you might change to a bigger apartment, buy little fancier clothes, and buy some more expensive food; rest you might invest.



I actually think my model handles this pretty well. If the people's income is low they will spend most of their money on food, when they have more money (or money left after buying food) they will spend money on other things.


Graded food:

Yeah, I have thought about this too. And I think I agree. But I think we should wait a bit with all graded goods, and stick with the overall demand groups, untill we are more clear on how to handle demand.


Guildmaster:

I think it would be hard to implement such things in the model. We have to assume that people are somewhat rational (and don't stop eating because they want a car stereo ). Of cause there should be some sort of room in our model for it, but it shouldn't have more effect than the rational demand function.

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 18-10-2000 16:15 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#131 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Guildmaster:

I agree with Joker, that in our game the people will have to be somewhat rational. And I _do_ think that's the way it is in reality, too; we are speaking about averages here. Most of the time most of the people will spend their money mostly rationally, so we can quite well assume that they pay for rent, food and clothes before others. Usually.

Joker:

No, I had some free time between classes, and there was a teaching starting for others in the computer room I was in, so I had to leave. On lectures I don't surf the web, I'm doing the exercises as I'm told.

Your 9.oct text was good, I was just giving some general thoughts of "pseudo-language" text. It is good it didn't have unsigned ints or stuff, since those are C++ specific words; pseudo-language has to be language-independent, clear english sentences each replaceable by single line of code in the language of choice.

Also I didn't think you are only reading books - you have been telling you are also making programs. I was just giving advice; for me, practice is an absolute necessity, and I have heard that's the case with others, too. And reading books is also necessary. When you become more experienced, I suggest buying a reference manual of C++ language. I have one written buy Herb Schildt, and I have it always within reach when I program; it is impossible to remember all commands and standard library functions by heart.

I'm waiting your program with interest. About line numbers, they are not used in C++, and they are also not necessary. There might be a way to show them in VC++, but I have never needed it. I will tell you if I find out. I think there is at least a menu command which can take you to a specific line. By the way, why do you need them? If you tell me, I can perhaps propose a better idea.

I did not mean that we should hard-code what goods are luxury and what not. Also we don't need to make a distinction between ordinary goods and luxury goods. It is just that depending on situation people will consider some goods necessary, like rent, food and clothes, and others not as necessary, like car stereos or movie tickets. If they are short on money, they will cut on the not so necessary goods first, and buy the necessary ones. What they consider necessary depends on situation. I think we think the same, just saying it differently. I'm emphasizing this, since in programming you need to be excact. Some goods people have to emphasize, or we will end up in chaos.

About other things in economy model, I agree they are a bit fuzzy. But I think that when I program it, things start to become more clear. Overall, I think your system is great.

Graded food and other gradings would be added later, of course. But it's good that we agree food needs grading.

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 18-10-2000 20:50
Edit/Delete Message Reply w/Quote
#132 Report this post to a moderator
Support Apolyton buy from Amazon

Amjayee:

Thanks for your programming advice.

Line numbers:
I would like to have them to help me when I am compiling the program, and the compiler finds errors in it. When I am told that there is an error on line 79 I don't know any other ways to find this line than to count from line 1 all the way down to 79. And that annoys me enormeously. Of cause there is some way to search line numbers or something, I just don't know how it functions.

Econ:
I think I agree, that we are basically saying the same thing, we're just saying it differently. The only thing that we need to figure out for this demo is really the demand function. I have given a suggestion for how it could be done. I agree that it is far from optimal, it is just hard to find a better method.

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

Guildmaster is offline Guildmaster
Warlord
Up your butt and around the corner
Jun 2000
time: 05:14
Post  Old Post 19-10-2000 02:01
Edit/Delete Message Reply w/Quote
#133 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

All I was really saying is that no matter how desperate people get, there is always a minimal demand for every good, and that isn't zero either.

Say conditions are so bad among the poor that they are starving in droves, your pathetic empire is losing about 2 million people each year to starvation. Not that the food isn't being produced, just that the disparity between rich and poor is so bad that they can't afford the food. Not a joke, this has actually happened a number of times throughout history.
These conditions are so poor that you have people living 5 families to a single cardboard box and clothes so raggedy that they have to try and cover themselves most of the time.
In these conditions, you would be suprised to find that even as things are THAT bad, you still find people... POOR people that want to buy stereo systems and collect gold coins, other things that have nothing to do with the basic needs.
Why?
Because having fun and enjoying life IS a basic need. Especially when conditions are that bad that one little toy that one father out of a hundred brought home for his starving child might just bring a glimmer of hope in an otherwise hopeless situation.
Perhaps a middle class shopkeeper has some sympathy for the guy and gives it to him instead of making him pay for it, or at least lets him pay for it later.

So anyway, yes. I agree that it should be rational just so long as it does recognize that people aren't always rational. Perhaps a minimum demand for each trade good is 1%? Something minute and insignificant, just enough so that it's there.

BTW the system in my car sounds REALLY nice... =)

------------------
Goes down smooth when I get a clean hit of that skunky, funky, smelly green sh.t
- Cypress Hill

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 19-10-2000 18:34 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#134 Report this post to a moderator
Put an end to popups!

Guildmaster: I'm happy to hear you are enjoying your stereo system.

Yes, if there are certain goods available, people are almost sure to buy them - at least some people. Speaking about your example, once again, we speak about averages. Some people will either have money to buy expensive things, or the just buy if they don't have money; that will show as a really minimal demand. But the minimum demand must not be very high, or the system will be stupid. I don't want to see my people dying just because they buy TV's and car stereos instead of food.

Joker: If you are using VC++ 6, try double-clicking on the line with the error message in the window in the lower part of the screen. That should take you to the line with the error. There's also a GoTo order in the Edit menu or somewhere. There you can choose to go to a specific line. But I always use the double-clicking system, since it's faster, and because error messages is about the only occasion when you need the line numbers.

And by the way, I checked; there is no way to display line numbers in the VC++ code editor. If you want them, it seems that you need to get another text editor featuring those, and move the code back and forth between it and VC++.
[This message has been edited by amjayee (edited October 19, 2000).]

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 19-10-2000 22:38
Edit/Delete Message Reply w/Quote
#135 Report this post to a moderator
Support Apolyton

Guildmaster:

Ok, now I understand. And I agree with that.

And I hope you enjoy your stereo!


Amjayee:

Thank you! That is just what I wanted to know.

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 24-10-2000 12:18
Edit/Delete Message Reply w/Quote
#136 Report this post to a moderator
Lose 30 kilos (of popups)

Hey, look! I'm a chieftain! And I've only made 70 posts! Apolyton is becoming more and more weird...

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 24-10-2000 15:24 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#137 Report this post to a moderator
Help yourself to an AD-FREE life

Weird indeed. And also not very nice. Perhaps you should mail someone to complain?

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 25-10-2000 15:33 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#138 Report this post to a moderator
Inflate your Upload Space

Another problem I encountered when programming the economy thing: what to do when the supply is smaller than demand? Who gets to buy and how much? In the eventual version we should perhaps allow "higher" classes to buy first, but in the demo we can of course divide the goods among the people willing to buy. But this needs some thought for the future.

Also, what happens to the demand when supply is insufficient? Does it get lower? I think it should not get lower very fast, but instead quite slowly. And the relation supply/demand should also affect the people's activity to create new businesses on that field. Earlier, the idea was to increase people working on that area depending on the demand; perhaps we should instead make it depend on the relation above, supply/demand? The smaller it is, the more the people will want to start producing that good.

Just thinking out loud. What do you think?
[This message has been edited by amjayee (edited October 25, 2000).]

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 26-10-2000 19:55
Edit/Delete Message Reply w/Quote
#139 Report this post to a moderator
Support Apolyton buy from Amazon

Gentlemen. We have liftoff!

FINALLY
I have made a demand algorithm that I am truly satisfied with, in stead of the clumsy system I have suggested previously.

Actually this algorithm is not very complex at all. It was right underneath my nose, but still I couldn't see it. Untill now.

The major difference between this and the other attempts I have made is, that demand is now no longer a function of wealth (in money). In stead it is a function of the total supply of goods. This may sound a bit weird, but it works. A really cool aspect of this algorithm is, that the percentage of the people's income they spend on different goods is now completely independant of the amount of money in the province. Like in reality!

I am mailing the sourcecode with the demo to Amjayee, as he is programming the econ demo, and to Heardie, so he can blast it out to the world through the internet!

But now that I'm here, why not just post the sourcecode?

code:
#include typedef unsigned int uint; int main() { uint income, pop, goodsperpu; float efood, ehousing, eclothing, mfood, mhousing, mclothing; uint dfood = 0, dhousing = 0, dclothing = 0; uint sfood = 100, shousing = 20, sclothing = 10, sgoods; float pfood, phousing, pclothing, incomeperpu, mgoods, pindex; int dsfood, dshousing, dsclothing; income = 3000; pop = 100000; incomeperpu = (income / (pop / 10000)); sgoods = sfood + shousing + sclothing; goodsperpu = (sgoods / (pop / 10000)); pindex = (income / sgoods); if (goodsperpu > 0) dfood = dfood++; if (goodsperpu > 1) dfood = dfood++; if (goodsperpu > 2) dfood = dfood++; if (goodsperpu > 3) dfood = dfood++; if (goodsperpu > 4) dfood = dfood++; if (goodsperpu > 5) dhousing = dhousing++; if (goodsperpu > 6) dfood = dfood++; if (goodsperpu > 7) dfood = dfood++; if (goodsperpu > 8) dclothing = dclothing++; if (goodsperpu > 9) dfood = dfood++; if (goodsperpu > 10) dhousing = dhousing++; if (goodsperpu > 11) dfood = dfood++; if (goodsperpu > 12) dclothing = dclothing++; if (goodsperpu > 13) dfood = dfood++; if (goodsperpu > 14) dhousing = dhousing++; if (goodsperpu > 15) dhousing = dhousing++; if (goodsperpu > 16) dfood = dfood++; if (goodsperpu > 17) dclothing = dclothing++; if (goodsperpu > 18) dclothing = dclothing++; if (goodsperpu > 19) dhousing = dhousing++; if (goodsperpu > 20) dhousing = dhousing++; if (goodsperpu > 21) dhousing = dhousing++; if (goodsperpu > 22) dfood = dfood++; if (goodsperpu > 23) dclothing = dclothing++; if (goodsperpu > 24) dhousing = dhousing++; if (goodsperpu > 25) dhousing = dhousing++; if (goodsperpu > 26) dhousing = dhousing++; if (goodsperpu > 27) dhousing = dhousing++; if (goodsperpu > 28) dfood = dfood++; if (goodsperpu > 29) dclothing = dclothing++; if (goodsperpu > 30) dclothing = dclothing++; if (goodsperpu > 31) dclothing = dclothing++; if (goodsperpu > 32) dhousing = dhousing++; if (goodsperpu > 33) dhousing = dhousing++; if (goodsperpu > 34) dhousing = dhousing++; if (goodsperpu > 35) dhousing = dhousing++; if (goodsperpu > 36) dhousing = dhousing++; if (goodsperpu > 37) dhousing = dhousing++; if (goodsperpu > 38) dfood = dfood++; if (goodsperpu > 39) dfood = dfood++; if (goodsperpu > 40) dclothing = dclothing++; if (goodsperpu > 41) dclothing = dclothing++; if (goodsperpu > 42) dclothing = dclothing++; if (goodsperpu > 43) dhousing = dhousing++; if (goodsperpu > 44) dhousing = dhousing++; if (goodsperpu > 45) dhousing = dhousing++; if (goodsperpu > 46) dhousing = dhousing++; if (goodsperpu > 47) dhousing = dhousing++; if (goodsperpu > 48) dhousing = dhousing++; if (goodsperpu > 49) dhousing = dhousing++; dfood = dfood * (pop / 10000); dhousing = dhousing * (pop / 10000); dclothing = dclothing * (pop / 10000); dsfood = dfood - sfood; dshousing = dhousing - shousing; dsclothing = dclothing - sclothing; efood = (dfood * 0.003 * pindex); ehousing = (dhousing * 0.007 * pindex); eclothing = (dclothing * 0.01 * pindex); pfood = pindex + (dsfood / efood); phousing = pindex + (dshousing / ehousing); pclothing = pindex + (dsclothing / eclothing); if (pfood < 0.1) pfood = 0.1; if (phousing < 0.1) phousing = 0.1; if (pclothing < 0.1) pclothing = 0.1; mfood = sfood * pfood; mhousing = shousing * phousing; mclothing = sclothing * pclothing; mgoods = mfood + mhousing + mclothing; mfood = (income / mgoods) * mfood; mhousing = (income / mgoods) * mhousing; mclothing = (income / mgoods) * mclothing; pfood = mfood / sfood; phousing = mhousing / shousing; pclothing = mclothing / sclothing; cout << "Income: " << income << endl; cout << "Initial demand for food: " << dfood << endl; cout << "Initial demand for housing: " << dhousing << endl; cout << "Initial demand for clothing: " << dclothing << endl; cout << "The price of food: " << pfood << endl; cout << "The price of housing: " << phousing << endl; cout << "The price of clothing: " << pclothing << endl; cout << "Food consumed: " << sfood << endl; cout << "Housing consumed: " << shousing << endl; cout << "Clothing consumed: " << sclothing << endl; cout << "Amount of money spent on food: " << mfood << endl; cout << "Amount of money spent on housing: " << mhousing << endl; cout << "Amount of money spent of clothing: " << mclothing << endl; cout << "Amount of money spent: " << mfood + mhousing + mclothing << endl; cout << "Percentage of income spent on food: " << (float) mfood / income << endl; cout << "Percentage of income spent of housing: " << (float) mhousing / income << endl; cout << "Percentage of income spent on clothing: " << (float) mclothing / income << endl; return 0; }


------------------
"I chose not to choose life. I chose something else."
- Trainspotting
[This message has been edited by The Joker (edited October 27, 2000).]

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 26-10-2000 20:00
Edit/Delete Message Reply w/Quote
#140 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Oh yeah, when supply is smaller than demand:

I think it would all be handled via the demand algorithm.

Supply and demand in the end situation (where the price is right) will always be the same. The real trick is to find a good way to calculate the price.

Later on, when we have several classes, I think that each class should just get the same percentage of the goods as the percentage of the total income that they earn.

But right now I am just looking forward to the demo. Then we can always figure out the more advanced features.

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 27-10-2000 20:35 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#141 Report this post to a moderator
Full PM-box? Change here!

Great, this will surely be of help for me! At least I've got the functions in one place so I don't need to use any time to comb the old threads for them. And once again, it seems to me that you have learnt the essentials of c++ quite quickly. That's remarkable.

About your algorithms I won't say this or that for now, I need to think about them for a moment. Many things will be done quite differently in the final version, but I think the essentials will remain.

Guildmaster is offline Guildmaster
Warlord
Up your butt and around the corner
Jun 2000
time: 05:14
Question  Old Post 29-10-2000 09:36
Edit/Delete Message Reply w/Quote
#142 Report this post to a moderator
Lose 30 kilos (of popups)

Perhaps I'm just uninformed, or maybe I missed something...

But weren't we going to add communication and transportation to the list of demands?

------------------
The night is young and so are we... Let's make love and dance the night away
- Debelah Morgan

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 29-10-2000 19:53
Edit/Delete Message Reply w/Quote
#143 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Guildmaster:

Of cause we will. Along with other demand groups like health care and education.

But for this early demo the main goal is to get a:

- Demand algorithm that works and can be used throughout the game.

- Supply algorithm that also works like it should.

- Check if these two algorithms function well with each other, and if not, see what should be changed.

For doing that it is easier to see the big picture of the demo when we only have 3 goods to work with. That is the reason why only the very basic stuff is included for now. Later on, when we are adding more advanced features like capital, raw materials and labour market(s) we will also include more demand groups. And after that we will figure out a way to handle the individual goods in the demand groups, and implement graded goods etc.

------------------
"I chose not to choose life. I chose something else."
- Trainspotting

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 31-10-2000 10:46 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#144 Report this post to a moderator
Support Apolyton, buy Civilization 2

I agree.

Joker, I tried to reply your latest email, but for some reason I couldn't send it. I got a "receiver unknown" message. Is the address correct? bjarkestaunolsen@ofir.dk Perhaps your email account provider had some problems. Here is the message, anyway. Sorry if you did get it after all.

> I just found out there was a smaller bug in the last version I mailed you.
> There was a place where I had multiplied with 10 in stead of dividing with it.
> This caused the price changes to be way smaller than they should be. I have
> corrected the error in the sourcecode I posted at Apolyton, and here I am
> mailing the new, corrected version to you.

Ok, good. Thanks.

Your algorithms looked good. The buying thing is of course quite ineffective and also not very well "extendable" for more goods. But we had some talk about that earlier, I have been thinking of a better way for doing this, and it starts to be ready.

Otherwise, the largest problems in making this demo have not been programming it, which is quite a trivial task, but rather understanding the model. It is hard to program something that you don't yet understand. Another large problem has of course been time. Lately, I have started to understand the model properly, and I do like it more and more the better I understand it. The time problem should be easier after this week; I have exams, and then my schedule is more flexible until Christmas. I hope the demo could be available soon.

amjayee

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 31-10-2000 02:44
Edit/Delete Message Reply w/Quote
#145 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Amjayee:

Hmm, weird that I didn't get that mail. It is my email adress allright. I guess they're just having some problems there.


The buying thing:

If you mean my long list of "if"'s with the following changes in goods demanded, then yeah, I know it's inefficient. We just need to figure out what goods people want to buy at different "income levels". But what I am most proud about in the newest version is, that the value of money is not constant. You can change the amount of money, and people will still spend the same percentages of their incomes on each good. Like in reality. It makes real inflation possible without any problems (if we want to implement it, that is). Therefore I have made "income" dependant on the total amount of goods, and I think it should be in the game, too. Again, low incomes means a large percentage of goods demanded are food. higher incomes means more diversity in the goods demanded. But as a programmer I am sure there are more efficient ways to do this that you can think of.

But whatever you do please don't change the rest of the program, at least not for now. I really, really like what it has become, with the price calculator and all. Also check out that the basic price of each good is no longer the clumsy constant 10 as it used to be. In stead it depends on the amount of money and the amount of goods, so the basic price is amount of money divided by amount of goods.

Looking forward to it!

------------------
Vote Gore. For the sake of people, not god.
[This message has been edited by The Joker (edited October 30, 2000).]

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 31-10-2000 13:25 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#146 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

My intention was to preserve the other formulas you used. I don't have anything to add to them, before we see how they work. But they should work well. I was just wondering, what is the meaning of pindex, which was declared as (income / sgoods)? Income was the total income of all people; am I correct with that it is actually the total amount of money on the move? Sgoods was the total supply of all goods, so the quotient would mean the "basic" price per good. I have a suspicion of how this would work, but perhaps you could explain it yourself. Has it something to do with that property of people using always the same percentage of their income for buying the goods?

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 01-11-2000 15:33
Edit/Delete Message Reply w/Quote
#147 Report this post to a moderator
Enter the AD-FREE zone

Pindex is a price index. I included it to describe a "basic" price on all goods. Before the basic price of each good was 10, but that system was clumsy and gave some very inaccurate results, since the amount of money could vary. So I replaced it with pindex. The practical use of pindex could be described so: If initial demand and supply are the same the price on all goods will be pindex.

It makes it possible to change the amount of money in the demo/game, without this having any effect on the supply and on the percentages of the people's income they spend on each good. It makes sure that the "price of money" is only dependant on the supply and demand of gooods.

I hope this is answer enough. If not, please ask!

------------------
Vote Gore. For the sake of people, not god.

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 02-11-2000 13:10 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#148 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

I'm happy to tell that most of the problems have been solved, and most of the code is done. Making this was much more complicated than I expected. I just need to "wrap it up" so it works together and make some rough debugging so the program will execute. Then we can start fixing the real problems; the workings of the system. I can't tell exact dates, but within days now the prototype should be available.

amjayee is offline amjayee
Prince
Jyväskylä, Finland
Oct 1999
time: 07:14
Post  Old Post 02-11-2000 16:24 Visit amjayee's homepage!
Edit/Delete Message Reply w/Quote
#149 Report this post to a moderator
Support Apolyton buy from Amazon

I have been wondering the elasticity system. Earlier it used to be a constant, which told how fast the prize of the good can change. Now it is a figure, that depends on demand, pindex and a constant. Could you explain how this system is meant to work?

The Joker is offline The Joker
Prince
Copenhagen, Denmark
Aug 1999
time: 06:14
Post  Old Post 02-11-2000 19:48
Edit/Delete Message Reply w/Quote
#150 Report this post to a moderator
Browse Apolyton AD-FREE

Well, it used to be a constant multiplied with initial demand for the good - which as result would give a percentage of demand, so if price rised with 1 demand would decrease with 10% or something.

Now I have added the price index to this. I have done that to make sure that the elasticity depends on the total amount of money in the province. So if there is 10,000,000 credits in the province a rise in the price of 1 would have less effect than if there was just 100 credits in the province. That is pretty much it!

------------------
Vote Gore. For the sake of people, not god.

GGS Website

 
Pages (6): [ <<   2   3   4   5   6   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:14.
Apolyton Time is 00:14.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0807 seconds (92.67% PHP - 7.33% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net