A Little Math Help

  • Thread starter Drakkith
  • Start date
  • #1
Drakkith
Staff Emeritus
Science Advisor
20,797
4,533

Main Question or Discussion Point

Hello! I am trying to calculate the value of items in an online game i play. I was wondering what the best way to do this was. I was thinking of take a base item, say a longsword for +10 dmg, and finding the dmg to cost ratio. Then, taking the upgraded items and finding the ratio for each of the different stats compared to the ratio of the base items. Now, is it possible to average these numbers out into one number? Say i get the ratio of an items stats to its cost to be 5.2 to 1, 4.5 to 1, and 7.9 to 1. Is it correct to take an average of 5.2, 4.5, and 7.9 and use that to compare different items?
 

Answers and Replies

  • #2
724
0
That would work, or you could work out what is more important to you and your style of play, say damage, and give that stat more weight. Say you want a lot of damage, and thought the other stats were a little less important, you could define your value function to be [tex]value(cost, damage, stat1, stat2) = \frac{1.25damage+stat1+stat2}{cost}[/tex], or you could go even further to make it a function of cost, stats, and their weights: [tex]value=\sum{\frac{weight_i stat_i}{cost}}[/tex]. Although it looks prettier to write it like that, if you're going to make a program to calculate it for you, find the sum of all the stats times their weight, then divide.
 
Last edited:
  • #3
Drakkith
Staff Emeritus
Science Advisor
20,797
4,533
Well, I don't even know what a Function is, so I think I'll be staying from that one lol. But ill definitively look into what you said. Thanks!
 
  • #4
724
0
A function is just a know-it-all's word for a math expression with variables in it. Like, y = 2x, means y is a function defined in terms of x. Wikipedia can help a lot more than I can. http://en.wikipedia.org/wiki/Function_(mathematics)

The big E looking thing, called sigma, is just an easier way to say "add." Basically, it's shorthand for me saying to sum all the stats multiplied by their respective weights.
 
  • #5
Drakkith
Staff Emeritus
Science Advisor
20,797
4,533
A function is just a know-it-all's word for a math expression with variables in it. Like, y = 2x, means y is a function defined in terms of x. Wikipedia can help a lot more than I can. http://en.wikipedia.org/wiki/Function_(mathematics)

The big E looking thing, called sigma, is just an easier way to say "add." Basically, it's shorthand for me saying to sum all the stats multiplied by their respective weights.
Ahhh, ok, that makes alot of sense now. Thanks alot!
 

Related Threads on A Little Math Help

Replies
2
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
3
Views
2K
Replies
2
Views
4K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
3
Views
1K
Replies
6
Views
2K
Replies
6
Views
1K
Replies
5
Views
2K
Replies
1
Views
2K
Top