Feature request -> Better ranks

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Infamous
Average Program
Posts: 96
Joined: Sun Jul 16, 2006 2:27 pm

Feature request -> Better ranks

Post by Infamous »

We all know how bad the current server rankings are, the "ladder" Is useless,confusing,wrong and can be exploited. The multiplayer matches/rounds won only really tell you who plays on the server the most.

But what i'd like to see is a Percentage matches/rounds won. So the rankings would be in order of who has the highest percentage of wins.

It wouldn't be difficult to implement at all, you already have matches/rounds won, just add another stat "Matches/rounds lost" (or Matches/Rounds played) and using basic maths give a percentage. You could even still keep the old matches/rounds won stats.

In order to stop someone winning one match, then changing name and staying top of the rankings forever, have a minimum matches won (or played) before the score can be registered.

It's just an idea, but you know how much people love these kinda things, and the bragging rights that come with them. Even now, with the useless/shitty/inaccurate ones we have, everyday people say "i'm 3 on the ladder :D" etc... and there are lots of people who play hours on end JUST for the ladders... Imagine if they actually worked and meant something. 8)
Homer: Uh...it's like...did anyone see the movie "Tron"?
Dr. Hibbert: No.
Lisa: No.
Marge: No.
Wiggum: No.
Bart: No.
Patty: No.
Wiggum: No.
Ned: No.
Selma: No.
Prof. Frink: No.
Rev. Lovejoy: No.
Wiggum: Yes. I mean -- um, I mean, no. No, heh.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Write a parser for ladderlog.txt. It's got all the info in a readable format. The 0.2.8 internal stats system is dead anyway (Tank Program killed it :) ), so adding stuff to it is a long term waste.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

z-man wrote:Write a parser for ladderlog.txt. It's got all the info in a readable format. The 0.2.8 internal stats system is dead anyway (Tank Program killed it :) ), so adding stuff to it is a long term waste.
I didn't kill it... Just when it was, er, upgraded, I couldn't come up with anything better than ladder. Rounds played would be fairly easy to add.

I'm still keeping the stats stuff in the back of my mind. See my recent svn commit :).
Image
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

Reminds me of something.
Image
IIRC I killed SePiKu, but it happened too fast for enemy influence to attribute to me.

Code: Select all

 Player   Ladder Score  Matches Won  Rounds Won
Player 5    234.245         25           109
Player 5 stayed at/near the top for weeks.
ˌɑrməˈɡɛˌtrɑn
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

z-man wrote:Write a parser for ladderlog.txt. It's got all the info in a readable format.
I've thought about that. I can't think of a way to make it truely accurate.
It would be fairly simple to parse the file, load the results into a mysql table, and display the results on a website for the following:
rounds played
rounds won
total score
number of core dumps
number of team kills
number of suicides
from this data it would be a matter of a few simple queries to calculate results like
total rounds won/lost
%age rounds won
average score/round
if you got clever, you could work in a facility whereby the web user could enter two names, from this you could get how many time player_1 had core dumped/teamkilled player_2, etc
thinking about it that lot would make for some interesting browsing, certainly better than the current system.

It wouldn't have any match information. I'm not sure if you could add up points from each round to work out the winner from ladderlog.txt, but even if you could, if anyone cared about the won_matches, they could just switch to the winning team near the end of the match to bump up their points.
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

z-man wrote:Write a parser for ladderlog.txt.
Ok then, I will. Get it to populate a mysql table with it's findings. Build a php webpage to display the results (thanks wrtlprnft for the programming help ):
http://forums.crazy-tronners.com/ladders_new.php

It goes only on rounds, not matches. Contrary to my previous statement MATCH_WINNER is present in the log file and could easily be recorded, but could just as easily be cheated - just disconnect from the server on the last round if you're on the losing team, perfect match win rank.
If it was a non team server, this information would be crucial, but for CTWF it's been left out.

wrtl hacked the source a tad so single player info won't get written to the logs. Otherwise, you could join the server when it's empty and for every time you took armagetron's base you would be awarded a round win and 10 points, not good.

There is no overall ladder here, but you can sort by:

Percentage of Rounds Won
Top Average Points per Round
Top Coredumper
Least Coredumped
Least Teamkills
Least Teamkilled
Least Suicides

And make your own mind up.

There's less than a day's data in there at the mo, and I will be clearing that down in a couple of days, give everyone a fair chance to build their own scores up. But, you get the idea.
Currently you need to have won >=50 rounds to reach the scoreboard. I'm sure this will be increased in time.

The question....
Is this type of ladder a good thing?
Do people want every move they make recorded?

Any comments/requests welcome.
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

For those interested the new ladder has all but replaced the old one at CTWF.
That is, when you enter you (and only you) are told your rank and ladder score, if you have one.
This is updated at the end of each match and you are told your new rank and number of ladder points. The old ladder totals have been removed from output.
Everyone will see the top 10 ranks at the end of each match.
ip and ct phpbb forum user_id(if they have one) are also stored against the name. So if authentication becomes an issue, there are ways to fix it.

The ladder is here: http://forums.crazy-tronners.com/ladders_new.php

to get on it you must have played at least 100 rounds in the last 21 days. The ladders score is worked out as follows:

( (ave_points/2) - ave_coredumped - ave_teamkilled - ave_suicides ) x %age rounds_won

It is flawed, that is, if your (ave_points/2) - ave_coredumped - ave_teamkilled - ave_suicides is < 1 your ladder score is less for the %wins you have.
Any improvements welcome.
User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

ed wrote:( (ave_points/2) - ave_coredumped - ave_teamkilled - ave_suicides ) x %age rounds_won
~
Any improvements welcome.
I think it works very well.

Suggestions
However I'ld like to see team killing count less against you since its usually not deliberate mabey have .5 or .75 of the average count against you. Also I think you should add something to keep players from stat camping. Mabey reset the ladder once a month or every 3 months. Then you could combine those for the year and only keep the yearly ladder stats logged(or even limit it to top 100 50 25 or 10 if your short on hosting space).
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

Your_mom wrote:I'ld like to see team killing count less against you since its usually not deliberate mabey have .5 or .75 of the average count against you.
Teamkilling has no effect on the ladder. But getting teamkilled does. Avoiding getting yourself into the situation in the first place is part of the challenge.
Your_mom wrote:Also I think you should add something to keep players from stat camping. Mabey reset the ladder once a month or every 3 months. Then you could combine those for the year and only keep the yearly ladder stats logged(or even limit it to top 100 50 25 or 10 if your short on hosting space).
Well, a log is kept for each player for each day. Currently it just looks at the records for the last 21 days, this keeps the ladder very dynamic, and you need to keep playing to stay on them.

About stat camping. There's no denying a good defender will do better on the stats than a good attacker, he has more kills.
I'd really like to award points for players who "take" the enemy zone. But I don't think this is currently possible.
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

I've been asked by more than a couple of people how this was done. Here's the files you need. It is fiddly. These are the files used when the CT ladder was running off ladderlog.txt, since we found it didn't give us all the info we needed so have created a new log file. So, there are small bugs in it which have since been fixed, nothing major.
This new log file (edlog.txt ;) )controls everything from map/setting rotation, a timer for setting change, the ladder and if you pop into Voodoo's CT Wild Marathon, total server type rotation control both automatically and manually.
I won't go into that right now, it's another beast altogether, and it's still work in progress.

Ok, here's 4 files,
script.sh, that feeds the ladderlog.txt into the parse script that updates the mysql database.
ladder.php, the parsing script
ladder_ladle.php, the script behind this page.
structure.sql, the mysql table structure needed. There are a few fields you will notice are not used, they are when used with edlog.txt. Remove them or ignore them.

When I updated the database for the ladle logs I used cat ladderlog.txt | ladder.php which works but the script is not designed this way and you have to kill it manually when it's finished as it gets stuck in a permanent loop.
If you do it this way, ask for logs just like zmans ladderlogs here.

I think that's all, any questions let me know.
Attachments
ladder_stuff.tar.gz
(4.43 KiB) Downloaded 289 times
User avatar
Angel
We love Angel!
Posts: 51
Joined: Sun Jul 11, 2004 12:35 am
Location: United Kingdom
Contact:

Post by Angel »

hi, i am just wondering what im doing wrong, when i try to create the db i get this error

#1064 - You have an error in your SQL syntax near 'character set latin1 collate latin1_bin default NULL,
`user_id` int(11) NOT NU' at line 4


I asked a friend for help and was advised to change the line to
`player` varchar(20) default NULL,

which worked, but only in giving me a different error
#1064 - You have an error in your SQL syntax near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `l' at line 17

so i would be grateful for any help :) thankyou in advance
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

Try this file, I've removed all unnecessary stuff.
You may have an older version of mysql.
Attachments
structure2.sql.tar.gz
(532 Bytes) Downloaded 270 times
Last edited by ed on Wed Apr 18, 2007 10:03 am, edited 4 times in total.
User avatar
Angel
We love Angel!
Posts: 51
Joined: Sun Jul 11, 2004 12:35 am
Location: United Kingdom
Contact:

Post by Angel »

Thanks for that and for being so fast, i just tried and got this error

#1064 - You have an error in your SQL syntax near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
)' at line 17


sorry for being such a pain
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

oops :oops:
sry, take the "," out after PRIMARY KEY (`id`)

edit: I have updated the file above ^ with the fix.
User avatar
Angel
We love Angel!
Posts: 51
Joined: Sun Jul 11, 2004 12:35 am
Location: United Kingdom
Contact:

Post by Angel »

thanks and again and so sorry im still getting an error :oops:

MySQL said:

#1064 - You have an error in your SQL syntax near 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
)' at line 17


could it be something im doing wrong ?
Post Reply