Author Topic: Help on formula please !  (Read 943 times)

Hades

  • Newbie
  • *
  • Posts: 2
    • View Profile
Help on formula please !
« on: March 26, 2010, 01:11:50 PM »
Hello,

We organize a poker championship in 10 rounds. Each player gets points for each round with this formula :

switch(r, 1, 15, 2, 12, 3, 10, 4, 8, 5, 6, 6, 5, 7, 4, 8, 3, 9, 2, 10,1)

When someone is missing one game, he receives 0 points. If he misses a second game (and for each game missed after 1), he's got a penalty of 3 points.

Until now, I was using formula :

assign("c", count(scores))
sum(top(c-1, scores))

to calculate global score.
But because I m giving to some players -3 for a round (manually changing the daily formula), actually the formula adds him 3 points !!! Furthermore, if a players gets more than 1 penalty, the formula only counts 1.

Any idea to solve theses 2 problems ?

Thanks a lot

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5429
    • View Profile
Re: Help on formula please !
« Reply #1 on: March 29, 2010, 04:01:05 PM »
Instead of penalizing someone at the tournament level for missing a game (it sounds like at the moment you are adjusting a player's points by -3 in the tournament they missed), you could just let the Overall Score formula do the work.

assign("c", count(scores))
sum(top(c-1, scores))


So this looks like you are dropping each player's lowest score.  To penalize, change it to:

assign("c", count(scores))
sum(top(c-1, scores)) - ((n-c-1) * 3)


That subtracts 3 points for each tournament the player has no score for (and thus did not play in), except for the first tournament the player missed.

Hades

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Help on formula please !
« Reply #2 on: March 29, 2010, 04:34:43 PM »
Thanks for this help.

Actually, in our championship, we are playing 16 games of 10 players and 2 games of 20 (multi table). We are 20 players total.

It means your formula doesn't work in my case, but I just found what I needed.

Considering I m modifying each tournament with the formula : switch(r, 1, 15, 2, 12, 3, 10, 4, 8, 5, 6, 6, 5, 7, 4, 8, 3, 9, 2, 10,1)
If someone is missing the tournament, he gets 0 (switch(r, 1, 15, 2, 12, 3, 10, 4, 8, 5, 6, 6, 5, 7, 4, 8, 3, 9, 2, 10,0), and at second time -3 (switch(r, 1, 15, 2, 12, 3, 10, 4, 8, 5, 6, 6, 5, 7, 4, 8, 3, 9, 2, 10,-3).

The following formula works perfectly :

assign("c", count(scores))
if(sum(top(c-1, scores))>sum(scores),sum(scores),sum(top(c-1, scores)))

I had to do this to avoid penalty counted as bonus.
Now it gives back the right result.

I hope this should help someone playing with penalties later :)