RGS rate calculation quibble

Post any feedback you have about the game here.
Post Reply
User avatar
killing time
Programmer
Posts: 162
Joined: Wed Jul 04, 2012 7:55 am UTC

RGS rate calculation quibble

Post by killing time »

I recently played in a resources game for the first time. I didn't learn much, since although I saw many "Drill built" messages, the Drills were apparently both invisible and intangible, as I never sighted or tripped on any. So I decided to learn more by reading on the forum about resource generation, and I noticed a minor mathematical issue.

In Viech's thread explaining the resource system, it was stated that
(1) the "ideal" is to have the total amount of resource generation be proportional the volume of the union of all the spheres.
(2) the pairwise approximation always results in a total rate of generation that is less than or equal to the ideal rate.

Statement (2) seems to be incorrect...

Let q[SUB]xy[/SUB] for two RGS x and y be (the area of the intersection of x and y) / (the area of a sphere).

The rate for an RGS i is calculated as some base rate times the product of (1 - q[SUB]ij[/SUB]/2) for all j != i.

Now suppose that three RGS a, b, and c are arranged in a line such that q[SUB]ab[/SUB] = q[SUB]bc[/SUB] = 1/10; q[SUB]ac[/SUB] = 0.
So for the interfering spheres the factor (1-q/2) is 19/20.
Suppose the base rate is 1. Then the approximation yields 2 * 19/20 + (19/20)2 = 1121/400.
The ideal rate is 3 - 2 * 1/10 = 28/10 = 1120/400. This means that the builders get 1/400 in absolutely undeserved resource generation!

The formula underestimates the effect of interference since the two areas of intersection in sphere b are non-overlapping.

No doubt the calculation can work fine as is, but nitpicking of dubious benefit is what the open source community lives for, isn't it?

User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: RGS rate calculation quibble

Post by Viech »

Wow you got me. I hoped that backdoor would never come out so I could win all the major scrims by cheating resources and building an indestructible base. I feel ashamed now. :confused:

To be honest I always pictured three interfering RGS to form some sort of equal sided triangle and was more worried about the exponential penalty for building those too close (at first, but then I started to like it that way).

Btw., Drills being invisible is most likely a result of missing files inside the data-resources-*.pk3. Not sure how that could have happened, since the server should be pure. Maybe ds wanted to cheat some resources with invisible miners, too.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

User avatar
ViruS
Granger
Posts: 1020
Joined: Sun Mar 11, 2012 4:24 am UTC
Location: Antartica - West Australian Post shore
Contact:

Re: RGS rate calculation quibble

Post by ViruS »

Viech wrote:

Wow you got me. I hoped that backdoor would never come out so I could win all the major scrims by cheating resources and building an indestructible base. I feel ashamed now. :confused:

2 basi bombs and those are gone.

Drills being invisible is most likely a result of missing files inside the data-resources-*.pk3. Not sure how that could have happened, since the server should be pure. Maybe ds wanted to cheat some resources with invisible miners, too.

Could be related to why my rifle has some camouflage on it these days... on all servers...

md5 checking can't find the pk3 causing my camouflage appearnces though for some reason...

Btw, I honestly think the current resource system is the best way to manage build points... but I can't think of a better way either without having to rely on where mappers put stuff (i.e. solar generators? LoL - that would be just about the same actually..)

ImageImageYou[TubeImage

Post Reply