Return to “Dev Logs”

Post

[Josh] Friday, April 20, 2018

#1
Friday, April 20, 2018

Yet again I bid you a happy Friday, fellow pilots!

It's been a fun two weeks. I've concentrated my efforts entirely on the game simulation and high-level AI, in pursuit of a working economy, as per my last log. I'm pleased to report that, after two weeks, we do indeed have a small but working economy happening.


Major Additions Since Last Time:
  • System 'economy caching' ported & re-worked from old code; helps AI agents reason about job and market availability within a system or zone
  • High-level AI reasoning; forms the basis of AI players' ability to dynamically choose a profession based on profitability analysis
  • Basic colony population dynamics (helps create a time-varying economic sink/demand for basic goods, thus seeding the system economy)
  • Market mechanics now fully-implemented including escrow, on-station/on-colony storage lockers for temporary storage of bought goods or canceled sell orders, etc etc.
  • Limited implementation of Zones -- already in-use by AI for reasoning about job locations, but no zone gameplay mechanics (ownership, laws, etc.) yet
  • Happened upon a new algorithm for individual asteroid/ice/debris/whatever placement within fields, resulting in much more natural looking fields (no longer are they obviously ellipsoids :oops: )

At this point I've ported most if not all of the important simulation & high-level AI features that were previously implemented, meaning that I'm now getting to think about and solve new problems -- a welcome departure from porting! The next step for me is smoothing out the volatility of the economy and AI behavior. It's somewhat interesting that periodic/cyclic patterns always seem to emerge in my basic simulated economies when AI agents don't have access to historical data. That result is pretty obvious I guess, but still, interesting to see "those who don't remember the past are doomed to repeat it" play out so literally on-screen. The cyclic behavior can be seen as far back as Development Update #15 (March 2014!), when I introduced colony dynamics and AI job switching for the first time. I've never done a great job of smoothing over this volatility before, but I'm quite convinced that it's a pretty simple matter of factoring in historical data (EMAs mostly) + having a distribution of various AI behaviors with respect to time scale. Some AI agents should act on fast-moving EMAs, making 'short-sighted' decisions about jobs & markets, while others should act on slow/long-period averages, making 'long-term' decisions -- together, the result is a smoothing of the economy at all time scales.

Here you can see the overly-volatile economy in an 8-planet (the other six are off-screen), 50K AI agent simulation. Notice the jagged population graph as well as the obviously-visible 'flocks' of blue AI ships, which are due to market conditions changing so rapidly that thousands of AI units decide to change jobs all at once, hence the 'mass migrations.' Of course, so many units changing behavior all at once will cause yet another major shift in market conditions later on, which will, in turn, produce yet another flock of dissenters, and so on, ad infinitum :geek: With historical averages factored in, this would be a different story.

(NOTE: I know these screenshots are atrocious, but that's part of the point. When I work on the game simulation, I need to be focused 100% on behavior & dynamics, and 0% on graphics/tertiary concerns! As you can see, that is very much the case here :lol: )

Image

Here you can see how a colony that has just recovered from a population crash (and is about to experience a large period of growth) is attracting droves of water traders due to high demand and correspondingly-high prices. Having no access to historical data, the traders are doomed to oversupply the colony, indirectly setting the economy up for the next crash.

Image

---

I've spent a fair amount of time this week reading papers on market economy simulation (of our own planet, just to be clear). Never before have I really dove deeply into the colony simulation; previous iterations of colony dynamics were still quite placeholder, and really just designed to create an elastic demand for basic goods. The problem of colony simulation is important to me not only because I want the simulation dynamics of LT to create interesting, meaningful behaviors and opportunities, but also because the problem of simulating a colony is precisely the problem of performing a coarse simulation of a (sizable) economy (which is important to us for many reasons, including OOS system simulation and historical simulation at universe-creation-time). Ideally, insights uncovered in my quest to implement a decent colony simulation will bear fruit that can be applied toward the 'big daddy' of remaining problems in LT development: OOS/historical simulations.

Thus far, research has been fairly uninspiring. Many papers in this field address the elephant-in-the-room fact that the field itself has produced models of consistently-poor accuracy. It is not really surprising to me when you look at the models and equations in question :ghost: Lucky for me, I don't care about predicting what will happen to the global economy of Earth...I only care about creating interesting dynamics for fictitious universes! Since I've been having trouble finding inspiring reading on this topic, I would welcome any sources that you guys might know of -- papers, articles, books or the like that you may have stumbled across that have good insights into quantitative models/simulations of global economies/populations/anything interesting. In the end I'm sure my model will end up being simple (like everything I love)...likely just a vector of quantities and a Jacobian of their relationships; but I do like being inspired along the way, and my brain is enjoying getting to read new solutions to new problems again!

---

Going forward, my next steps are:
1. Recording & factoring historical data into AI reasoning
2. Capital Expenditure in AI & simulation (purchasing new ships, building a new station, warp rails, etc.)
3. Information mechanics in AI & simulation

2 and 3 are both highly-unexplored territory for me, so I'm excited to dive in. Information, in particular, is one of the few remaining 1.0 mechanics that really lacks in past or present implementation. I did have information itself implemented in LTC++, but none of the AI algorithms actually used information correctly. The ability of an AI agent to perform a job should depend on whether or not the agent actually knows about the location and/or associated object of the job. In addition, AI agents need to be able to place value on information that 'unlocks' new job/action possibilities, which strikes me as being very similar to capital expenditure in the sense that it's a one-time cost that provides continuous future benefit (it is inherently difficult to formulate a 'correct' value for such costs).

I'm hoping to have all of this (economy, simulation, high-level AI) in good shape by the end of the month or perhaps in another two weeks. That's an ambitious goal, to say the least -- we're talking about a pretty massive chunk of what makes LT LT here. Still, I think it's at least possible to have the framework and general strategies for all of this done by then. Naturally I will have to tweak constants and so forth when we playtest and realize that the AI is actually too smart and is ruining the player experience ( :ghost: :P ), but having all of the algorithmic bits and general solutions in place will certainly make me feel better about remaining dev effort.

That's all for today, back to coding, see you soon o7

~Josh
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: [Josh] Friday, April 20, 2018

#5
So many questions!
- With 50K AI units, will the player be able to have a meaningful impact on the economic dynamics?
- If I destroy some freighters of iridium (for example) will that cause iridium prices to spike?
- If I destroy some iridium-stealing pirates, will that cause prices to fall?
- Will there be an emotional component, such as a new band of pirates arriving causes panic buying causing prices to spike?
- Will there be dependencies, say if plutonium prices spike, it also causes uranium prices to spike (assuming they are substitute products)?
I do not fear computers. I fear the lack of them.
Post

Re: [Josh] Friday, April 20, 2018

#6
Arclite wrote:
Fri Apr 20, 2018 1:30 pm
So many questions!
- (1) With 50K AI units, will the player be able to have a meaningful impact on the economic dynamics?
- (2) If I destroy some freighters of iridium (for example) will that cause iridium prices to spike?
- (3) If I destroy some iridium-stealing pirates, will that cause prices to fall?
- (4) Will there be an emotional component, such as a new band of pirates arriving causes panic buying causing prices to spike?
- (5) Will there be dependencies, say if plutonium prices spike, it also causes uranium prices to spike (assuming they are substitute products)?
Good questions.

1. 50K is significantly more than will be in a true LT system at any given moment, it's just for that simulation test. Realistically more on the order of 100 to a few hundred agents in one system. At that scale, yes, you can have a meaningful impact.
2. Yes, destruction of supply will cause higher prices in the long run. Just be careful not to destroy too much -- if it's not a basic good, remember that the AI can decide to stop manufacturing iridium warheads because it's not profitable anymore, so make sure your little operation doesn't get out of hand ;)
3. Yes. Piracy causes AI asset loss, which gets factored into price estimation. If you make an iridium mining zone safer over a significant period of time, more AI agents will decide to mine there since you have lowered the expected loss of doing so. AI will even pay you to provide safety to a zone via job boards.
4. Panic & intentional irrationality is not a feature. But the AI is not perfect, so it will have its own flavor of emergent 'irrationality,' which by definition is really just 'imperfect reasoning.' You'll have to play to find out what that flavor is :geek:
5. Sure, all such basic behaviors of real markets should occur in LT since it's implementing one.
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: [Josh] Friday, April 20, 2018

#7
Will AI realize things at different points in time? Will there be differing intelligence of the AI? As in, will one company of freighters realize that selling iron is better than selling copper faster than a different company of traders? I feel like that should be something important so that it doesn't turn into a hive mind like mentality of the AI always doing the meta trading/profiting off of various game activities. This may also fall into the mentality of "Someones gotta do it." and by that I mean what will prevent the AI from possibly finding the perfect risk vs reward activity for profit and all of a sudden every AI does the same thing and falls behind in multiple other fields like policing/pirating or something. I hope my concern makes sense and you understand my question.
Post

Re: [Josh] Friday, April 20, 2018

#8
Excellent update!

I have a Terra byte Hard drive that I'd love to fill with colony data files! (It's just a empty trillion word novel waiting to be written) Fill it up with asteroid/planetary/space structure data......Let the A.I. take complete control..... Like a virus! A complete history of the universe on my Hard Drive. Updated with a LTwidget.
Post

Re: [Josh] Friday, April 20, 2018

#9
Busy and away from my computer right now, but WOOT!

I'd like to point out that my idea of Account Intervals was in direct response to the problem of historical simulation.
Spoiler:      SHOW
Groups operate by Account Intervals, blocks of time that allow them to sell what they’ve produced and acquire what they demand. Their success in this is their Account Interval Fulfillment, AIF (LWI 4.1). A Group’s AIF in one interval will define their Share in the next interval. Share growth or contraction is weighted as a fraction of the difference between the past two AIF.

Account Interval Fulfillment is a single value, but it is a composite of different factors for each Group type, and each element having a different weight for that index’s AIF requirements.

If the index remains the same, AIF differences between groups result in a zero-sum cannibalization of the Blackbox allocations by the most successful groups. If the index grew over the course of that interval, the variations will probably still result in some cannibalization, but the absolute allocations will be higher for all groups that they would have been otherwise. The inverse is true if the index shrank. Since LT is a living and chaotic creature, Stable Account Intervals will be rather uncommon.
So basically if you can find a way to summarize, broadly the actions of a given time interval, and the likelihood of different sequences in a string of account intervals, such as a "War" event taking place over 20-50 intervals, with statistical outcomes of battles in the war affecting the next interval of a colony, zone, system, or sector depending on the LOD
Image
The conquest of Nature is to be achieved through Number and Measure.
It's better to have questions you can't answer than answers you can't question.

Imagination Fertilizer
Post

Re: [Josh] Friday, April 20, 2018

#12
RedDwarfMining wrote:
Fri Apr 20, 2018 3:59 pm
Excellent update!

I have a Terra byte Hard drive that I'd love to fill with colony data files! (It's just a empty trillion word novel waiting to be written) Fill it up with asteroid/planetary/space structure data......Let the A.I. take complete control..... Like a virus! A complete history of the universe on my Hard Drive. Updated with a LTwidget.
And with what magic/rack harddisk do you intend to play LT?
A conventional HDD maxes out at around 150-200 megabyte per second (and will average far below that)
(Going by some western digital datasheets, but its somewhere in the right ballpark)

Thats 5-7 seconds at least per gigabyte, times a thousand its 5-7 thousand seconds.
Or one and a half- two hours to load the data in the first place.

I have something approaching the fastest consumer SSD in my computer, with around 3 gigabyte/second read speed.
Thats still 330 seconds, or five and a half minutes of loading.

And the whole point ignores the little fact that theres not enough RAM in my computer to buffer even a tiny fraction of a terabyte.

So its far from possible to real time process that data on a typical consumer level PC (= everything thats not a big data server).

Also, why force the game to use a giant amount of data?
The only thing that could require a lot of data and still be processable would be map data, which you can pull asynchronously and thus not block you for literally hours.
Post

Re: [Josh] Friday, April 20, 2018

#13
JoshParnell wrote:
Fri Apr 20, 2018 12:48 pm
I would welcome any sources that you guys might know of -- papers, articles, books or the like that you may have stumbled across that have good insights into quantitative models/simulations of global economies/populations/anything interesting.
http://fractalsoftworks.com/2017/09/19/ ... -outposts/

http://fractalsoftworks.com/2017/11/19/ ... on-growth/

http://fractalsoftworks.com/2017/12/21/ ... anagement/

http://fractalsoftworks.com/2018/01/03/ ... e-economy/
Post

Re: [Josh] Friday, April 20, 2018

#14
Oh, my. What a wonderful update!

I expect many forum members will be looking for papers that discuss practical approaches to long-term game economies.

In the meantime, I'm interested in learning how the whole-game project is progressing. What's Adam working on? How's the whole game feel with respect to the promises in the Kickstarter? Is there a big-picture plan for getting all the individual features to converge on a Limit Theory 1.0 release?
Post

Re: [Josh] Friday, April 20, 2018

#15
Those are some rad screenshots and this is an awesome update. I'm really excited to play with the markets in game!

I don't have any experience that may prove helpful, but I know someone who does have significant experience using such things in real life over a very long duration. Looking at things from the perspective of the user of a market might be an interesting approach, so I'll see if I can talk to them and report back.
Libertas per Technica

Online Now

Users browsing this forum: No registered users and 1 guest

cron