Return to “Dev Logs”

Post

[Josh] Monday, May 21, 2018

#1
Monday, May 21, 2018

Hi! It's Monday, which means I'd rather write this log than code :ghost:

Since our last encounter, I've been racking my brain on the 'final piece' of the flow economy: capital expenditure (in particular, the upgrading of existing assets and the acquisition of new ones). CapEx is necessary to make the economy grow. We already have a sturdy equilibrium; now we require a force to grow it out of the void.

I must admit, I have been underwhelmed by my search for algorithmic harmony here. I have not had breakthroughs or clever thoughts. That being said, I believe that this is partly because the right answer to the problem is not clever at all, but actually quite dumb. I am intentionally writing this log prematurely so that I may think through it more in words before I implement it.

This problem is, as I mentioned previously, quite difficult. To know the value of a new asset, one must theoretically be able to predict the impact of that asset on the global economy. In particular, one must (again, only theoretically -- in practice we will approach it very differently) be able to predict the impact upon all other agents in the system. Like a game of chess, much of the difficulty in deciding what to do with your turn (or in LT, your credits) lies in speculatively simulating the decisions of others.

The difficult only really manifests at large scales -- a critical fact that I will go on to exploit vigorously in subsequent paragraphs. If we're talking about acquiring a new fighter escort, a new mining vessel, etc. we can make some reasonable estimates about what's going to happen based on what's already happening. Such an asset is only a small 'perturbation' to the existing economic landscape, hence, we do not need to be concerned that adding a lone new ship to our fleet will upset the entire dynamical system and subsequently render our decision wasteful. The same goes for investing in upgrades to existing assets, which is, in practice, even easier: we invest in our most successful assets and divest of those that no longer justify their upkeep, e.g. upgrading our prized bounty fighter's weaponry, hiring an escort wing for a mining barge that has struck diamond, selling off an old battleship that hasn't seen action in a year, and so on.

Now, consider the construction of a generic trade station. Or of a factory. Or really any such 'large' asset. The situation is not so easy. By their nature, such assets have the potential to disrupt the whole of the local dynamics -- they are more than just perturbations! Following this line of thought and trying to solve the problem of "should I construct a trade station here" in an algorithmically/mathematically satisfying manner is a great way to drive oneself to madness and computational despair as the recursion unfolds before one's eyes :) But fear not: if stations were made of sand, perturbations would mollify all our angst.

---

Perturbative Quantum Flow Economics
(Look, sometimes I just want to sound fancy, alright?)

Chris Martin wrote:Oh but if you never try, you'll never know
Just what you're worth

Suppose that, instead of building a large trade station, you built a tiny one. Let's say, for the sake of discussion, that you built a single 'quantum' of trade station (although it's not important for this discussion, we could rigorously define such a quantum as, for example, the capacity to handle one transaction per unit time, or perhaps the capacity to handle the transaction of one unit of matter per unit of time, etc...). It would barely impact anyone. Barely.

However, if this capacity for handling transactions is valuable at the spatial location at which we placed our trade station quantum, then we will, in fact, see it being used. The AI is constantly looking for ways to optimize economic 'pressure,' as discussed in previous logs. If that transactional capability presents an opportunity to do so, then it will be used, despite being a small opportunity. We will see, for example, one miner choosing to drop off at our station instead of a further destination, and perhaps another AI ship choosing to trade between our station and another node in the economy (to balance the flow). We can then see, via flow measurement, that our station is being used! Thus, by introducing a differential change to the system, we have extracted a measurement of the change's differential value. And that's all we need :geek:

You see, by taking our purchase of a new asset into the domain of the quantum -- that is, by making the smallest change that it is possible to make to the system, what we have actually done is converted the problem of reasoning about a new asset into the problem of reasoning about an existing one, making the assumption that it is effectively 'free' to purchase a single quantum (minimal discrete unit) of any given asset (this assumption is important and I will probe it further later).

Now we will either kill off our micro-station, or grow it, based on the value measurement obtain from flow data. The algorithm for doing so is the same one that we will use to upgrade any other asset. Eventually, if we continue investing in our station, we will reach a critical point at which additional capacity for transactions will remain unused due to providing no further benefit to the system. Our station has thus reached adulthood and we may leave it be :) It is as though our little quantum station feeds on economic flow until it has reached the limit of its usefulness, at which point it ceases growth. It does not have to be a station; naturally this logic extends to any asset, although the trick of breaking down any given asset type into a single 'quantum' of sufficiently-small size is non-trivial.

But what if the station is in a suboptimal location? Sure, maybe it was viable to put it at X, but what if having put it at Y would have made everyone's life even easier? I claim that it doesn't matter! Here's the beauty: sooner or later, another perturbation will come along, and if it's better than our station, we will slowly-but-surely lose business to it. Sooner or later, optimality will be evolved naturally through competition. Even if our station wasn't optimal, it was good enough to survive, and that meant that it provided value to the system. That's all that matters. If a day comes when the system is so finely-tuned that the suboptimality of its location actually matters, a perturbation will come along and unseat it, eventually growing into the station that will replace it. Such is the nature of competitive evolution. A business that provides something fundamentally new has an easy time growing. It is only later, when adequate competition comes along, that the new market is pushed toward efficiency.

In summary: if you could make a minimally-small investment, it would be easy to invest; just invest in random things, and then grow or shrink your investment according to performance. As long as a 'minimally-small investment' is negligible in comparison to your wealth, you'll be ok. While I don't recommend this advice for real-world businesses, it is a simple and elegant technique well-suited to game AI.

---

Having heard the basics, there are now several good questions to be asking:
1. What does 'minimal discrete unit' look like for stations, ships, warp rails, etc? Can all assets be made granular?
2. What of the fact that it's not actually free to purchase things, no matter how small? Doesn't this necessitate thought in our 'random' investment, even for 'quantum'-sized ones?
3. Just because an investment is viable does not make it the best, or even close to the best, use of our money?
4. I don't want to see all of this clutter in the game world. I don't want to live in the same sandbox in which AI players are relentlessly experimenting with tiny, bad ideas.

1 is a question of design. It can be made to work, though it has implications that need to be carefully considered for, e.g., capital ships.

2 necessitates either a 'refund' for initial investments, or a 'good-enough' heuristic algorithm for suggesting them in the first place. It requires further thought, but such quasi-random suggestions (followed by more careful analysis) are already at the heart of much of the AI, so it would seem a natural fit.

3 is a non-issue for the same reason that the suboptimal positioning discussed above is a non-issue.

4, despite not being a question, is a little troublesome, but can mostly be waved away by saying "things in the prime of their growth aren't always pretty, it's the result that matters." Indeed, it's no problem if this wild experimentation happens mostly in the historical simulation phase. However, it is true that systems 'on the frontier' of developed space could end up a bit chaotic, and I'm mostly OK with that.

---

So, does it actually work?

...

Find out next time! It took an annoyingly-long time to convince myself that there is no simple, tractable solution other than "just try it." In the process, I managed to get myself tangled in a variety of other mechanics that I'm working out in parallel, namely, faction formation, faction goals, and AI algorithms for choosing faction alignment. I had suspected that factions were involved in the answer to capital expenditure, or at least had hoped that they would ease the burden, but so far they have not. Still, it's nice to have some faction theory happening at the same time. Never hurts to be thinking about the big picture.

In the coming week I will be exploring the behavior of systems that employ this granular approach to expansion without concerning myself with the questions enumerated above. First we will take a peek and see if the dynamics are nice. If so, we will use any means necessary to justify them and resolve the questions :geek: With luck, it should be a week of many baby quanta.

Once again, I will inform of any major breakthroughs if they occur this week, else I look forward to having something to show for this theory next week. I apologize for not being clever enough this time, but then again, sometimes it is quite clever to be stupid :ghost: :monkey:

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

Re: [Josh] Monday, May 21, 2018

#4
Cornflakes_91 wrote:
Mon May 21, 2018 3:22 pm
hm... on the large meat of the post i have yet no response, i'll need a day or two for that :ghost:
very interesting nonetheless.
I'm gonna have to say SAME. This is quite a heady post, which as you say will take careful consideration. But I think you're definitely onto something, and can't wait to see what you come up with. :D


Also , Optimality is a great word I've never come across, I'll need to use that more often :ghost:
Image
Challenging your assumptions is good for your health, good for your business, and good for your future. Stay skeptical but never undervalue the importance of a new and unfamiliar perspective.
Imagination Fertilizer
Beauty may not save the world, but it's the only thing that can
Post

Re: [Josh] Monday, May 21, 2018

#5
Really don't mind seeing the AI throw random minimal investment ideas out just to see what sticks. I'm kinda getting some slight wild west vibes from the idea. And when the testing phase shows the AI experimentations to be too wild, an increase of the initial cost of economic asset quanti should help.
[hypes internälly]
Post

Re: [Josh] Monday, May 21, 2018

#6
Cornflakes_91 wrote:
Mon May 21, 2018 3:22 pm
hm... on the large meat of the post i have yet no response, i'll need a day or two for that :ghost:
very interesting nonetheless.


also: faction mechanics?
you thinking again how to solve faction personell without the worker/executive split?

That split no longer exists in such a distinct way; all AI players are 'executives' now (and ships' autopilots are the 'workers'). All AI players must make decisions about managing their assets, but those in positions of power will naturally have more assets to manage. What I was really trying to solve is the problem of choosing how to allocate capital, but shares/voting/etc did not really help at the end of the day, in the end I was still not convinced anything better than "try it."

Silverware wrote:
Mon May 21, 2018 3:25 pm
Just try it is the best approach to code.

Of course there is a balance to be struck; it would be nice to have coherent code, but maybe not at the expense of taking five years to make a game :angel: :roll:

Hyperion wrote:
Mon May 21, 2018 3:32 pm
I'm gonna have to say SAME. This is quite a heady post, which as you say will take careful consideration. But I think you're definitely onto something, and can't wait to see what you come up with. :D

You guys will need to let me know if you have insights on it ;)
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: [Josh] Monday, May 21, 2018

#7
JoshParnell wrote:
Mon May 21, 2018 3:42 pm
Silverware wrote:
Mon May 21, 2018 3:25 pm
Just try it is the best approach to code.

Of course there is a balance to be struck; it would be nice to have coherent code, but maybe not at the expense of taking five years to make a game :angel: :roll:
... Never look at Goatbot.
The only reason he has ANY coherent code is because the existing version is the 8th full rebuild of him.
Iterative rebuild is the best methodology.

The first iteration gets it working, and you can then see the issues with it, meaning the second is cleaner and better.
Each iteration afterwards gets closer to the hypothetical ideal. And in all cases you have a working system, it's just sometimes not perfectly working, or entirely buggy. :ghost:
°˖◝(ಠ‸ಠ)◜˖°
Toba - A Development Dump
Post

Re: [Josh] Monday, May 21, 2018

#8
Silverware wrote:
Mon May 21, 2018 3:45 pm
... Never look at Goatbot.
The only reason he has ANY coherent code is because the existing version is the 8th full rebuild of him.
Iterative rebuild is the best methodology.

The first iteration gets it working, and you can then see the issues with it, meaning the second is cleaner and better.
Each iteration afterwards gets closer to the hypothetical ideal. And in all cases you have a working system, it's just sometimes not perfectly working, or entirely buggy. :ghost:
I think it's a great methodology ;)

The real trick, though, is in convincing the investors that the 8th full rebuild is going to be the sweet spot :ghost:

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

Re: [Josh] Monday, May 21, 2018

#9
JoshParnell wrote:
Mon May 21, 2018 3:42 pm
That split no longer exists in such a distinct way; all AI players are 'executives' now (and ships' autopilots are the 'workers'). All AI players must make decisions about managing their assets, but those in positions of power will naturally have more assets to manage. What I was really trying to solve is the problem of choosing how to allocate capital, but shares/voting/etc did not really help at the end of the day, in the end I was still not convinced anything better than "try it."

how is position of power defined?
do AIs commit to employment contracts?
the one who paid for the ship im sitting in?

why would the AI sitting in my fighters fly into their (seeming or actual) death when i order them to?
Post

Re: [Josh] Monday, May 21, 2018

#10
JoshParnell wrote:
Mon May 21, 2018 3:47 pm
Silverware wrote:
Mon May 21, 2018 3:45 pm
... Never look at Goatbot.
The only reason he has ANY coherent code is because the existing version is the 8th full rebuild of him.
Iterative rebuild is the best methodology.

The first iteration gets it working, and you can then see the issues with it, meaning the second is cleaner and better.
Each iteration afterwards gets closer to the hypothetical ideal. And in all cases you have a working system, it's just sometimes not perfectly working, or entirely buggy. :ghost:
I think it's a great methodology ;)

The real trick, though, is in convincing the investors that the 8th full rebuild is going to be the sweet spot :ghost:

:monkey:
When your investors are the people who want to play the game, it's easier. Simply get a shoddy working Alpha out, and rebuild small sections at a time. They can then see the improvements themselves. :P
°˖◝(ಠ‸ಠ)◜˖°
Toba - A Development Dump
Post

Re: [Josh] Monday, May 21, 2018

#11
Personally, I say this:

To know the value of a new asset, one must theoretically be able to predict how beneficial it will become for one's self/ the corporation/ or the direction/ market for which you want to use/ sell it in.

By this I mean that sometimes I may want to change what everyone else thinks I want to use the item (be it a ship/ cargo container/ or component) from the norm.
Best example was using a frigate to transfer high value items to a central station (Jita) with the minimal of hassle. This ship was too small to scan in under 2 seconds, and by the time they could scan it, I'd already be docked up and selling the item.
Equally so, I could undock and warp before they could retaliate with ire for fooling them.

I play the unusual game of "not what everyone thinks".
So I will invest in hardware that makes my ships faster when I have a full load of cargo than what pirates can hit me, and tank them (either by shield/ armour) before I'm too far away from them, or docked up before they can bring in the heavy hitters.

Misdirection by obfuscation can be fun too.
YAY PYTHON \o/

In Josh We Trust
-=326.3827=-
Post

Re: [Josh] Monday, May 21, 2018

#12
FormalMoss wrote:
Mon May 21, 2018 3:57 pm
...
Indeed :D for this, though, you really do have to just use your brain, there can be no faking it. That's really playing chess, after all, you are doing this because you've simulated their reaction in your head and identified your counterintuition (another fun word, Hyperion!) as a benefit to you in this case.

I did, in the early days, take that approach to AI. This was way back, probably around dev video #7 or so. The AI was using a hypothetical world to reason, and would apply differential changes to that world to try to figure out how to get things done. Planning AI. Very cool, but ultimately very difficult to make performant & smart enough to actually use for a simulation of a large economy, sadly.

We will need more CPU before I can outfox you with AI that sees through your deception :geek:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: [Josh] Monday, May 21, 2018

#13
JoshParnell wrote:
Mon May 21, 2018 3:14 pm

Now, consider the construction of a generic trade station. Or of a factory. Or really any such 'large' asset. The situation is not so easy. By their nature, such assets have the potential to disrupt the whole of the local dynamics -- they are more than just perturbations! Following this line of thought and trying to solve the problem of "should I construct a trade station here" in an algorithmically/mathematically satisfying manner is a great way to drive oneself to madness and computational despair as the recursion unfolds before one's eyes :) But fear not: if stations were made of sand, perturbations would mollify all our angst.
So why not think about IP Networking, specifically Cisco.
They have weights based on routing paths to get a packet from A to B via an intermediary, which could include more than one jump to get to b.

So let's consider that to get from A to B, we have to consider setting up a station at D, which has no local resources nearby, and is a cost to the business for upkeep.
However, by routing through D, we don't have to pass through zones of contention where we know that other parties could attack our transports, and we could lose both assets/ goods.

So, A -> B has a value of 100 (the higher the value, the worse the route is)
whereas, A-> D has a value of 30, and D -> B has a value of 30, equating a total of 60.
Yes, A -> D -> B is slower, but it is also safer that going from A -> B.

Could this method be used to figure out whether to create a "trade station here" becomes more valuable than direct point-to-point paths?
Can a random "what-if" be used for nearby asteroid belts that may or may not become available to that corporation be factored into the equation.
(i.e. if that asteroid field were ours, we'd be minted, and we could have a local base nearby if pirates come by)
(or/ even if that asteroid feild isn't ours, we can get the ore safe before the shields for v2 miners expire, so the risk analysis becomes viable, even factoring in the repair costs).
YAY PYTHON \o/

In Josh We Trust
-=326.3827=-
Post

Re: [Josh] Monday, May 21, 2018

#14
JoshParnell wrote:
Mon May 21, 2018 4:15 pm
We will need more CPU before I can outfox you with AI that sees through your deception :geek:
Thank the gods. Though maybe sooner than later you can run your Quantum Flow Economics on a Quantum Computer :ghost:
Image
Challenging your assumptions is good for your health, good for your business, and good for your future. Stay skeptical but never undervalue the importance of a new and unfamiliar perspective.
Imagination Fertilizer
Beauty may not save the world, but it's the only thing that can
Post

Re: [Josh] Monday, May 21, 2018

#15
Further to Formalmoss' stuff.

A Benefit to one's self, is not the only value you should look at.
A penalty to the opposition in the area might actually be of more benefit than the positive to yourself.

Eg; the enemy mainly produces Exotic Wyrm Cheese.

Producing your own Exotic Wyrm Cheese might be a net loss on actual profits. But the extra supply to the market drops the prices.
Since the enemy makes most of their cash on Exotic Wyrm Cheese, their income also drops when the prices drop, but since they have few diverse assets, it drops harshly.

Now your enemy is losing more money from this Exotic Wyrm Cheese production change than you are. The net benefit to you is now significantly positive. Even if you are losing money on the project.

It does imply though that this Exotic Wyrm Cheese production will be shut down the moment the enemy is dealt with.
°˖◝(ಠ‸ಠ)◜˖°
Toba - A Development Dump

Online Now

Users browsing this forum: No registered users and 1 guest

cron