Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: No base costs for anything.  (Read 3537 times)

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
    • Email
No base costs for anything.
« on: February 17, 2012, 05:48:54 PM »

Given where you plan to take starfarer
Quote
Trade goods, run mining operations, build industries — and defend your interests
Having a base cost for any good is a bad idea. If you use logic like that, you can't simulate all kinds of interesting economic phenomena like monopolies,  or depressions.

Egosoft does this with x3, they're really very proud of their "economic" simulation, the problem was if you actually run it, the whole thing blows up. even buying at 150% and being sold at 50% of the base cost, a fundamental resource just was never worth hauling, so nothing ever got made. (this was in X3, in X3:TC and X3:AP they fudged it into working)

The price of a unit should be dictated by:
                  Supply                    Demand
Current   how much entities have it in supply?       VS     how much entities need it right now?
Future   how much of it, and its prerequisites,
are being manufactured?
how much manufacturing is being
done with it as a prerequisite?

No clever AI needed, this is just number crunching. Those rules basically guarantee a stable economy. Automatic pricing.
Logged

Icelom

  • Commander
  • ***
  • Posts: 121
    • View Profile
Re: No base costs for anything.
« Reply #1 on: February 17, 2012, 06:00:47 PM »

Eve online is a good example of the economy you are looking for..

However this is a single player game... meaning there is only you with "real" supply and demand all the rest is artificialy created by the dev team anyways. So infact there would be extreamly complex ai needed in order to have them say change production to more lucrative trade goods or what not, and lets say you did code that in then everyone would just switch to the most lucrative until everything was equal profit across the board and boom you have a base price, unless you code in fluctuations in demand or supply ability, but then again thats not real at all. Again its single player so all the demand and supplie is arbitrarily decided you cant have a real econemy.
Logged

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
    • Email
Re: No base costs for anything.
« Reply #2 on: February 17, 2012, 06:08:48 PM »

Supply and Demand is not a real economy. With base prices, 2 bad things will happen: Either you mess up and the economy blows up, or you don't mess up and it never changes.

There is also nothing complicated here. I'm curious as to what you mean "Complex AI needed in order to have them say 'change production to more lucrative trade good' ". You just wrote it. That wasn't very hard was it?
Logged

hairrorist

  • Commander
  • ***
  • Posts: 192
    • View Profile
Re: No base costs for anything.
« Reply #3 on: February 17, 2012, 06:55:41 PM »

But that's not how you talk to computers.  The actual logic behind a statement like that is quite complex.  That's why there are entire universities devoted to trying to understand exactly what logic does generate market behaviors.

Also: why do we need a microcosmic economic sim in a single player game about lasers, when a magical black box economy can provide the same kind of economic stability needed for a game to function? Economies are nearly impossibly complex.  At some point any sim becomes a black box algorithm.  No matter how accurately you try to model complex systems, you reach a point where you have to start guessing at the equations behind it, just plug in some data and then trust that your sim is doing its job.  How do you tell if the sim is doing its job?  If its behavior approximates what you'd find in a static model abstracted at a much higher level--ie, the kind of 'fudged' economies we find in games.

Those 'simple' rules are literally a textbook definition of a complex AI decision.  Try to break them down into actual units of logic, concrete chunks that can be turned into code.  Try to do it, by the time you're finished I'll have your Nobel nomination greenlit.
« Last Edit: February 17, 2012, 07:00:15 PM by hairrorist »
Logged

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
    • Email
Re: No base costs for anything.
« Reply #4 on: February 17, 2012, 07:11:08 PM »

Quote
That's why there are entire universities devoted to trying to understand exactly what logic does generate market behaviors.
and you think those 4 rules will generate that behavior? It's auto-pricing, not an expert system.

The only thing this does is set the prices. Supply and demand is not a real economy, I didn't ask for that. Supply and demand is a fudge. It's just a fudge that will generate a stable economy. It really isn't as complex as you're making it out to be.
Logged

hairrorist

  • Commander
  • ***
  • Posts: 192
    • View Profile
Re: No base costs for anything.
« Reply #5 on: February 17, 2012, 07:17:53 PM »

Of course no system will produce that behavior.  That's the point.
My point is that its just another black box algorithm that you want to use to generate some values that could be generated in much simpler ways.
Its just abstracted at a different level.

Writing code solutions that adheres to 'simple' rules is way more complex than you're giving credit for.
« Last Edit: February 17, 2012, 07:32:58 PM by hairrorist »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17100
    • View Profile
Re: No base costs for anything.
« Reply #6 on: February 17, 2012, 07:27:45 PM »

This is a really interesting topic. I have to admit, I haven't put too much thought into the specifics of the system - but ideally, it *would* be self-regulating. Of course, there's a pitfall there too - if it's really good at regulating itself, you might have a tough time influencing it as a player.

As far as supply and demand - it's a good starting point, but it gets tricky trying to figure out out future supply and future demand. Also, ideally you'd take location into account - it does an outpost no good if there's no fuel anywhere around for light-years, regardless of the fuel stockpiles elsewhere (which may well be being hoarded for an artificial price increase). In fact, the fuel could be right next door, but owned by a hostile faction. And it could be bought by a neutral merchant and sold to this outpost, so it's not strictly unavailable.

Then there's a question of how often you update prices. If you don't do it with every unit of something sold by the player, you could have a situation where the player can buy/sell the same stack to the same planet over and over, with profit (costs X: players buys, there's less "current supply", it costs >X, player sells, repeat). That's not particularly hard to avoid (most likely with "hacks", whose effect on the overall economy  may not be immediately apparent).

You could punt on a lot of specifics and boil it down to "simply number crunching", but the question is, would that produce a good enough system? My gut feeling is you at least have to take locations and faction relations into account before it does. Maybe level of hostilities in an area, too.

So... well, this bears a lot more thought. I certainly wouldn't describe supply and demand as "simple", though. In the meantime, I'll be watching this topic :)
Logged

arwan

  • Admiral
  • *****
  • Posts: 656
    • View Profile
    • Email
Re: No base costs for anything.
« Reply #7 on: February 17, 2012, 07:57:00 PM »

i think you have to take a LOT of factors into account before you can get a good model going. at least if you want a semi realistic model.. and the more realistic you get i think it will end up getting exponentially more complicated to code. just wrote an entire 3 paragraphs of stuff to describe just one realistic example of how demand and supply could interact with the player in a war zone. needless to say it got so complicated i just deleted the whole thing due to the complexity to visualize something like that.

if you want simple something like X3 is an example of that.
if you want complicated something like eve online even though its and MMO is a good example of complexity to the extreme. (the prices may be set by players for most things but EVE has to create the items in the first place for you to sell so they have a good bit of control over the demand)

preferably i want something a bit more complex than X3. but not so complicated as EVE. at the very least i dont think items in game should have hard set max/min prices but instead prices dictated by a more complex algorithm than X3 where if a station has 50% of its max resources the demand price is 50% of said resources min/max price scale.
Logged
Alex
You won't be able to refit fighters and bombers at all. They're designed/balanced around having a particular set of weapons and would be very broken if you could change it. Which ones you pick for your fleet -out of quite a few that are available- is the choice here, not how they're outfitted.

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
    • Email
Re: No base costs for anything.
« Reply #8 on: February 17, 2012, 09:15:35 PM »

Of course no system will produce that behavior.  That's the point.
My point is that its just another black box algorithm that you want to use to generate some values that could be generated in much simpler ways.
Its just abstracted at a different level.
Yah I agree it's a fudge.
I don't think it's overcomplicated! I think it's the most basic set of rules to automatically set the prices of an arbitrary supply chain.
I can't think of an alternative that would be simpler, can you?

Then there's a question of how often you update prices. If you don't do it with every unit of something sold by the player, you could have a situation where the player can buy/sell the same stack to the same planet over and over, with profit (costs X: players buys, there's less "current supply", it costs >X, player sells, repeat). That's not particularly hard to avoid (most likely with "hacks", whose effect on the overall economy  may not be immediately apparent).

You brought up some interesting points, a few I had thought on already (a few more I had not!) but I couldn't voice any concern as I do not know exactly what your aims are with this game (I only know that right now it's an interesting hybridization of star control and mechwarrior, which was easily worth my 10 bucks)

About the devious player: If a station sells to the point of creating a demand for supply, then the cost associated with that should be passed to the player through the sale. Selling by unit rather than by batch is a simple way to approximate this. (I suspect the formula would be rather complicated though)

However, you are absolutely right to say that if this results in exponential fudging, it will only cause more problems. I believe it can be avoided. It's hard to say what other kind of things might crop up though!

Quote
preferably i want something a bit more complex than X3. but not so complicated as EVE. at the very least i dont think items in game should have hard set max/min prices but instead prices dictated by a more complex algorithm than X3 where if a station has 50% of its max resources the demand price is 50% of said resources min/max price scale.
You and me are on the same page.
Logged

Paul

  • Commander
  • ***
  • Posts: 159
    • View Profile
Re: No base costs for anything.
« Reply #9 on: February 17, 2012, 10:08:01 PM »

I don't see how base prices are a bad thing. Just because a base price is 10 on something doesn't mean demand can't go up to the point that the item sells for 100 or even 1000 in extreme situations.

In reality there are no base prices, but things still end up having a value in relation to other goods. Games use base prices because it's a good way to set that relative value - in general you want precious metals to be worth more than grain. Just because grain has a base value of 5 and precious metals a base value of 500 doesn't mean the grain has to be worthless for trading. Placed with an over abundance of grain might sell it for 1, and planets that are under blockade for months at a time and starving might pay 100 or even more for it. The precious metals, on the other hand, might provide a steady profit of 10-20 per unit buying them from mining colonies and selling them to industrial centers.

The main thing isn't that the game has base prices - it's how the simulated economy manipulates those base prices.

I've always thought it would be cool for a game to simulate it on a local supply/demand level with adjustments for other nearby colonies, safety of the trade routes (pirate activity, including the player's actions for better or ill, would influence this), and the overall supply/demand in the entire sector. Some trade goods wouldn't be affected as much - luxury items and such - but necessities like food could skyrocket due to shortages caused by various things (blockades, pirate activity, local disasters, etc). All the better if it actually simulated AI cargo ships (ones the player can raid or offer to escort) delivering goods from place to place.

The player could be given opportunities to react to things like running a blockade to deliver needed food/medicine, flying through a dangerous trade route that's being preyed upon by a notorious pirate group, or even capturing a colony's food supply by raiding the supply fleet then waiting and selling it to them at exhorbitant prices - although that wouldn't make you any friends. Even better if pirate raids and blockades and such things are random events that happen and can be affected by the player.
Logged

Icelom

  • Commander
  • ***
  • Posts: 121
    • View Profile
Re: No base costs for anything.
« Reply #10 on: February 18, 2012, 11:56:55 AM »

The real issue is if you make a very strong self regulated virtual econemy then the result would be every single item has the exact same profitabilty because the AI is so strong.

Real world econmies have all kinda of crazy factors involved (like human fear and greed) that just cant be replicated effectivly. So its really easy to say just make something cost more if a station has less of it. So the only way you will make a real profit is chasing around trade fleets that are purchasing items and then selling them to the station right after before another AI convoy comes in.. but that makes no logical sense either because if the station sold off 100units why would it by back that same 100units for more simply because now it has less.

A good example is say a station has
100 units of X, being sold for 10credits per unit.
you purchase 50 units of X for 500credits.
All of the suden the station only has 50 units of X so its price goes up to say 15credits per unit.
You just simply sell it back all your units of X for 50% profit.

So to make what you said work you have to code in a delay for the price to go up, or artificaly hold it down for the person who purchased the X. But how long of a delay? can the player just hord what they purchased until the delay is up and redock if the econmy has not self regulated yet.

Furthermore you would have to code in some kind of market "unawarness" into the AI or it will just balance everything out because it knows whats needed where and what has to much where. Part of how real economies work is purchasing something for less then you can sell it for because other people dont know you can purchase it for less. The rest is simply built off human fear and greed.

The op is oversimplifing how complicated economies are.... to be honest i dont think its possible or even feasable in a single player game to have an econmy that does not have built in prices and trade deficits that the player can use (they can be varibale of course) but to simply make it a self correcting "real" economy is to complex or not fun as everything becomes the same profit as everything else.
Logged

Ghoti

  • Captain
  • ****
  • Posts: 283
    • View Profile
    • Email
Re: No base costs for anything.
« Reply #11 on: February 18, 2012, 05:04:27 PM »

A good example is say a station has
100 units of X, being sold for 10credits per unit.
you purchase 50 units of X for 500credits.
All of the sudden the station only has 50 units of X so its price goes up to say 15credits per unit.
You just simply sell it back all your units of X for 50% profit.
My first answer to this was that the cost of having low supplies (or the discount of high supplies) should be passed on in the price. That was a good answer for an entity that both bought and sold.

It's also not as big an issue as you think, most industrial entities won't buy and sell the same unit, they would buy one unit and sell another. So it shouldn't be a consideration.

Quote
...or not fun as everything becomes the same profit as everything else.
Are you SURE that's what would happen? Is that in contrast to setting a base price for everything and only having specific things be profitable?
Logged

Paul

  • Commander
  • ***
  • Posts: 159
    • View Profile
Re: No base costs for anything.
« Reply #12 on: February 18, 2012, 07:24:43 PM »

The real issue is if you make a very strong self regulated virtual econemy then the result would be every single item has the exact same profitabilty because the AI is so strong.

You could just make a good, balanced system like that - then throw in random events that throw things out of whack and provide opportunities for savvy players. For instance, a plague hits a world and they are desperately needing medical supplies. A player might be told about this on some kind of news network when he lands on any planet or station. NPC ships would react and begin bringing in supplies, but to meet the demand big fleets are necessary. The big fleets may already be on the way, but before they arrive the player might zip over in his fast ships with a load of supplies and meet short term demand at a big profit before the AI has fully met that demand. Same could be applied to other types of disasters or booms (like a sudden demand increase for a certain type of luxury good has left planet A with a shortage, or the market dropping out of a certain good on a world making prices dip down - if you beat the rush of AI buyers you might get a great deal).

Can also have other things that increase profit margins but also increase the difficulty of making the trip, giving the player an option of risky trading. Say pirates are killing cargo ships in a major trade route between two systems that do a lot of trading with one another. Pricing disparity would result due to lack of cargo ships willing to make the dangerous trip. The player might step in and make that trip with escort ships, fight some pirates on the way, make good money on the cargo run - and maybe capture a pirate ship to boot.

Other trading opportunities to present to a player might be smuggling illegal goods (where police activity and smugglers being captured might drive up their prices - leaving open crazy things like hunting down smugglers for a while to cut down their number and make illegal goods prices skyrocket, then do some smuggling of your own), running blockades to deliver needed supplies to military bases and blockaded planets, etc. Or the player could simply load his ship up with a bunch of goods and make nice, safe trade runs between two safe systems - he just wouldn't make as much.
Logged