Author Topic: Points Payout Based On Players Formula  (Read 7288 times)

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Points Payout Based On Players Formula
« on: October 04, 2006, 09:11:30 AM »
I am about to start a league.
And after setting up a points system, I had a chat to a friend.
He said
In a 8 person tourny, why should a player that beats 8 players in one game get 500 points.
and in a 20 person tourny, a player who beats 20 players get 500 points too.

I'm trying to put together formula (it being 11:28pm at night I'm not with it)
So I'm hoping that base on the information below... Corey or some one could help me please.

We have players ranging from 6 to 40... depending on the night..
So we want to allocate 100 points for each players...
5 players = 500 points total
10 players = 1000 points total, etc

Then points payouts pay out based on places and %

We want to keep the points close-ish. because we are having a Grand Final after 10 weeks
were the points earned are multiplied by a number... and give out in chips.

So i would be thinking... for example...
PERCENTAGE
10 Players - 30%, 20, 12, 10, 8, 6, 5, 4, 3, 2
20 Players - 30%, 20, 10, 8, 6, 5, 4, 3, 2, 1...etc
30 Players - 27%, 18, 9, 7, 6, 5, 4, 3, 2, 1.5...., 1...., 0.75.

POINTS
10 Players - 300, 200, 120, 100, 80, 60, 50, 40, 30, 20.
20 Players - 600, 400, 200, 160, 120, 100, 80, 60, 45, 35, 20...20.
30 Players - 810, 540, 270, 210, 180, 150, 120, 90, 60, 45, 30...30, 22.5....22.5

(**I hope you have gotten this far**)

Now... how the heck can i put that into a formula, that can be easily adjusted based on players (if 14 were there etc)
Similar to the XML files that TD uses for this pay out cash prizes thing.
It might be because its now 12:00AM but if any one could help... i would really love it.
I have since got a license to this software too... and never looked back!

I have also attached a file... that explains what i mean by all this...
« Last Edit: October 04, 2006, 09:17:12 AM by jellygoose21 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #1 on: October 04, 2006, 11:51:19 AM »
Not exactly the most efficient formula, but it works:

Code: [Select]
if(n < 15,
  if(r==1, 300, if(r==2, 200, if(r==3, 120, if(r==4, 100, if(r==5, 80, if(r==6, 60, if(r==7, 50, if(r==8, 40, if(r==9, 30, if(r==10, 20, 0)))))))))),
  if(n < 20,
    if(r==1, 450, if(r==2, 300, if(r==3, 180, if(r==4, 150, if(r==5, 120, if(r==6, 90, if(r==7, 60, if(r==8, 45, if(r==9, 30, if(r>9 && r<14, 15, if(r==14 || r==15, 7.5, 0))))))))))),
    if(n < 25,
      if(r==1, 600, if(r==2, 400, if(r==3, 200, if(r==4, 160, if(r==5, 120, if(r==6, 100, if(r==7, 80, if(r==8, 60, if(r==9, 45, if(r==10, 35, if(r>10 && r<21, 20, 0))))))))))),
      if(n < 30,
        if(r==1, 750, if(r==2, 500, if(r==3, 250, if(r==4, 200, if(r==5, 150, if(r==6, 125, if(r==7, 100, if(r==8, 75, if(r==9, 50, if(r>9 && r<15, 25, if(r>14 && r<21, 18.75, if(r>20 && r<25, 12.5, if(r>24 && r<26, 6.25))))))))))))),
        if(r==1, 810, if(r==2, 540, if(r==3, 270, if(r==4, 210, if(r==5, 180, if(r==6, 150, if(r==7, 120, if(r==8, 90, if(r==9, 60, if(r==10 || r==11, 45, if(r>11 && r<19, 30, if(r>18 && r<31, 22.5, 0))))))))))))
      )
    )
  )
)

Another way would be to specify your own autoPrizes.xml file, and add prizes for each of the places that should receive points (you can also turn off the display of these prizes on the Tournament page).  Give the prizes a fixed value of 0 (for the cash amount) and give them a points value according to their rank .  Then, when you run your tournament, create your own prizes for the cash portion of the pot and lock them so they aren't erased by the automatic prizes.

Remember that computing this formula for every player every time the state of the tournament changes could be a drain on a the resources of an older PC....

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #2 on: October 04, 2006, 09:08:25 PM »
Thanks heaps Corey... your awesome
One other question i have though...
is there a way that...

for every player... 100 points is added to the points... (ie 5 players = 500, 6 = 600, 7= 700, 12 = 1200)
and then givin outs in a %... and then the share the over flow with top 5 or something?

so the same setup as in the excel sheet... but if there is 26 players... then the same % is given but
the top 5 players get the extra 100 points divided up based on postition.

or is this to far complex? (or just doesnt make sence, lol)
I've prolly made this way to complex!

Thankyou.

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #3 on: October 04, 2006, 09:40:16 PM »
In short... lol...

100 points = 1 player.
points get totaled up depedning on players....
and then giving out bsed on rank.

ranging anywhere from 5 players... to 40+ players.
Winning player of 5 player, or 10 player, or 20 player
get top points... all the way down to last place...
be it 5th, 7th, 9th, 21st, 32nd, 43rd... etc...

is it able to be done via formula. or by the xml?
ive been sitting here... trying anything and everything.
i think i have confused myself!!

this isnt really "in-short" is it... lol.

oh and another mind twister to add...
one of the tournys being held is a rebuy tourny...
which will add another 100 points for each rebuy.

on paper i can work it out...
but i would so love TD2 to do it all.

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #4 on: October 04, 2006, 09:55:06 PM »
ok... really... in short.

Like the cash prises...
Play buys in.. 20$
all money it added up...
and at the end... is given out to all players..
and the top 3 share the overflow.

in a sence... thats how i want to do it with the points
player buys in
100 points is added to kitty... (rebuy adds 100)
at the end... based on a 5-10, 11-20, 21-30 suggested payout... etc

every one is payed out points... all places... on a %
and then if ther is only 16, players... the % for 17th,18th,19th,20th
will be shared by the top 5 players (for example)

EDIT: just as a example from your code you posted before...
if(n < 15,
  if(r==1, 30%, if(r==2, 20%, if(r==3, 12%, if(r==4, 10%...........etc
but then some where in there need to add the account of re-buys too.
1st place = 30% + (30% of rebuys) or 1st place = (n + r / 30%)
And then some how include the points left over if over flow to 1st,2nd,3rd

 :'( ??? ??? ??? ??? ??? ??? ??? ??? :'(

END EDIT

i hope that makes it sound better... im so ega to get this working!!
hehe...

"You know you love Tournament Director, when you dream about it at night"
« Last Edit: October 05, 2006, 12:03:04 AM by jellygoose21 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #5 on: October 05, 2006, 03:53:51 PM »
Well, the way you would do it is to change all of the points values in the formula I posted to ((n+nr)*100) multiplied by the percentage.  For example:

if(n < 15,
  if(r==1, ((n+nr)*100)*.3, if(r==2, ((n+nr)*100)*.2, if(r==3, ((n+nr)*100)*.12, if(r==4, ((n+nr)*100)*.1, if(r==5, ((n+nr)*100)*.08, if(r==6, ((n+nr)*100)*.06, if(r==7, ((n+nr)*100)*.05, if(r==8, ((n+nr)*100)*.04, if(r==9, ((n+nr)*100)*.03, if(r==10, ((n+nr)*100)*.02, 0)))))))))),...

((n+r)*100)*.3 reduces to (n+r)*30, etc.

It is technically possible to determine if there are leftover points and give them to the top X places, but I don't even want to attempt it.  "Leftover", by the way, should only happen due to rounding.  Because prize money can be rounded to the nearest whole number, the nearest 5, 10, 20, 100, etc, there can be large amounts of leftover, and hence the need to distribute it.  Points are always calculated to 2 decimal places, and therefore, any leftover will always be less then 1, so long as your percentages add up to 100.

Unless of course you round the points yourself (using the round function), but you're on your own there.

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #6 on: October 05, 2006, 06:14:41 PM »
This might sound gay... But I love you.
Funny thing was this monring when i was driving to work...
I thought of the same fomula... but no idea how to put it into practice
Thanks heaps Corey! Your Awesome!!
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #7 on: October 05, 2006, 11:33:34 PM »
i just had a thought...
so u set it up like this...
10-20 players...
20-40 players... etc

u set the % up... for 1st,2nd,3rd,4th....20th.
if u only have 15 players that night... there is going to be say 5% left over for 16th,17th,18th,19th,20th.

and its that 5% that i would like to give out to either the top 3... or to the X players that night.

it doesnt make that much of a big deal...
but when im going to sell the idea of 100 points for each player that night
i want the total points to add up to X * 100

eg 15 * 100 = 1500

that will give a total of 1425 points to the 15 players. leaving 75 points as over flow.

the only way there would be less the 1 would be if there was 20 players.

and the only other way i could work it out would be to write the formula for every single possible starting players.

so...(again) in short... all i need to do is work out a way to add the % of points of players not playing and give them out to the others.
is there anyway this can be done??

this would make me 100% happy... right now im 95%...

again... thanks heaps for your help Corey... my formula (your formula) with a little edit is looking swell... atm.

will post when complete... in the mean time... any help with the issue above... and i would be over the moon.

jellygoose21

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #8 on: October 11, 2006, 10:44:34 PM »
After about an hour of creating... here is a sample of what i ended up doing for players/rebuys up to 30...

if(n+nr >=3 && n+nr <= 6, if(r==1, ((n+nr)*100)*.35+(n+nr), if(r==2, ((n+nr)*100)*.25+(n+nr), if(r==3, ((n+nr)*100)*.15+(n+nr), if(r==4, ((n+nr)*100)*.12, if(r==5, ((n+nr)*100)*.08, if(r==6, ((n+nr)*100)*.05, 0)))))),


if(n+nr >=7 && n+nr <= 9, if(r==1, ((n+nr)*100)*.32+(n+nr), if(r==2, ((n+nr)*100)*.22+(n+nr), if(r==3, ((n+nr)*100)*.13+(n+nr), if(r==4, ((n+nr)*100)*.11, if(r==5, ((n+nr)*100)*.08, if(r==6, ((n+nr)*100)*.05, if(r==7, ((n+nr)*100)*.045, if(r==8, ((n+nr)*100)*.025, if(r>=9 && r<=10, ((n+nr)*100)*.02, 0))))))))),


if(n+nr >=10 && n+nr <= 12,if(r==1, ((n+nr)*100)*.3+(n+nr), if(r==2, ((n+nr)*100)*.2+(n+nr), if(r==3, ((n+nr)*100)*.12+(n+nr), if(r==4, ((n+nr)*100)*.1, if(r==5, ((n+nr)*100)*.08, if(r==6, ((n+nr)*100)*.06, if(r==7, ((n+nr)*100)*.04, if(r==8, ((n+nr)*100)*.03, if(r==9, ((n+nr)*100)*.025, if(r==10, ((n+nr)*100)*.02, if(r==11, ((n+nr)*100)*.015, if(r==12, ((n+nr)*100)*.01, 0)))))))))))),


if(n+nr >=13 && n+nr <= 16,if(r==1, ((n+nr)*100)*.3+(n+nr), if(r==2, ((n+nr)*100)*.2+(n+nr), if(r==3, ((n+nr)*100)*.1075+(n+nr), if(r==4, ((n+nr)*100)*.0875, if(r==5, ((n+nr)*100)*.0675, if(r==6, ((n+nr)*100)*.055, if(r==7, ((n+nr)*100)*.04, if(r==8, ((n+nr)*100)*.03, if(r==9, ((n+nr)*100)*.025, if(r==10, ((n+nr)*100)*.025, if(r==11, ((n+nr)*100)*.02, if(r>11 && r<15, ((n+nr)*100)*.01, if(r>14 && r<17, ((n+nr)*100)*.005, 0))))))))))))),


if(n+nr >=17 && n+nr <= 20,if(r==1, ((n+nr)*100)*.3+(n+nr), if(r==2, ((n+nr)*100)*.2+(n+nr), if(r==3, ((n+nr)*100)*.1+(n+nr), if(r==4, ((n+nr)*100)*.08, if(r==5, ((n+nr)*100)*.06, if(r==6, ((n+nr)*100)*.05, if(r==7, ((n+nr)*100)*.04, if(r==8, ((n+nr)*100)*.03, if(r==9, ((n+nr)*100)*.025, if(r>9 && r<12, ((n+nr)*100)*.02, if(r>11 && r<15, ((n+nr)*100)*.01, if(r>14 && r<21, ((n+nr)*100)*.0075, 0)))))))))))),


if(n+nr >=21 && n+nr <= 24,if(r==1, ((n+nr)*100)*.3+(n+nr), if(r==2, ((n+nr)*100)*.2+(n+nr), if(r==3, ((n+nr)*100)*.1+(n+nr), if(r==4, ((n+nr)*100)*.08, if(r==5, ((n+nr)*100)*.06, if(r==6, ((n+nr)*100)*.05, if(r==7, ((n+nr)*100)*.04, if(r==8, ((n+nr)*100)*.03, if(r==9, ((n+nr)*100)*.02, if(r>9 && r<15, ((n+nr)*100)*.01, if(r>14 && r<21, ((n+nr)*100)*.0075, if(r>20 && r<23, ((n+nr)*100)*.0050, if(r>22 && r<25, ((n+nr)*100)*.0025, 0))))))))))))),


if(n+nr >=25 && n+nr <= 27,if(r==1, ((n+nr)*100)*.3+(n+nr), if(r==2, ((n+nr)*100)*.2+(n+nr), if(r==3, ((n+nr)*100)*.1+(n+nr), if(r==4, ((n+nr)*100)*.08, if(r==5, ((n+nr)*100)*.06, if(r==6, ((n+nr)*100)*.05, if(r==7, ((n+nr)*100)*.04, if(r==8, ((n+nr)*100)*.03, if(r==9, ((n+nr)*100)*.02, if(r>9 && r<15, ((n+nr)*100)*.01, if(r>14 && r<21, ((n+nr)*100)*.0075, if(r>20 && r<24, ((n+nr)*100)*.0050, if(r>23 && r<28, ((n+nr)*100)*.0025, 0))))))))))))),


if(n+nr >=28 && n+nr <= 30,if(r==1, ((n+nr)*100)*.295+(n+nr), if(r==2, ((n+nr)*100)*.195+(n+nr), if(r==3, ((n+nr)*100)*.1+(n+nr), if(r==4, ((n+nr)*100)*.08, if(r==5, ((n+nr)*100)*.06, if(r==6, ((n+nr)*100)*.05, if(r==7, ((n+nr)*100)*.04, if(r==8, ((n+nr)*100)*.03, if(r==9, ((n+nr)*100)*.02, if(r>9 && r<15, ((n+nr)*100)*.01, if(r>14 && r<21, ((n+nr)*100)*.0075, if(r>20 && r<25, ((n+nr)*100)*.0050, if(r>24 && r<31, ((n+nr)*100)*.0025, 0))))))))))))),


if(r==1, 810, if(r==2, 540, if(r==3, 270, if(r==4, 210, if(r==5, 180, if(r==6, 150, if(r==7, 120, if(r==8, 90, if(r==9, 60, if(r==10 || r==11, 45, if(r>11 && r<19, 30, if(r>18 && r<31, 22.5, 0))))))))))))
 
)
)
)
)
)
)
)
)


i could prolly clean it up a little bit... but it seems to do 95% of the job.

theHammer

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #9 on: October 12, 2006, 08:29:00 AM »
round(10*sqrt(n)/sqrt(r))

This formula ends up giving more points to top finishers against a large number of entrants, and less points to top finishers against a lesser field.

round(10*sqrt(n)/sqrt(r))+nh+(3*nb)+(5*nbk)-nr

I've added to it, to award points for Hits and Bounties, and take a point away for a Rebuy (we only allow one rebuy).

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #10 on: October 12, 2006, 10:51:16 AM »
That's one helluva formula!  But I'm not sure it really does what you claim.  Perhaps you could provide us with a mathematical proof?  :)

theHammer

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #11 on: October 12, 2006, 04:25:26 PM »
I got the basis for it out of the Help Files.  Look under 8.1.1 - Points for Playing examples.

It's interesting that, for example, if I finish at 25% thru the field (i.e. - 12th place out of 16), I am awarded the same number of points that night (12 points - rounded) as I would be if I finish at 25% thru the field with 40 players (30th place out of 40 = 12 points - rounded).

BUT, if I finish 1st out of 40, I'd be awarded 63 points vs. 1st out of 16 and being awarded only 40 points.

To take it further, if I finish at 75% thru the field (i.e. - 4th out of 16), I am awarded the same number of points that night (20 points) as I would be if I finish at 75% thru the field with 40 players (10th out of 40 = 20 points).

BUT, if I finish 4th out of 40, I'd be awarded 32 points vs. 4th out of 16 and being awarded only 20 points.

If I finish 3rd out of 40, I'd be awarded 32 points vs. 3rd out of 16 and being awarded only 23 points.

If I finish 2nd out of 40, I'd be awarded 45 points vs. 2nd out of 16 and being awarded only 28 points.

All in all, I think this is a pretty fair formula.

theHammer

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #12 on: October 12, 2006, 04:29:20 PM »
...above SHOULD read...

If I finish 3rd out of 40, I'd be awarded 37 points (not 32)

jrizzo77

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #13 on: January 09, 2007, 07:22:29 PM »

Another way would be to specify your own autoPrizes.xml file, and add prizes for each of the places that should receive points (you can also turn off the display of these prizes on the Tournament page).  Give the prizes a fixed value of 0 (for the cash amount) and give them a points value according to their rank .  Then, when you run your tournament, create your own prizes for the cash portion of the pot and lock them so they aren't erased by the automatic prizes.

Remember that computing this formula for every player every time the state of the tournament changes could be a drain on a the resources of an older PC....

Corey,  I am trying to edit the autoprizes file like you suggested but I am having no luck with assigning points.

Would this be correct code?
<prizeLevel minPlayers="7" maxPlayers="9">
    <prize rank="1" percent="70" shareLeftover="true" points="5"/>
    <prize rank="2" percent="30" points="3"/>
  </prizeLevel>

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Points Payout Based On Players Formula
« Reply #14 on: January 10, 2007, 10:23:15 AM »
Certainly looks right to me.  When you set the preferences to use your XML file for automatic prizes, does it not assign points to the prizes?  When you press the Automatic button on the Prizes tab, there is a "Show Config" button which will show you the various prize levels that it parsed from the file.  Do those correctly display points?