Return to “General”

Post

Item valuation

#1
Since this is directly concerned with mathematical formulas, I am especially interested.

Your deduction that item cost must scale faster than item quality is a good start. There are essentially three regimes in most games out there:
a) Item quality sublinear / Item cost linear. That is, items asymptotically approach some index of quality, while costs increase linearly.
b) Item quality linear / Item cost superlinear. Many games. The superlinear function could be polynomial, power, exponential, etc.
c) Item quality superlinear / Item cost superlinear. Many other games (one off the top of my head is Borderlands, which scales quality roughly by 1.13^level and cost by some higher factor).

(A) makes for a poor choice in sandbox-style gameplay, as progression is not sufficiently rewarded. The choice between (B) and (C) is a function of how large you expect to see progression as a function of time. Some MMORPGs (such as Lineage) are infamous for using (C) excessively, producing "grindy" gameplay.

Additionally, there is another function to consider - rarity. Rarity is multiplicative of both item quality and item cost - rare items perform better, and are worth more. The relation between rarity and subsequent quality/cost ratios can also be described in a scheme similar to A,B, and C - how much better is a "unique" item and how much more does it cost?

As for generalized pricing functions, I know of one concrete example being how Neverwinter Nights 2 prices item attributes. I'll try to dig that up.
Post

Re: Item valuation

#2
The other thing to remember is the shipping cost, so that the price difference between A and B still makes shipping economical. Likely for some goods/routes it will only be economical to ship in bulk, where the economy of scale makes the difference between profit & loss. For dangerous sectors the shipping cost will be more because of hiring escorts and/or the cost of losing a proportion of ships & cargoes. Maybe insurance could be a factor too, with high premiums for dangerous routes, a bit like Inidan Ocean shipping today.

If there is a flow of trade goods/resources, that can be regarded as flowing down a price-based gradient; the shallower it is, the lower the profitibility. It may often be better to take goods the long way round just to avoid a troublesome region, though that probably means the pirates will move too.
Post

Re: Item valuation

#3
jimhsu wrote:Since this is directly concerned with mathematical formulas, I am especially interested.

Your deduction that item cost must scale faster than item quality is a good start. There are essentially three regimes in most games out there:
a) Item quality sublinear / Item cost linear. That is, items asymptotically approach some index of quality, while costs increase linearly.
b) Item quality linear / Item cost superlinear. Many games. The superlinear function could be polynomial, power, exponential, etc.
c) Item quality superlinear / Item cost superlinear. Many other games (one off the top of my head is Borderlands, which scales quality roughly by 1.13^level and cost by some higher factor).

(A) makes for a poor choice in sandbox-style gameplay, as progression is not sufficiently rewarded. The choice between (B) and (C) is a function of how large you expect to see progression as a function of time. Some MMORPGs (such as Lineage) are infamous for using (C) excessively, producing "grindy" gameplay.

Additionally, there is another function to consider - rarity. Rarity is multiplicative of both item quality and item cost - rare items perform better, and are worth more. The relation between rarity and subsequent quality/cost ratios can also be described in a scheme similar to A,B, and C - how much better is a "unique" item and how much more does it cost?

As for generalized pricing functions, I know of one concrete example being how Neverwinter Nights 2 prices item attributes. I'll try to dig that up.
Yeah, I am interested in discussing this more from a mathematical point of view :) I agree that A is a poor choice - the player needs to feel that they are working for a significant reward. Personally, I am an advocate of B, because it is the simplest mechanism that affords good control. C affords a superfluous degree of freedom IMO.

Now, as for rarity, I think it's definitely an important tool to keep in mind. I didn't have time to elaborate on all my thoughts in that dev diary, but one of them was that rarity can be used as an alternative to value to control the pace of the game. I haven't fully explored the ramifications of it, but my intuition is that you can offload some of the superlinear power onto the rarity of the item.

As an example, I mentioned that we should target a relation like y' = sqrt(y), where y is the player's ability to produce value. One way is to make prices increase as the square of quality, assuming quality is proportional to the ability to produce value (which is a tricky assumption and definitely requires more exploration). But, what if, instead, we made prices increase as quality to the 1.5, and also made the item become rarer with a power of .5 (i.e., you are only 70.7% as likely to find an item that is 2x as powerful as another). You could handwave a lot and claim that it will produce the same desired sqrt effect, just in a more spread-out manner (not just using value to balance it). Or, you can offload all of the power into rarity, and say that an item that is 2x as good will be 2x as expensive, but also 2x harder to find. I believe these are all equivalent with respect to the player's ability to produce value, but they obviously have different perceptual ramifications. In the case of strictly using price, the player is in a world where it is very easy to tell what's out there / what his next step is going to be, but rather hard to achieve it. On the other extreme, using only rarity to balance progression, the world changes to one in which the player cannot easily tell what his next upgrade will be (because it occurs less frequently than the equipment he's already found), but when he finds it, he can almost certainly afford it, so the difficulty becomes exploration rather than acquiring money. Interesting to think about that balance. It might even be a tunable parameter in the game. For hardcore players, maybe you'd like to have BOTH increase - so you have to really search to find a good weapon, but also have to shell out a lot! This will produce the slowest progression of all.

Some very sketchy math going on there, but I will continue to explore it, and if anyone has good thoughts on the matter, do chime in.. :)
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Item valuation

#4
For me, rarity would only be valuable if there's a way to get more of them.

For instance, finding one awesome laser gun isn't going to save the day. To equip a larger ship (or fleet!) you'll need a bunch of them. Having to explore the entire universe in the hope of finding enough guns doesn't sound fun to me. I'd like to find one (or two) gun, reverse engineer it and start producing it myself.
Of course, production cost of better items shouldn't be linear. A gun that's 2x better should cost more than 2x to produce it. Perhaps it would need some material that's a bit harder to get (hardobtainium instead of metal)? Perhaps NPCs looking for a new gun stop by the player equipment dock to have it outfitted and pay through the nose for it too? :)

I like a system like this because it allows you to find a great gun at the start of the game, but you still have to work hard to be able to mass produce it. Perhaps rarity should be linked to rarity of resources and knowledge?

Suppose you hardcode 10 different rare materials, each of these materials have a property:
hardobtanium -> less power usage
unobtainium -> more hitpoints
flexobtainium -> less mass (faster tracking)
raremineral -> more battery storage
etc

If you seed these materials through the universe at creation, then factions controlling sectors with these materials would use weapons and ships with these perks. On the other hand, intelligence and research plays a role too. A relative primitive race with no eye for research would not make as much use of the rare materials as a an intelligent, research minded race would.
This, again, would have the result that the primitive race would sell these resources (or access to it) cheaper than the intelligent race that's using it themselves.

From your formula you have an idea of how rare a certain material is, so you could calculate the cost for extracting those materials from that. You know what other materials go into the gun, so you can calculate its price based on that. The further you are from the rare resource, the more expensive the gun will get. (which doesn't mean someone will actually buy it)

With a system like this it's possible to let the actual price of an item vary from sector to sector. One sector has the materials but not the know-how, so they'll pay more for the gun than someone who has the materials and know-how. Just like the player... If you have/know the materials, all you need is a blueprint. If you know nothing about the technology, you need to reverse engineer the gun.
Everybody loves a good arms race, so NPCs will reverse engineer guns too. They'll try to produce them if they fit with their philosophy, or buy them if that would be cheaper (again dependant on the intelligence or other traits).
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Post

Re: Item valuation

#5
Perhaps a philosophical question, but one that is relevant: Does rarity generate value? Or value predispose to rarity?

Hitting close to home, one famous example of this "relation" not holding up is in the case of Oblivion, where you have high-leveled bandits running around in daedric armor when the player reaches the appropriate level. This is a far cry from the scaling seen in Morrowind, where only one (yes, a single) set of daedric armor exists in the entire game, most of it worn by one guy (not to give away too much). Between both extremes, I think the ideal balance would be a "scalable" sense of rarity, tied to a concept called "universe development" (which should be a function of some sense of "player progression"). In "undeveloped" universes, quality should scale strongly to rarity (it's hard to find stuff that's good) and weakly to price (even if the stuff is good, no one can afford it). Additionally, rarity should be "capped" at a fairly low level:

Ex:
Quality = rarity^1.5 * price^0.5
rarity = min(rarity,100)
price = min(price,100)

As the universe "develops", through player or NPC actions, the power of rarity shifts downwards (reflecting increased availability), and price shifts upwards (reflecting increasing ability to afford said rarities). Most importantly, the cap to rarity shifts dramatically upward.

Ex:
Quality = rarity^1 * price^1.5
rarity = min(rarity,10000)
price = min(price,10000)

I'm trying to model this with an excel spreadsheet. Let me see what I get.
Post

Re: Item valuation

#6
Hey,

I looked at your post about the Erlang distribution, and immediately thought "Poisson", and it all made sense. Item generation should definitely be a Poisson process, where the "waiting time" between loot items of equivalent quality should be distributed by k, where k is the Erlang distribution. A whole bunch of processes are Poisson distributed -- internet server accesses, births and deaths, outbreaks of war, goals scored in sports games, etc that all rely on the property that there is a certain spacing between events that makes an "average" rate of occurrence most likely.

The gamma distribution is a generalized form of the above, where k is not an integer. I believe it's used for weather modeling, and several things in biology (e.g gamma oscillations in neurons). In fact, it also generalizes to the trusty exponential at k = 1, and a couple of other distributions you can read up on wikipedia. Calculating that PDF on C++ might be more difficult though, you'll have to find a library.

As for the last part of the post, go read up on hyper operators. Have fun. Large numbers in particular are a fun area of mathematics.
Post

Re: Item valuation

#7
jimhsu wrote:Hey,

I looked at your post about the Erlang distribution, and immediately thought "Poisson", and it all made sense. Item generation should definitely be a Poisson process, where the "waiting time" between loot items of equivalent quality should be distributed by k, where k is the Erlang distribution. A whole bunch of processes are Poisson distributed -- internet server accesses, births and deaths, outbreaks of war, goals scored in sports games, etc that all rely on the property that there is a certain spacing between events that makes an "average" rate of occurrence most likely.

The gamma distribution is a generalized form of the above, where k is not an integer. I believe it's used for weather modeling, and several things in biology (e.g gamma oscillations in neurons). In fact, it also generalizes to the trusty exponential at k = 1, and a couple of other distributions you can read up on wikipedia. Calculating that PDF on C++ might be more difficult though, you'll have to find a library.

As for the last part of the post, go read up on hyper operators. Have fun. Large numbers in particular are a fun area of mathematics.
Yeah, I thought Poisson as well when I saw the shape of the curve! :D I'm not sure I fully grasp why it makes sense to be modeled as a poisson process, but if you believe it to be correct, then I will be more than happy to justify my love for this distribution with that explanation ;)

Gamma is actually what led me to discover Erlang, when I read the section on generating gamma distributed numbers, and saw that generating up to the integer was super easy. I'm content with integer K, given how easy it is to generate.

Thanks for the link on hyper operators, I have never heard of it but I'm sure I will be having fun with that in just a moment :D
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Item valuation

#8
jimhsu wrote:As for the last part of the post, go read up on hyper operators. Have fun. Large numbers in particular are a fun area of mathematics.
Ahhh my God it makes me so happy to see all of the operators unified like that!! I am curious though, do we have real uses for operators above exponentiation? If so, would love a link or two if you've got em :D
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Item valuation

#9
As for "why" a poisson ... remember that old quote about lies and statistics. Rather, trying to come up with an explanation of "why" is often futile, unless you can really understand the system (in which case, you wouldn't be using statistics in the first place). Instead, doing the best to model your system so it has the desired properties (in this case, "fun-ness") should be your goal.

As for hyperoperators, the only purpose really is to expressing freaking gigantic numbers. Things, well, like Graham's number, which earn the dubious distinction of simultaneously being the largest noninfinite number used in a serious mathematical proof, and the worst bounds ever established in mathematics. Briefly, the contents of the entire universe, converted to atoms, are insufficient to express the first TERM of this number (of which the actual number is the 64th term).

Online Now

Users browsing this forum: No registered users and 12 guests

cron