Author |
Message |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 08/29/2008 23:33:51
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
I was adding a function to purge the random number players from my skin tracker script and I came across an anomaly.
Code:
487 31371_Imposter WomTeamAssassin 08/28/2008 06:02:41 PM
For those that don't know: When a player signs on with a name that was already used, and the cd-key hash doesn't match, the server tacks on Imposter to their name. If another player with another different key hash signs on, his name is changed to a random number each time he plays a map. The random number player will have his stats saved, but may never get to log in as that player ever again.
what happened here is that a player happened to be assigned a number that was already assigned.
The numbers go up to 65000.
Anyone with some statistical knowledge want to figure out how many bogus player stats are being tracked on the server if the server chose the same number twice out of 65000. (I passed my stats class, but I didn't retain a whole lot)
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 09/02/2008 00:37:33
|
Lad
Joined: 04/14/2008 19:13:31
Messages: 15
Location: Australia
Offline
|
From what I know, it doesn't necessarily mean that there will be x number of "bogus" entries, but it does seem to have a really low chance of happening.
If I remember correctly:
The chance of it happening once is 1/65000 and for that same number to get selected again would be another 1/65000.
So I think it's (1/65000) * (1/65000) which is a really small number; 1/4225000000
In other words, it isn't gonna happen too often.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 09/02/2008 01:52:27
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
I think the probability is a bit lower than that - but I am no expert.
I think the way to approach it is to look at the chance of not having a duplicate.
With 1 entry, the chance is 100%
With two entries, the chance of matching is 1 in 65000, so the chance of not matching is (64999/65000).
For the third entry, we have 2 entries to miss, so the chance of missing is (64998/65000). So our total chance after 3 entries is (64999/65000)*(64998/65000).
After the fourth entry, we end up with chance (64999/65000)*(64998/65000)*64997/65000).
And so on. once this probablity gets less than 50%, we know the probability of a match is greater than 50%.
After n entries, the probability is 65000!/((65000-n)! * (65000^n)), which becomes less than 0.5 when n is around 301.
So, Greater than 50% chance of it happening with 301 entries.
It is like the question "How many people do you need in a room to have a greater than 50% chance that 2 of them have the same birthday?" The first thought is 365/2 = 183, but the answer is 23 (according to wikipedia).
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 09/02/2008 02:12:32
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
Lad: There is a way to do it.
Wouldn't your answer mean that there are 4225000000 bogus entries?
Something still doesn't look right.
I think the problem with your approach is that you are finding the odds of getting a specific number twice...in a row.
The question should be worded: How many times would you have to roll a 65000 sided die to roll a number that was already rolled?
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 09/02/2008 02:21:47
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
Szlat wrote:
After n entries, the probability is 65000!/((65000-n)! * (65000^n)), which becomes less than 0.5 when n is around 301.
So, Greater than 50% chance of it happening with 301 entries.
Thank you Szlat.
You beat me to the response. It was starting to come back to me.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 09/03/2008 17:25:21
|
FRAGaLOT
Killing Spree
![[Avatar]](/dcforum/images/avatar/03afdbd66e7929b125f8597834fa83a4.jpg)
Joined: 01/23/2005 11:32:54
Messages: 32
Location: Kalee-forn-yah
Offline
|
This may explain why I've seen some players with just numbers (no name nor imposter) like 57234 today. I thought they were like idle bots or something since this player would die almost right away, and never scored any points. Would end up with -80 before round 16.
|
__ FRAGaLOT |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 09/03/2008 19:07:48
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
FRAGaLOT wrote:
This may explain why I've seen some players with just numbers (no name nor imposter) like 57234 today. I thought they were like idle bots or something since this player would die almost right away, and never scored any points. Would end up with -80 before round 16.
It is pretty common for the player to be using the default name 'player'. Many times they don't even know how to play UT.
Other times it is a new player that uses a common name like 'killer'
I have been on a couple of servers that the server will freak out during a map change and assign everyone a random number...I think it happens when the server has trouble accessing the player data file...usually a disconnect/reconnect will fix it.
If you see a player with this type of name, explain to them that the game will be much more enjoyable if they changed their name. Otherwise they will be building up stats that they will lose next map.
In theory it is possible to write a script that can scan all of the servers on UT for the names of all players and login to a rpg server with each one of those names and prevent anyone from playing rpg.
An easy fix for this is to clean out the playerdata every now and then.
|
|
 |
|