views:

89

answers:

2

The goal is to make the frequency not so dominating.

Suppose A has an attack frequency of 100,and B's is 2.

But I don't want to see such a big difference.

I want to reduce the difference,how?

The goal is that A is at most 5 times faster than B,not 100/2=50.

But should make sure A is faster than B.

So I need a mechanism to achieve this.

+2  A: 

Use the logarithm function to reduce the scale. For example in log base 2, A's score is between 6 and 7, while B has a score of 1. Multiply by a constant afterwards if you wish to scale the values up again. You can change the base of the logarithm to adjust how much you want to even out the differences.

Update: You will probably also want to add 1 to the score before taking the logarithm to ensure that scores below 1 don't get converted to large negative numbers.

Mark Byers
+1  A: 

You might consider using a gaussian around 100 for A and 2 for B. Digg into non uniform random generators. Or you can, determine another attribut for your game and use the frequency as a factor !

Amokrane