Author Topic: Formula Edit Help, please  (Read 2018 times)

thomamon

  • Newbie
  • *
  • Posts: 40
    • View Profile
Formula Edit Help, please
« on: January 19, 2011, 02:04:52 PM »
Well, got the formula on the board a while ago, but it gives the bottom 20% of people 10 points each.  I don't know how to edit this formula, so can anyone please help me with removing this from the formula? I would appreciate it.

round(if(r <= 0.8 * n, 8 * (sqrt(n) / sqrt(r)) * (1 + log10(bc + 0.25)), 10))

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Formula Edit Help, please
« Reply #1 on: January 19, 2011, 05:22:27 PM »
To take out the ten points, I believe that you would take out the 10 in ...(bc+0.25)), 10

But, that's just based upon a quick glance, and looking back at the post made with where you got the formula from. If that doesn't work, respond back and I'll do some testing once I get back to my computer with TD installed on.
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

thomamon

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Formula Edit Help, please
« Reply #2 on: January 20, 2011, 02:22:33 AM »
To take out the ten points, I believe that you would take out the 10 in ...(bc+0.25)), 10

But, that's just based upon a quick glance, and looking back at the post made with where you got the formula from. If that doesn't work, respond back and I'll do some testing once I get back to my computer with TD installed on.
I tried that, just taking out the 10 and the bottom people get 0 points. 

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula Edit Help, please
« Reply #3 on: January 20, 2011, 09:51:46 AM »
To take out the ten points, I believe that you would take out the 10 in ...(bc+0.25)), 10

But, that's just based upon a quick glance, and looking back at the post made with where you got the formula from. If that doesn't work, respond back and I'll do some testing once I get back to my computer with TD installed on.
I tried that, just taking out the 10 and the bottom people get 0 points. 

Isn't that what you wanted?

thomamon

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Formula Edit Help, please
« Reply #4 on: January 20, 2011, 04:09:54 PM »
To take out the ten points, I believe that you would take out the 10 in ...(bc+0.25)), 10

But, that's just based upon a quick glance, and looking back at the post made with where you got the formula from. If that doesn't work, respond back and I'll do some testing once I get back to my computer with TD installed on.
I tried that, just taking out the 10 and the bottom people get 0 points. 

Isn't that what you wanted?
No, sorry if I confused everyone. I want the formula to continue to the bottom, not give the bottom few the same amount of points.

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Formula Edit Help, please
« Reply #5 on: January 20, 2011, 04:41:52 PM »
How about adding "+n-r+1" to the end of the formula after taking out the 10? that way everyone gets at least one point?  Or how about "+if(r>15, n-r+1, 0)" if you want the bottom few people to get points? (Dependent upon the number of people that play, you may want to adjust the 15 to better suit your needs)
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula Edit Help, please
« Reply #6 on: January 21, 2011, 02:12:30 PM »
Just take out the "IF".  As it is, the formula is specifying that the top 80% get the results of the inner formula, while the bottom 20% get 10 points.  Basically, you just want everyone to get the results of the inner formula:

round(8 * (sqrt(n) / sqrt(r)) * (1 + log10(bc + 0.25)))

thomamon

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Formula Edit Help, please
« Reply #7 on: January 29, 2011, 03:14:18 AM »
Just take out the "IF".  As it is, the formula is specifying that the top 80% get the results of the inner formula, while the bottom 20% get 10 points.  Basically, you just want everyone to get the results of the inner formula:

round(8 * (sqrt(n) / sqrt(r)) * (1 + log10(bc + 0.25)))
Me and my friend were talking who run the league about what we want to happen with the bottom 20% of people in the league.

Is it possible to add to the formula that lowest person in gets 10 points.  After that, we want the bottom 20% to go up in an increment to what the formula calls for.

For example, we had a 33 person tournament tonight.  The old formula calls for 27-33 to get 10 points.  What we want in the new formula would be the bottom person gets 10 points.  But now you subtract the last person who got points which is place #26 who got 27 points.   So subtract 27-10 and you have 17 points.  Now divide the 7 people left into 17 and you would get 2.42.  So now the bottom person gets 10, then next to last gets 10+2.42 then the next position would get 12.42+2.42 until you get back to the guy with 27.

I am sure I did not explain this great, but I hope you get the idea of what I am trying to do.

Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Formula Edit Help, please
« Reply #8 on: January 29, 2011, 09:26:49 PM »
See if this is works for you.   It's a little verbose but I think it's what you've described.

assign("lowRank", ceil(0.8 * n))
assign("upper80", round(8 * (sqrt(n) / sqrt(r)) * (1 + log10(bc + 0.25))))
assign("lower20", round(8 * (sqrt(n) / sqrt(lowRank)) * (1 + log10(bc + 0.25))))
assign("step", (lower20 - 10) / (n - lowRank))
if(r <= lowRank, upper80, 10 + ((n - r) * step))

thomamon

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Formula Edit Help, please
« Reply #9 on: January 30, 2011, 03:07:40 PM »
See if this is works for you.   It's a little verbose but I think it's what you've described.

assign("lowRank", ceil(0.8 * n))
assign("upper80", round(8 * (sqrt(n) / sqrt(r)) * (1 + log10(bc + 0.25))))
assign("lower20", round(8 * (sqrt(n) / sqrt(lowRank)) * (1 + log10(bc + 0.25))))
assign("step", (lower20 - 10) / (n - lowRank))
if(r <= lowRank, upper80, 10 + ((n - r) * step))

I think it works fine.  Is there a way to round the bottom numbers tho?  Looks like this:

10
12.83
15.67

Think I got it!  Looks right:

assign("lowRank", ceil(0.8 * n))
assign("upper80", round(8 * (sqrt(n) / sqrt(r)) * (1 + log10(bc + 0.25))))
assign("lower20", round(8 * (sqrt(n) / sqrt(lowRank)) * (1 + log10(bc + 0.25))))
assign("step", (lower20 - 10) / (n - lowRank))
if (r <= lowRank, upper80, 10 + round((n - r) * step))
« Last Edit: January 30, 2011, 03:10:13 PM by thomamon »