Ruleset Modeling Language - Discussions
September 10, 2010, 04:38:36 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The new website and forum are up.  Beware that they are still teething however.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Economic and server balancing  (Read 378 times)
daraknor
Build A World
Sr. Member
*
Offline Offline

Posts: 441


View Profile WWW
« on: November 08, 2007, 02:30:04 AM »

This is a repost of my comments in another thread. Trying to organize my responses so all AI topics can be viewed in one cohesive location.

I'm months late  but I'm catching up because I don't feel like writing a protocol for work at the moment. Not only was my name invoked, but AI and a few things I'm very interested in. Here is the post I'll be focusing on most strongly when I reply:

We may build a lovely world(s) however we shouldn't enforce travel, In a Zone concept - people are confined and action is evident because of the lack of space. In larger MMO's if population drops it feels like the world has died. If however actions change but are focused more around meeting spots then people know where to go and that something interesting is bound to happen. Things then become easier on the AI designer because if they use weighted areas to draw npc's from one location to the next there is a clear area to focus npc's on... the npc's are more available and therefore make for more action.

My answer would be "a number of ways really". from past mmo games we have seen...

Characters that live out routines throughout the cycle of a day - Oblivion
Spawned attacks on towns - Everquest 2, Most MUDS
Sieges - Dark Ages of Camelot, Lineage
GM/Admin scripted or live events - Everquest, Most MUDS
Towns as Meeting places to Instanced dungeons - D&D Online, Guildwars, Fate

just some examples there obviously there are more.

On a smaller scale there is also things that can be done to make a world more life-like.. things like random emitters... a burst of quail from some grassy area, a cloud of gnats or a small cyclone of leaves could be spawned randomly. Weather effects of course... flooding.

Han
First of all, the AI is sectional and regimented. You use different admin panels to accomplish different things as "Spawned" events. In addition, each AI panel becomes available to the AI itself. A squad leader has access to "Group AI", a general has access to "Organization AI", a warlord/king/etc has access to "Empire AI". In addition, Gods might have access to "World AI" and spawn weather. Now there will need to be some "economics AI" accessible by merchants, caravans, etc. The economics AI would help with balancing cities. Let's say you need to pay a fee to access your bank? Well, the major city might have the highest price for that service. Basic Supply vs Demand curves, and they might hire more NPC helpers to assist with the load. The same is true with blacksmiths. Since AI NPC may be in direct competition with PC players (and NPC may hire PC in NPC mode with wages or in PC mode with quests) the supply and demand curve is especially important. How would this translate into gameplay? Well if the blacksmith has 12 horseshoes and people want to buy 100, the price is going up. If someone grinds out 100 horseshoes and sells them to an NPC, they will get a very good price at this time. If they do it when the market is slow, the price will not be so good. Yes! that will lead to people buying horseshoes when the prices are low and selling them back when the prices are high... but the blacksmith should catch on to the game too Wink

How does this help distribute load? well first of all people who are poor will likely stay poor in major cities. People with money will find more services in cities, but pay a premium for it. If you're poor, head to the frontier! Tada. Zone balancing.

Now about scheduling and so on... There are a few things I would love to see implemented. First of all is a concept of time, so there will be a "schedule" in a way. Sleep should be needed by everything alive. Yes, the monsters should sleep too.. .but some would be nocturnal and maybe undead are exclusively nocturnal. Second, everything should have some sort of home, feeding ground, watering ground, etc. Travel should ideally be necessary. YES that creates a lot of pathfinding, but I hope to cache path info and run things server side where possible. E.g. Instead of pathfinding over 95% of pathing will be waypoint lists.

Now... on to things like city sieges. In order to make a bunch of small organized attacks against a town, spawn a squad leader. He'll start attacking the town or travelers. Travelers and town will complain, resources will become more scare and both an economic and military response is necessary. The raiders probably wouldn't use resources as efficiently, and they would degrade faster. (There won't be a HUGE pile of resources just because they took a huge pile. Degradation rate is a fixed variable, or dependent on skill. This is an economic balancing issue, as is the location and number of squad leaders spawned.) To attack larger towns, you need a general controlling a few squad leaders. If a warlord/king is spawned, well then... you might loose towns and have them turned against you, you might need to free slaves and do sieges or defend against sieges. With no players in game, territorial battles should still go on between NPC when players aren't looking. This is also a good way to kill macroers. "I thought it was safe in my house... and my ghost spawned in a crater!"

Very key point: quests should be generated by both PC and NPC using the resources available to them. If there is a strong need and few resources, more faction or experience could be dynamically assigned. "We're poor and you saved us!"= more faction regardless of difficulty. I know there is discussion at not having EXP at all, but I'm sure some equivalent could be composed where the player's toon could be rewarded without using resources or faction.
Logged

Edward
Project Angela Team
Sr. Member
***
Offline Offline

Posts: 443


View Profile
« Reply #1 on: November 08, 2007, 11:19:59 PM »

NPC may hire PC in NPC mode with wages or in PC mode with quests)

And perhaps vice versa as well.

Quote
Yes! that will lead to people buying horseshoes when the prices are low and selling them back when the prices are high... but the blacksmith should catch on to the game too

Actually, the blacksmith might not mind.  The people buying and selling horseshoes are providing a valuable service in the form of inventory storage.  (Presumably they can't carry 100 horseshoes around and must find a place to store them, and also accept the risk of theft or casualty.)

Quote
Now about scheduling and so on... There are a few things I would love to see implemented. First of all is a concept of time, so there will be a "schedule" in a way. Sleep should be needed by everything alive.

And living creatures should age.

Quote
Second, everything should have some sort of home, feeding ground, watering ground, etc. Travel should ideally be necessary.

Realistic territories and migration for animals.  Smiley  I'm looking forward to helping with this.

Quote
Now... on to things like city sieges.

The sophistication and knowledge level of both besiegers and defenders should depend on the level of cultural and technogical advancement.  The Mycenaean Greeks are more advanced than the early Sumerians, but medieval Europeans are much, much more advanced than either.

Quote
Very key point: quests should be generated by both PC and NPC using the resources available to them. If there is a strong need and few resources, more faction or experience could be dynamically assigned. "We're poor and you saved us!"= more faction regardless of difficulty. I know there is discussion at not having EXP at all, but I'm sure some equivalent could be composed where the player's toon could be rewarded without using resources or faction.

There are many ways to motivate PC's.  I'm sure we can come up with creative ideas.
Logged
daraknor
Build A World
Sr. Member
*
Offline Offline

Posts: 441


View Profile WWW
« Reply #2 on: November 09, 2007, 01:38:24 AM »

Actually, the blacksmith might not mind.  The people buying and selling horseshoes are providing a valuable service in the form of inventory storage.  (Presumably they can't carry 100 horseshoes around and must find a place to store them, and also accept the risk of theft or casualty.)

I agreed very strongly with all but this one, which I feel I should explain more about. We might agree, not sure. Let's say that the blacksmith buys horseshoes during the day and sells them at night from one character. Meanwhile, some novice is pounding away making horseshoes as much as possible. The blacksmith can make money both times as long as the market is nearly perfectly liquid. In such a market the broker is earning the difference between bid and ask prices. Now at all times during the day the blacksmith is likely to sell and buy horseshoes at the different bid (how much he'll pay) and ask (how much he charges) prices. If the broker doesn't sit on any inventory because he can always sell everything as long as the market is maintained, then he makes money buying and selling at any price. (Like a foreign exchange broker) If on the other hand he needs to hold inventory, then he becomes more like a shopkeeper who buys product. If he buys and sells but has a central market price dictated by overall demand, then he is like a level 2 stock broker.

Let's assume he has an inventory with unlimited capacity. At any capacity, he wants to make money off each horseshoe. If he buys 5@10g and sells them, he needs to sell them for more than 10g. We'll assume he prices them at 12g. He does need to be aware of his different buy rates and sell rates. The more he is buying and selling in quantity, the more he is earning spread. If his inventory is constantly growing, he needs to be careful that he is not heavily invested in horseshoes above a certain price. If 60% of his business is selling horseshoes at 12g, he probably shouldn't hold more than 60% of his inventory buying at 10g to sell at 12.

So lets say some people figure this out. Here is the exploit: buy horseshoes until the price goes up. Sell as many horseshoes at the higher price as you can. Wait and do it again in a few hours. Why does this work? because you've let everyone else absorb volume up to the price points and now you earn the higher rate. There are a couple ways to close this exploit, one of them being to have static prices based on inventory quantity. The bid/ask spread would probably need to increase drastically as he gets more and more inventory, which is counterintuitive.

Maybe the blacksmith should pay under the least he can sell for, and sell for more than the most he paid for? I think this would cause the same sort of inflation to the masses I mentioned before - while someone else walks off with a disproportionate amount of cash each time they have some goods to sell. Find a low price and just empty them out, then eek them back into the market. I suppose that would be allowed as long as price is based on inventory costs, and not pure demand.

If a pure demand/supply market exists, then I might be able to make money making sure everyone has similar quantity in stock. I don't think that's a bad thing, but some markets might not be able to pay as much. There is the whole Adam Smith's Wealth of Nations bit to take into account. If iron is cheap, horseshoes might be cheap.

I'm not sure, it is too late to think straight. Smiley The likely answer is that the algorithms should be available to economists so they can make their own answers and see how well they perform. Any dynamic pricing structure for NPC will probably work better than a biased static pricing structure. Inflation should go both ways...
Logged

Edward
Project Angela Team
Sr. Member
***
Offline Offline

Posts: 443


View Profile
« Reply #3 on: November 10, 2007, 01:10:31 AM »

Let's say that the blacksmith buys horseshoes during the day and sells them at night from one character. Meanwhile, some novice is pounding away making horseshoes as much as possible. The blacksmith can make money both times as long as the market is nearly perfectly liquid. In such a market the broker is earning the difference between bid and ask prices. Now at all times during the day the blacksmith is likely to sell and buy horseshoes at the different bid (how much he'll pay) and ask (how much he charges) prices.

I think the details will be world-specific.  The economic system in a medieval village will be quite different from that in an interstellar empire.

The blacksmith shouldn't always make money.  Sometimes he'll lose money, and he may even go out of business.

He will probably buy at a higher price from people he knows and considers reliable sources.  If PC's just show up and start selling horseshoes, the blacksmith may be reluctant to deal with them.  He'll wonder if they're trustworthy and if their products are any good (unless he knows they bought the horseshoes from him this morning, or recognizes them as the work of the blacksmith in the next village).  Also, the market probably isn't very liquid, and he'll be reluctant to take on too much inventory.  He won't be worried about running out; that happens all the time, and when it does, he just makes more (and customers just have to wait).  He will only buy a lot of horseshoes if he has a large order, or knows he will have one shortly.

You're probably focused on more advanced markets than the medieval village.  In Byzantium, or in an interstellar empire, there would be more liquidity, and exploits would be more practical.  Of course, the broker would also have better knowledge of the market, and banks and governments would be more sophisticated.

Quote
Let's assume he has an inventory with unlimited capacity. At any capacity, he wants to make money off each horseshoe. If he buys 5@10g and sells them, he needs to sell them for more than 10g. We'll assume he prices them at 12g. He does need to be aware of his different buy rates and sell rates. The more he is buying and selling in quantity, the more he is earning spread. If his inventory is constantly growing, he needs to be careful that he is not heavily invested in horseshoes above a certain price. If 60% of his business is selling horseshoes at 12g, he probably shouldn't hold more than 60% of his inventory buying at 10g to sell at 12.

So lets say some people figure this out. Here is the exploit: buy horseshoes until the price goes up. Sell as many horseshoes at the higher price as you can. Wait and do it again in a few hours. Why does this work? because you've let everyone else absorb volume up to the price points and now you earn the higher rate.

In a large trading center, I assume they're buying from several merchants and selling to several others.  Of course, prices will vary from merchant to merchant, so they'll need to buy from merchants with slightly lower prices and sell to those with slightly higher prices.  They'll need to have contracts, because the merchants won't want to do large deals without them.  (Hence they won't be anonymous.)  They'll also need a warehouse (or several warehouses) to store all the horseshoes they'll have to buy to move the market.  They'll need to hire wagons and wagoneers, hire guards, and pay taxes.  (If they set up in business as brokers, they may just deal in contracts and avoid inventory, but this has its own set of problems.)

They may very well be able to buy enough horseshoes to move the market, and then sell them at a profit.  They may even be able to corner the market and make a killing.  I don't see this as a problem, as long as it's done realistically.  It won't be easy; it will involve a lot of work.  And it shouldn't be common, simply because there shouldn't be many people who can afford all those horseshoes.

If it isn't a lot of work, or if there is too much cash in the economy, then the world builder hasn't built a very good world.

PC's who can't actually move the market may try to buy and sell to take advantage of market fluctuations (day trading in horseshoes, essentially).  I wouldn't object to this, but there should be a good chance of losing money.  Timing the market should be as difficult as it is in the real world.

I'm probably missing some things here; I don't have much experience with virtual economies.  And I don't know how much is practical for the AI.  Still, I don't think we should prevent people from buying goods to drive prices up and then selling them at the higher price.  This is realistic; people have gotten rich doing it.  PC's should be able to get rich doing it, too -- if they can manage it realistically.  We just want to make sure it isn't too easy.

Quote
Maybe the blacksmith should pay under the least he can sell for, and sell for more than the most he paid for?

Well, he should try to, at least.  Sometimes he may guess wrong and lose money, so he'll probably be pretty conservative.  He has to have income, so he has to sell product, which means he can't set his own prices.

Quote
I think this would cause the same sort of inflation to the masses I mentioned before - while someone else walks off with a disproportionate amount of cash each time they have some goods to sell. Find a low price and just empty them out, then eek them back into the market. I suppose that would be allowed as long as price is based on inventory costs, and not pure demand.

I think it would be a combination.  Merchants have to sell; they need income, and have limited shelf space, and some inventory will spoil.  But they will try hard to avoid selling at a loss.  In most cases they will prefer too little inventory over too much.

Quote
I'm not sure, it is too late to think straight. Smiley The likely answer is that the algorithms should be available to economists so they can make their own answers and see how well they perform. Any dynamic pricing structure for NPC will probably work better than a biased static pricing structure. Inflation should go both ways...

Sounds reasonable.  We'll probably need to experiment.  Which is a good argument for periodic resets.  Smiley
Logged
daraknor
Build A World
Sr. Member
*
Offline Offline

Posts: 441


View Profile WWW
« Reply #4 on: November 10, 2007, 01:46:22 AM »

Yes, the knowledge of markets should change as the level of technology changes. I brought up the topic for two reasons, one is being auto correction of very strange economic flaws. The other is a discussion of techniques for autocorrection. Playing the market happens, I knew people who just sat and played the market in Kingdom of Loathing and made a lot of money. I did something similar in World of Warcraft, my little level 5 gnome was the only character on that server and I had over 200 gold. I only played small ticket items, never really shifted into big ticket trades because I didn't know what a good price for them was. I mostly traded copper bars and linen to start with, but very quickly I was buying and selling enchanting supplies. The best money maker in WoW (aside from being female) was disenchanting. Eventually markets stabilized some, but with a large quantity of end use materials the prices varied drastically. Consumables had the most long term value, everything else was outpaced by quest rewards and drops.

Mixing static and dynamic economies was done in UO and became a horrible failure. Eventually they removed the underlying resource market for spawns and just turned on a money/resource faucet. Hyperinflation came soon after, but the game was playable and people weren't super poor.

As for our friend the Blacksmith, I think he should always make a gross profit on every sale, but maybe not enough to cover his expenses of food and labor (net profit may be more elusive). If NPC are reluctant to take on inventory, the economy becomes very strange.

One of the key reasons a realistic model of resources didn't work in UO was because the world was so flat. I could visit 10 merchants in 10 cities in about one minute. I remember finding that all of the reagents were sold out for spells, so I would go on a trip to find some. This involved having a stack of teleport runes that I would go through very quickly, casting a spell on each one so I was standing directly in front of the merchant. Worked well, later they changed the model. If travel is difficult, then you have caravans as a viable form of travel. Making teleporation expensive doesn't solve the issue, people will still pay. In EQ1 there were basically port bots that would move people around the world. The cost was expensive, but that was simply reflected in the price. When the world becomes flat, markets become flat too.

It sounds like we need to have at least a half dozen pricing models, and then I need to make it easy to switch between price models for each NPC when the game designer allocates an Economic AI.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!