Author Topic: Need help with tough Formula.  (Read 6288 times)

Sneds

  • Newbie
  • *
  • Posts: 7
    • View Profile
Need help with tough Formula.
« on: September 07, 2007, 10:24:41 AM »
Hi there, I run a poker game with about 60 players involved. We have a points system from last year that proved quite successful, but I simply just calculated with a calculator after each tournament.

I was wondering if it was possible for the software to automatically work it out for me...Its quite tough.

 Formula :- Place x Prizepool x Entrants.

Place

1st = 120
2nd = 100
3rd = 80
4th = 60
5th = 50
6th = 40
7th = 30
8th = 20
9th = 10

10th to 18th - 6


Prize Pool
£0 - £49 = 1.1
£50 - £99 = 1.2
£100 - £149 = 1.3
£150 - £199 = 1.4
£200 - £249 = 1.5
£250 - £299 = 1.6
£300 - £349 = 1.7
£350 - £399 = 1.8
£400 - £449 = 1.9
£450 - £499 = 2

For every extra £50 in the prize pool, add 0.1

Entrants
0 - 9 = 0.5
10 - 19 = 0.6
20 - 29 = 0.7
30 - 49 = 0.8
50 - 74 = 0.9
75 - 99 = 1
100 - 124 = 1.1
125 - 149 = 1.2
150 - 199 = 1.3
200 - 249 = 1.4

For every extra 50 players in the tournament, add 0.1


Example:

32 players in a £10 freezeout tournament.
Prizepool = £320
Place = 3rd

So: Place x Prizepool x Entrants
= 3rd x 320 x 32
= 80 x 1.7 x 0.8
= 108.8
= 109 Points.


Some points about the formula:
1) Points will be rounded to the nearest whole number. 0.5 is rounded up.
2) Anybody outside the money gets allocated an automatic 5 points for attendance
3) The formula only gives points to paid players. E.g If you finished 7th, but we only paid top six, you get the 5 points, nothing more.
4) This formula is provisional. We have got the whole year to play poker, if we find that the formula does not work after a couple of weeks, we may totally restart the league format.



Thank you for any help

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Need help with tough Formula.
« Reply #1 on: September 07, 2007, 10:44:21 AM »
Code: [Select]
assign("place", switch(r, 1, 120, 2, 100, 3, 80, 4, 60, 5, 50, 6, 40, 7, 30, 8, 20, 9, 10, 6, 11, 6, 12, 6, 13, 6, 14, 6, 15, 6, 16, 6, 17, 6, 18, 6))
assign("prize", 1.1 + (floor(prizePool / 50) * 0.1))
assign("entrants", if(n < 10, 0.5, if(n > 9 && n < 20, 0.6, if(n > 19 && n < 30, 0.7, if(n > 29 && n < 50, 0.8, if(n > 49 && n < 75, 0.9, if(n > 74 && n < 100, 1, if(n > 99 && n < 125, 1.1, if(n > 124 && n < 150, 1.2, (1.2 + (floor((n-100) / 50) * 0.1)))))))))))

if(inTheMoney, round(place * prize * entrants), 5)

PJAYPITP

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Need help with tough Formula.
« Reply #2 on: September 10, 2007, 07:40:32 PM »
i also have a problem with automated scoring

at the moment i found it easier to do it with excel but as TD has unlimited possibilities i might aswell combine the 2

heres my prob

players can range from 10 -50

points per player = 100

1st receives bonus 1000
2nd receives bonus 600
3rd receives bonus 300


so if you came 4th on a ten seater you'd get 600 points
3rd would get 700 + 300 bunus

any help please

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Need help with tough Formula.
« Reply #3 on: September 11, 2007, 10:41:33 AM »
So, in a 10-player tourney, 10th would get 0, 9th would get 100, 8th would get 200, etc, down to 1st getting 900?  And 1st through 3rd would get additional bonus points?

And in a 25-player tourney, 25th would get 0, 24th would get 100, down to 1st getting 2400 (+ bonus)?

If that's the case, it seems it should be:

Code: [Select]
((n-r) * 100) + switch(r, 1, 1000, 2, 600, 3, 300)

If not, provide more details...

PJAYPITP

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Need help with tough Formula.
« Reply #4 on: September 11, 2007, 05:45:55 PM »
thnx for the help chief ;)

close, but 10th would recieve 100 points and so on

all the rest of your data is correct

Corey: can you explain where to post this forula when you post please as i'm a complete n00b

Cancel the last request...i guess you paste it on the game page in "points for playing"  ;) (feeling less n00bey)  ;D

w00t i think i got it

((n-r+1)* 100) + switch(r, 1, 1000, 2, 600, 3, 300)

i played around with it for a while and it works....guess i'll find out for real tonight...lol

one thing...can you explain why ((n-r+1)* 100) makes last place receive 100 pointrs where as yours makes last = 0

how the +1 changes things?

and the +switch statement? does that refer to addition bonus points for placing top 3

and if your wondering !! yes i did fail math  >:(
« Last Edit: September 12, 2007, 07:30:04 AM by PJAYPITP »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Need help with tough Formula.
« Reply #5 on: September 12, 2007, 10:59:52 AM »
n = number of players
r = the player's rank

In a 10 player tournament, the player who gets 10th place will obviously have a rank of 10:
n - r  = 10 - 10 = 0

So 10th place would receive 0 points (0 * 100 = 0).  9th place:
n - r = 10 - r = 1

So 9th place would receive 100 points (1 * 100 = 0).  The reason I initially made the formula this way is that, if you continue down through the ranks, you get to 3rd place:
n - r = 10 - 3 = 7

So 3rd place would receive 700 points, as you described.  By changing it to:
n - r + 1 = 10 - 3 + 1 = 8

3rd place will receive 800 points, not what you indicated.

My formula (before bonus) gives the points:
1st, 900.00
2nd, 800.00
3rd, 700.00
4th, 600.00
5th, 500.00
6th, 400.00
7th, 300.00
8th, 200.00
9th, 100.00
10th, 0.00

Yours gives:
1st, 1,000.00
2nd, 900.00
3rd, 800.00
4th, 700.00
5th, 600.00
6th, 500.00
7th, 400.00
8th, 300.00
9th, 200.00
10th, 100.00

So I guess yours (n-r+1) is what you really wanted, but your specifications for 4th place getting 600 points and 3rd place getting 700 points (plus bonus) was not correct.

The switch function adds the bonus points for ranks 1, 2, and 3.  There is a description of the switch() function in the user manual.

PJAYPITP

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Need help with tough Formula.
« Reply #6 on: September 12, 2007, 11:43:04 AM »
Yeah slight confusion my fault sorry

(quote corey blah blah bracket blah}

Yours gives:
1st, 1,000.00
2nd, 900.00
3rd, 800.00
4th, 700.00
5th, 600.00
6th, 500.00
7th, 400.00
8th, 300.00
9th, 200.00
10th, 100.00

which is what i need... plus the bonuses 1000 600 300

i just did a test on a 5 player and with the formula  i changed it gives 900 points for 3rd

eg
5th 100 - correct
4th 200 - correct
3rd 900 - strange
4th 1600 - even stranger
5th 2500 jeez i screwed it up somewhere  ???

edited by an uber noob!!

make sure you remove any prizes you have in the prizes tab i.e 300-600-900...lmao
« Last Edit: September 12, 2007, 02:53:19 PM by PJAYPITP »

Sneds

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Need help with tough Formula.
« Reply #7 on: September 15, 2007, 05:04:02 PM »
Corey, thank you for a very quick reply. This post is in regards to my initial post on this topic.

I'm trying to test the forumla in a few tournaments and I'm then going to 'stats' and refreshing tournaments. Unfortunately, it doesn't seem to recognise that points have been awarded. Is there anyway around this?

I have saved tournament which say they should give points (at least 5 anyway for appearance) and it just isn't shown. I had intentions of exporting the league table for our website.

Also, I would like the above formula to be set as a kind of 'standard' for a certain league, however it doesn't seem to be able to calculate 'in the money (m)' for each individual tournament which means I need to adjust it for each one.

Any help would be appreciated.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Need help with tough Formula.
« Reply #8 on: September 17, 2007, 06:09:38 PM »
For the tournaments in which you applied this formula: load the tournament and go to the Players tab.  Do you see there that players have been awarded points?  If not, well, obviously cumulative stats will show no points as well.

If so, go to the Stats tab and after you Refresh Tourneys, press the Info button to see which tournament files were found, loaded, filtered, etc.  Might shed some light on why you aren't seeing what you think you should be seeing.

The "intheMoney" variable basically translates "is this player's rank less than or equal to the highest rank that will win a prize?".  If you've got prizes defined for 1st, 2nd, and 3rd place, inTheMoney will be 1 (true) for a player who ranks 1st, 2nd, or 3rd, and 0 (false) for everyone else.