Monday, March 31, 2014
Amazing day for the LT economy. Shame that I didn't get the video quite wrapped up, but at this point, I'm feeling an odd combination of sorry and not sorry. Like...sorry, I know the video is two days late, but...not sorry, LT is getting so much better so rapidly
Hopefully if you're reading you've already seen on the forums or KS that
I did indeed request one more day
But! Today I will at least not skimp on the dev log
Distributed Double Auctions for Limit Orders on the Market
So I found this whitepaper on some computational game economics algorithms for modeling situations that...oddly...seemed.........almost exactly like what I've got going on here with markets and NPCs and tasks
Really, this couldn't have come at a better time. It came at a moment when I had already acquired enough of the right ideas to really understand what was going on in the paper, but had not achieved full economic clarity, hence, gained awesome insight by reading it!
One major thing that the paper helped me understand is the structure of a market and how to resolve orders. I had come quite close to this structure using just intuition, but wasn't quite there. Now I understand - commodity markets, at least for the sake of LT, are comprised primarily of limit bids and asks. E.g., "I want to buy X of Y at no more than Z credits per unit," and "I want to sell X of Y at no less than Z credits per unit." I also read a nice, simple algorithm for resolving sets of bids / asks known as 'distributed double auction.' It makes a lot of sense.
And all of that is now implemented! Which means the LT markets are now 100% real bid/ask-based markets. Now, for the person who does not care much about the economic dynamics in the game, they will never have to worry about this. A 'regular' player is probably just placing market orders at the current trading price, meaning the trade goes through immediately and the whole process is hidden from the user (AFAIK this is how it works in EVE Online, for example). I want to buy some ammo, I click buy, select a quantity, see a total price, and hit a shiny green button (in theory - the trade interface is not yet a reality). As a non-economically-inclined player, this is all very easy and standard. But behind the scenes, the price is calculated from real ask limit orders that have been placed by real NPCs. The converse is true when I want to sell my goods. Behind the scenes, the sale is being fulfilled with bid orders that have been placed on the local market. Hence, everything is 'real,' and the market will be subject to all the usual supply / demand effects, and both the local and global economic dynamics that you would expect of a real market economy.
I guess it goes without saying that, for the economic power player, these markets are going to be endless sources of fun
The market automatically computes and stores historical data like bid & ask volumes, trade volume, average trade price, average bid & ask price, etc. You have all of this data at your disposal to understand exactly what's going on in the market. You'll be able to very easily tell if a good is volatile, what the bid/ask split is, recognize supply/demand differentials by looking at the volumes, and figure out exactly how much of any given commodity you should be trying to trade based on the trade volumes. All I really need now are a few cool graphs to show all of this
Very, very cool stuff. I'm not an economics guy, nor am I particularly inclined toward trading in space, but I'll be the first to admit that this really gets me excited...!
Progressive Greed for Robust Bid & Ask Price Choosing
I mentioned yesterday that my biggest hangup was figuring out how to compute prices based on supply/demand. With the 'real market,' it's no longer as much of an issue. What is still an issue, though, is figuring out how to place orders when supply or demand is lacking. How to get everything 'started.' At some point, there has to be a 'first trade' for any given resource at any given location. As I've mentioned before, that first trade is a little weird and awkward, because it comes at a time when there is either no supply or no demand, or the bid / ask split has not converged enough yet to facilitate the first trade. Usually it's the former, which is really the awkward case. I want to mine some ore here, and I'd like to sell it there...but there's no established market for this ore at that location. Can I still sell it? Surely. It has value there. But how much? Hard to say without an established market. I will have to make an educated guess, and then wait and see if someone comes along and fulfills my order. Same thing goes if I want to acquire a good from a market where no supply exists.
I have implemented a fairly nice algorithm for solving this today and giving NPCs a nice initial guess
I won't explain it in detail, but it works off of the principle that, in the beginning, people should be minimally greedy to establish the fledgling market dynamics. Once the markets are established, they can become greedier and greedier until an equilibrium is achieved, where everyone is profiting maximally.
...
Well...I had two more sections planned but...I've already written so much and need to get back to coding! So I'll just leave the headings there so you know what else I did today
Percolation of Resource Value Over Economic Nodes
NPC Project Profitability Analysis
Video coming at you tomorrow! For real this time!
PS ~ You've probably noticed something a bit strange about the forums
No need to worry, only a temporary April Fools measure courtesy of a particularly cheeky moderator...
PPS ~ Just to be clear, I know this is April Fools' Day and all, but this is, sadly, not a joke. The update will not come until tomorrow. Sorry!