• Create Account

Economics problem

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

5 replies to this topic

#1polyfrag  Members

2468
Like
0Likes
Like

Posted 24 January 2014 - 10:41 PM

My algorithm for the workers:

If the satiety reaches a certain threshold, the worker will look for food. He will check all the shops for the one with the highest score. The score depends on the amount of food that can be gotten there, the time spent getting there and doing the shopping, and the total cost of the food.

How should the score for either shop be calculated? The main objective of the worker is to earn as much money as possible to spend on goods and services. If well-paid work is easy to find, you can go to more expensive stores to save time, to have more time for work and leisure, so you can buy more.

F = food amount that would be obtained at the store (depends on amount available, how much it costs/how much money the worker has and how much he needs to save for other needs)
T = the amount of time that would be spend going along the calculated path and shopping there (like it might take 1 second for each unit of food purchased)
C = total cost of the food that will be purchased there

So the formula might be:

F / ( T * C )

But then there's the problem of units. What is the relation between time and cost? If the time is measured in milliseconds, it can overshadow the cost consideration.

Also, the time would have to be multiplied by 2 or 3, because the worker will probably have to return to his previous place, where he was probably working or resting.

Edited by polyfrag, 24 January 2014 - 10:58 PM.

#2C0lumbo  Members

4072
Like
1Likes
Like

Posted 25 January 2014 - 12:19 AM

I would say your equation should be: F / (T + C) rather than F / (T * C)

You then need to work out T in terms of money. As a starting point, why not use the person's hourly wage (or per second wage, if your time is in seconds). Maybe you could scale it according to some personality trait that represents how much they value their free time.

#3polyfrag  Members

2468
Like
0Likes
Like

Posted 25 January 2014 - 12:54 AM

A good heuristic, short of trying all combinations of work, shops, and rest and thinking several steps ahead. It would probably be good enough for the simulation.

F / (T + C) still seems arbitrary to me though. Maybe it's F - (T + C) if we can think of T and C in terms of units of food. But for that we'd already need to know the going rate of food.

We can use past values. We can record the amount the worker got paid and the amount of time he spent since decided to work. And we can record the amount of food he got and how much he paid for it all and the time he spent getting there and shopping since the time he decided to get food. Thoughts?

#4wintertime  Members

3826
Like
0Likes
Like

Posted 25 January 2014 - 09:20 AM

Isn't your F conveying nearly the same information as your C? A shop would nearly always have more than needed for one person. The amount of available money does not change the relation of which shop is selling cheaper. So there remains only the cost.

You did not write about the type of game you are making, is it even necessary for shops to have different prices there?

Wouldn't the simulation get unrealistic, because in reality people do not have perfect information about shops, prices and available goods on the whole world?

Do those people always go to a shop and instantly consume the food, although in reality people buy enough for a week and then just take it out of their fridge?

I think I would simplify it by just letting them go to the nearest shop where they estimate/guess (from historic information, flyers or talking to others maybe?) its not too expensive to buy enough for the week, up to a maximum path length (to not starve on the way). If thats not possible go to cheapest inside that area.

#5polyfrag  Members

2468
Like
0Likes
Like

Posted 25 January 2014 - 06:43 PM

The game is an RTS. The simulation shows what happens if all agents behave in the best way to further their interests, including perfect information. Rather, it's meant to be a sandbox for testing different economic policies. With Internet nowadays most information is available. The workers buy a supply that lasts them for a while. If I simulated information dissemation between workers, on what condition would two workers share their information? Then if a corporation decides to lower prices they can pay to post ads on other buildings.

If I don't include the amount of food that is to obtained at a shop in the formula, the cost might be for a single unit of food,

1 / ( T + C )

Then time (measured in terms of money) overshadows cost.

3523
Like
0Likes
Like

Posted 26 January 2014 - 12:06 PM

I'll let someone else recommend a book that could be useful here.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.