Return to “[Archived] Daily Dev Logs, 2012 - 2015”

Post

Week of May 11, 2014

#1
Sunday, May 11, 2014

Closing in. Closing in on the highest of the high AI :)

Metaprojects as Revenue Allocation

(NOTE: Previously I have used the term 'metatask' to describe actions that are taken to affect how other projects run. I'm going to start using 'metaproject' instead, as it's more consistent. Projects and metaprojects. Duh :) )

One very simple insight from yesterday has allowed me to completely change how I think about metaprojects as I move forward with implementing them today. That insight is: you don't decide which metaproject. You decide how much of each. You don't choose between expansion, R&D, security, etc...you choose an allocation of your capital among them all. Just like power distribution. But where does that capital come from? We already know the answer to that one: project revenue. You take project revenue, divide it into percentages, and let that revenue flow into metaprojects that increase the long-term profitability of your existing operations.

As an example, if an AI player creates a mining operation, it will automatically create sub-projects for each category of metaproject (right now: expansion, monopolization, research, security...list subject to change). It'll also decide on a distribution among those sub-projects, so that when revenue is generated by the parent project, it will automatically flow (according to the chosen distribution) into the metaprojects. This simple insight transforms what seems like a complex problem into what seems like a simple one: choosing the distribution of revenue. But we don't have to have a perfect solution for that! We can guess at it, we can derive it from the AI player's personality, etc. Since we now do a little bit of each, optimality is less important.

It really excites me to think that, with personality as an influence in choosing this distribution, we will very clearly see factions develop unique styles, not even necessarily through their choice of operations, but rather, through the way that they evolve and sustain those operations! Can you really tell the personality of someone by whether they pick mining or production? I mean...maybe a bit...but not really. Now, when you see one person guarding their production station with what seems like a full-fledged battle fleet, while another simply slaps them up all over space with nary a fighter left behind to defend...now you can see a personality! Aggressive expansion vs. high-security paranoia, for example, are both just particular metaproject revenue allocations!

Naturally, the allocation will also be reactive. For example, as mentioned before, large amounts of asset loss call for more spending on security. I'll use a heuristic to compute an importance factor for each metaproject, which will bias the final allocation toward 'urgent' metaprojects.

---

So we've solved metaproject decision making...next up is to actually write the metaprojects. This will no doubt be harder than the other tasks so far (except for 'Play Limit Theory' :roll: ), since metaprojects essentially take in money and produce abstract resources ('expansion,' 'security,' etc.). There's a lot more decision-making involved, but I feel much better now that the problem is already reduced to "take X credits and convert it into as much security as possible for project Y."

Don't you just love that feeling of hard problems shrinking until they vanish? :geek:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 11, 2014

#2
Monday, May 12, 2014

Alright. One step closer :)

I'm not going to break today's work down, because it was basically just a day of continuing the implementation of the theory about which I spoke yesterday. I'm in fairly good shape right now, as I've got tasks set up for metaproject management, and all the logic for creating and implementing an allocation of revenue is complete. I'm now getting little debug messages from the AI that say "I want to spend X credits on research related to project Y," for example :)

Now comes the real fun. As I mentioned briefly yesterday, metaprojects are a different beast from regular projects in that their outputs are significantly more abstract than a normal project. What exactly should an expansion metaproject produce? Well, it should produce...'expansion' of an operation. But what does that mean? In the particular case of expansion, it means producing ownership of more assets and personnel whose capabilities are aligned with the requirements of the project in question. In other words, 'expansion of mining project' implies acquisition of new assets with transference capability. So in this particular case, the most precise way that you could state the output would be to say 'ownership of transference capability.' Similarly-vague outputs exist for the other types of metaproject.

So what this boils down to is that metaprojects cannot automatically use the market to acquire their goals as normal projects do. In fact, in some sense, the whole point of a metaproject is figuring out what concrete steps can be taken to produce an abstract result. To be honest, that idea just occurred to me as I'm writing this :shock: Is that a good way to understand metaprojects? As the glue that connects an abstract goal to a concrete request? Perhaps :think:

At any rate, the solution here will require a substantial bit of thought. It will likely involve fleshing out of the other part of the market, which I have been hesitating to finish: missions / contracts. The commodities market is a place in which concrete goals are traded. The contract market is one in which abstract goals are traded (at least, that's my belief at this moment). The latter is obviously harder to understand :think:

Despite this remaining challenge, it's feeling a bit like the beginning of the end to me, in terms of AI :D After all, what's higher than metaprojects? Surely nothing :ugeek:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 11, 2014

#3
Tuesday, May 13, 2014

I won't touch the code until I can see it.

I don't have it yet. I don't see the simplicity yet. Out there, somewhere, there is an idea. It is a crisp, simple, beautiful idea that encapsulates all that I want from missions, contracts, and abstract goals. It creates interesting opportunity for the player. It is easy for the AI to understand, both from the one offering and the one accepting. It glues the highest level of economy together. It's the last piece of the AI puzzle, and it's out there somewhere. I know it is. But I don't see it yet.

I don't know what else to do but burn neurons. I did it all day today and I'll do it again all day tomorrow.

I won't touch the code until I can see it.

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

Re: Week of May 11, 2014

#4
Wednesday, May 14, 2014

I believe I have it :geek:'

Information Mechanic

It's all about information. Today, after so many hours of deep thought, I am coming to believe that the final glue that will bind everything together - to allow AI to adequately understand and control metaprojects, to allow players to take part in them, and to quantify the unquantifiable...is information. Data. Incidentally, this coincides perfectly with one of the last-remaining untouched pieces of gameplay: information / exploration mechanics.

Today I'll just present you with some scattered thoughts, because I didn't have time to get to implementation, so I don't have it all rigorously laid-out yet. But I have ideas.

Consider what I did with technology this week. I turned it into a hard, tradeable item. I turned it into something that can be quantified, valued, created, destroyed, and, above all else, understood. But, I'm starting to believe that it was just one piece of a larger idea. The physicalization of information.

Unlike a commodity, information can represent abstract occurrences. It can represent anything from information about an event (the destruction of an entity, the transfer of ownership of an entity, the invention of a new technology) to information about an object (the contents of a cargo hold, the specifications of a ship, the location and destination of a wormhole). Imagine that, instead of trading just objects, we introduce trade of information. Suddenly, the possibilities become endless. It was always my intention to make exploration a first-class profession, such that discovering a previously-undiscovered wormhole could net the player a nice profit. Yes, it was always my intention to make information a tradeable thing in LT. But perhaps I didn't quite realize just how deeply that concept ties in with everything else.

I won't present the comprehensive theory today, but let's consider some scattered possibilities.

Monopolization: an AI player puts up a contract that offers cash for any data logs that prove destruction of an enemy faction's assets. Just like a mission in any other game, but more flexible and more explicit. You go out and destroy an asset from the enemy faction. In your ship's memory bank, you now have a file (or 'data') that logs all of the details of the occurrence. You head back to the station and trade in this data for a reward.

Security: an AI player puts up a contract that offers cash for data that indicates you were in the vicinity of one of their assets for some amount of time. It's a pretty small reward, but there's also a larger, bonus reward for data the indicates destruction of an attacker (that is, an entity that was attempting to attack an asset of the faction). You head on out and patrol the local asteroid field, sticking close to mining barges from that faction. You manage to thwart off a few minor pirate attacks. In your ship's memory banks, you have several files. A few of them indicate that you were in the vicinity of the faction's assets, providing security. A few indicate that you destroyed ships that were attacking mining barges. You head on back, and trade in this data for a reward.

Exploration: an AI player is looking to expand operations. They're not sure where to do so. They offer a cash reward for any data pertaining to new zones. You head out and explore. It takes you a while, but with some careful scanner analysis, you manage to track down an asteroid field. Upon entering, your ship's memory bank acquires a new piece of data that indicates the discovery of this field. Since all data is automatically hashed and checked against the global information network, you're able to see the number of existing copies of this particular piece of data. It reads: 1. Bingo. You're the only one with information about this field. You head back and sell the data to the faction. Seeing that the information is unique, they pay you a premium for this valuable discovery.

You see, explicit data can solve so many problems. It can allow the AI to easily reason about more than just tangible commodities. It can allow the player to profit from more than just physical goods. Just as the physicalization of research introduced an array of new mechanics, so will the explicitization of information.

There remain several key questions to be answered: first, do we want to introduce an explicit 'memory bank' to ships and stations, exclusively for the purpose of storing information? Or do we want to simply use the existing cargo bays to store 'data cores'? Second: copying. Data copying. Hard problem. Do we allow it? Under what circumstances? In what way does copying impact the value of a piece of data? You see, this is the same question that we were asking about blueprints when I introduced physical research. It all ties in. Unification :)

I have little doubt that the information mechanic is the last remaining piece of the puzzle. The devil is in the details, as we want to make the game fun, balanced, and understandable. That's not trivial, but I think it's possible.

What a day. :geek:

PS ~ I took a break today. During that break I happened to glance at some nebula pictures. I noticed something about the relationship between occlusion and light that I had not noticed before. An hour later, LT's procedural nebulae are twice as beautiful. All in a day's work :)

PPS ~ With the information mechanic on the way, hacking and forgery have never seemed so viable ;)
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 11, 2014

#5
Thursday, May 15, 2014

Ok, I'll admit, I didn't get everything figured out today. But I still feel as though I'm approaching that point :)

Data Uniqueness and Value

Yesterday I briefly mentioned the idea that a piece of data has some concept of how widely-known it is. Let me expand on that, because it's a critical component of how information will work in LT.

Whenever a new piece of data is acquired, a global count on that data is incremented, encoding the fact that a new copy of the data exists. The actual explanation of this mechanism is not so important, but I suggest a fairly-plausible one: in the LT universe, technology is sufficiently advanced that actors have learned how to precisely quantify and standardize all information. Upon receipt of a new piece of information, that information is immediately hashed and registered with a global 'information network.' The network simply stores hashes of all known data and counts corresponding to how many times that information has been registered. This way, it is possible for an agent to know how 'unique' his data is. Yet, since the network contains only hashes, the actual information is not contained within. Hence, registration with the network only aids agents in understanding the prevalence of a piece of data, it does not actually reveal the contents of that data to anyone else.

This mechanism allows us to create a simple, intuitive way for valuing data. Suppose you discover a wormhole. Regardless of whether or not it's a novel discovery, you'll obtain a piece of data that logs the properties and location of the wormhole. That data will allow you to see the wormhole on your HUD in the future. But you'll also be able to see the global count of that data, which will tell you whether or not it's a novel discovery. If the count is 1, well...congratulations, you've just discovered a previously-unknown wormhole! You're the only one in the universe who knows about it. You can bet that it'll fetch a nice price. On the other hand, suppose the count is 1000 - the wormhole is common knowledge, and the data will be almost worthless.

Now, suppose you trade the information of a new wormhole to an AI faction. Suddenly, the count increases to 2, assuming you keep a copy. The value of the information immediately drops, because you've propagated it. Sure, you can still go trade that info to someone else (so long as the AI faction does not beat you to it) - but each trade reduces the value of the data as the count increases. Depending on how we implement the mathematical valuation, we can actually bound the total value that any one piece of data can fetch, regardless of how many times it is sold! Math buffs will have already guessed that...I am indeed referring to convergence of the infinite sum of a p-series! :roll: :geek: If the value of a piece of information is (base value) / (copy count ^ p), for p > 1, then the total value that can be obtained by selling the data an infinite number of times is...finite! At p = 2, for example, sale of non-unique knowledge will be fairly unprofitable compared to sale of unique knowledge, since 2 * base value is the most you could ever obtain after an infinite number of sales.

What about copying of data? Well, it's pretty feasible with this mechanic. As long as we enforce that copying takes some (non-trivial) amount of time (preferably proportional to the base value of the data), then we already have some cool effects: sure, you can backup your data by creating redundant copies. But doing so increases the count, hence decreasing the value. In fact, if you want to make the most profit off of a new discovery, you will want to sell the only existing copy to the buyer. In other words, you'll want to actually lose that data, effectively promising exclusivity to the buyer. Does it make sense? Not completely. In reality, you can just go back to the wormhole (or whatever it was) to re-obtain the data after you've sold it. Despite that slight oddity, the whole system still feels quite solid IMO. But of course, copying is still something to which we must devote some thought.

Physical Goals and Abstract Goals: Commodities vs. Data

A nice way of understanding why a data market is necessary is to first think of what the commodity market allows. By placing buy orders on a commodity market, an AI can specify a physical goal. That is, it can say, "I don't care how you get it, but I'm willing to pay 4 credits per kg of Viritium." In essence, the commodity market is an exchange of tangible goals.

On the other hand, the data market is an exchange of abstract goals. Anything beyond what can be represented as a physical goal can be engineered to work with the data system. As I mentioned yesterday, destruction and discovery are obvious examples - but beyond that, repair, damage, the mere act of research, assistance in a construction project, etc. can all be formalized as tradeable goals by introducing data that captures the corresponding events. Doing so vastly increases the number of activities about which the player and the AI can reason at a precise, quantitative level!

In some sense, the data market actually encapsulates all of the economy. If we were to make "log of transferring X units of Viritium to faction Y" a piece of data, we could consider commodity exchange to be a subset of data exchange. But we won't go that far, as it's a bit too foreign to us gamers :)

---

Despite all this non-implementation talk, in truth most of my day was devoted to implementation. I'm exploring the structure of data and how it will tie into the game. I'm incredibly excited that this mechanic is going to be both a solution to many final AI problems as well as an implementation of the first-class information / exploration mechanic that I promised from the beginning.

Really going to enjoy moving forward with data mechanics :geek:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 11, 2014

#6
Friday, May 16, 2014

Not much new excitement today, just workin' at the code :geek:

Data Transfer as Copying

Quick update to the theory I presented yesterday - it obviously makes no sense to 'forget' a piece of data when you sell it, and I'm not sure why I didn't realize before that it's fine to just consider that the piece of data is copied to anyone who buys it. This way, you retain the data, the count increases by 1, and all is well. Sure, in theory, a piece of data that you keep all to yourself is still more 'valuable' than any data that you sell to someone else. But that makes sense :)

Also, I want to note that, while data has some notion of a 'base value' (just like commodities), it is the buyer who determines the price of the data according to their own criteria (again, just like commodities). Certain buyers will be vastly more interested in certain pieces of data than others. A simple example is that a faction looking to expand would likely pay significantly more for a data log of a previously-unknown zone that is close to their current home base than for one that is further out. Likewise, information about a wormhole hundreds of systems away is probably of very little value to anyone, regardless of how rare it is.

---

Hopefully I'll have more for you tomorrow as we approach a working implementation of the data mechanic! :)
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 11, 2014

#7
Saturday, May 17, 2014

I've got data up and running, but I don't yet have the solution to life, the universe, and everything :geek: I'm already able to track basic things like damage and destruction via data (and see it through a basic interface that resembles the cargo interfaces.) Discovery logs are coming soon!

But I'm still having some theoretical issues...

Generalized Market Orders?

I feel like a lot of my struggle with implementing the data mechanic is due to the fact that, conceptually, I'm conflating data trade with the notion of 'generalized' market orders. By that, I mean a market order that is more broad than just a single commodity. I previously mentioned the idea of 'tags' being used for this concept - allowing one to, for example, place a general order on all commodities with the tag 'Viritium,' which implicitly means that the order is good for Dense Viritium, Crystallized Viritium, Impure Viritium, etc., and then having each commodity expose a certain 'conversion factor' to any given tag (Crystallized Viritium = 2x Viritium, Impure Viritium = 0.6x Viritium, and so on). But I'm having second thoughts about whether or not that suffices. Suppose a player (AI or human) has some cash to spend on a new ship. They don't see any ships on the market currently, so they want to place a general order for a ship in the price range of X-Y, with a cargo capacity between Z and W (because this ship is to be a hauler). Maybe we are willing to pay a higher price for a fast ship, but maybe we don't care about hardpoints. This kind of thing is tough to think of in terms of just tags.

What we're essentially getting at is the theoretically-ideal solution of a market order: a function that maps a resource to a price. That's the most elegant and general way that you could possibly understand bids - they contain a function, and for any given item, you evaluate that function to get the price that the buyer will pay. The function will look at the various attributes of the item (or data), and output a value based on the buyer's preferences. Under that framework, a market order could be as fancy as you want it to be - it could be a blanket order for any cargo ship in the galaxy, it could encode bonuses and penalties depending on the attributes of the item, etc. The current market orders could be thought of as a very small, special case - they simply encode the function "value = (if item == X, then Y, else 0)." Current orders are simple, flat-price orders for a single good.

I don't think we want to go as deep as completely-general market order functions. I don't want to spend ten minutes crafting a bid just to let the other players in the system know that I'm interested in buying a certain type of cargo ship.

At the same time, we need something more powerful than what we currently have; of that I am certain. Ultimately, what we require is a way to create a demand for a good when the exact good is not necessarily known. I keep conflating this concept with data trade because of the fact that data is inherently a very specific, low-volume item (often unknown to players before it is created), so it makes much more sense to trade data via generalized market orders ("I'll buy any information you have about new wormholes in this system," "I'll pay you for any destruction logs pertaining to faction Y's assets, up to assets of 100K value, with a 50% bonus for assets that were carrying assembly chips").

---

Time will provide the right solution, but I fear it may cost me several thousand more neurons :monkey:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of May 11, 2014

#8
Summary of the Week of May 11, 2014
  • Conceptual breakthrough for AI metaproject management ('allocation' rather than 'choice')!
  • Information mechanics theory
  • Major breakthrough in procedural nebula generation (again!)
  • Data theory ('count' mechanics and data as abstract goals)
  • Started on generalized market order theory
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 3 guests

cron