Collecting fight statistics

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
Lucifer
Project Developer
Posts: 8645
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Collecting fight statistics

Post by Lucifer »

It occurs to me that we can check for some things. :)

First, assume that when two players start dueling, there's a pot of points. Let's say it's 2 points, like it is on the cvs fortress server. If you win, you get two points, if he wins, he gets two points. Then you measure the two player's distance at certain intervals (every timestep?). If their average distance over a given period of time is within a certain margin, then you add a point to the pot, so the kill is now worth 3 points. But if the average distance goes over that margin, then you clear the pot. Obviously not a complete idea, but the question is, is there something to be gained by using distance measurements in this fashion? You could also check a two player's distances, and if it starts large, then gets small quickly, and then suddenly one player kills the other one, you could say "<player who died> loses 1 point for being owned", or something like that.

Second, draw a line from a cycle to the enemy zone and check which cycle's walls the line crosses. If it crosses any enemies, store it. Then, over time, if the same cycle wall appears between the same cycle and it's opposing zone, you can mark that cycle wall's owner as "defending the zone". Give another time threshold, and then award him extra points, either at the round's conclusion, or after the time threshold, for defending the zone. How to do this without getting false positives, I don't know.

Third, when a cycle enters the fortress, you already know he's there. And you're already timing how long he's there. So mark it, and if he's there for a certain minimum threshold, and then afterwards the zone resets, give the cycle responsible an extra point for defending the zone.

Hmm, just some half-baked ideas. What sort of primitive data collection can we do that can be used to determine what's happening?
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

I'm opposed to giving the TEAM score for effort. The TEAM should get points only for results: killing enemies or taking the zone.
However, we could use these various statistics to distribute the round win score, that currently goes only to the team, among the players. To reward individual contributions. Or punish disruptors: team kills, suicides and deaths in the first seconds of a round can be taken into account here as well. Since the team score is unaffected and a true team player does not look at his individual score anyway, false positives would not be that much of a problem.

Checking the distance between each cycle pair and constant raycasts would be too expensive, I guess, so we should look for alternatives.

For defense detection, we could do this: Everytime someone grinds a wall, we check whether that wall blocks the player from the enemy fortress by checking whether the wall is between the player and the fortress. I think this would be most useful if it is restrictable to the midfield. The goalie gets enough points for swallowing up the attackers already.

For the engangement bonus, we could let each cycle collect statistics about its position. Tough fight bonus points could then be given if attacker and victim did not move around too much for some seconds before the kill.
User avatar
Lucifer
Project Developer
Posts: 8645
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

We should probably assume there are alternatives, for example just storing the current state with every other timestep, or every 10th timestep, or something like that, and then doing the analysis after the round is over, or running *gasp* a separate thread, and we push each timestep into this other thread that runs the end-of-round analysis while the round is still going, or whatever.

I guess, would these methods give us the information I'm saying they would? What other statistics could be collected that would give us more information?

I was thinking if a person is tunneling, we can detect that be seeing that there are walls on both sides of the cycle within a certain distance threshold. Mark that he's tunneling. When he's done (either by dying, or by getting out of the tunnel), mark that he's done. How many times did he turn while tunneling?

Maybe instead of checking for specific things, we can just analyze his state, such as noting his area of influence and other cycles nearby. Then in an end of round analysis, we can see that one cycle's influence prevented another cycle's influence from stretching to a given point (the fortress), or that one cycle's area of influence was always small (he was boxed in), but he still survived the round.

Maybe we can use the recording code to record the round to memory, and then just analyze that at the end of the round, or on-the-fly, or whatever. Then we could check specific things and make callbacks for 3rd party libraries/scripts to do their own checks.

I guess it doesn't matter if we analyze on the fly, just that we figure out what information we can collect, and how, and how to make it possible to give awards/penalties based on it. :)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
gnorty
Core Dumper
Posts: 187
Joined: Wed Nov 02, 2005 2:45 am

Post by gnorty »

Im not sure that points deductions for teamkills would achieve anything.

firstly, many team kills are the fault of the person killed.

Secondly, a person intnt on disruption would not care about negative tallies - indeed it could be taken as a trophy.

Worse still, a disrupter with a particular problem with another player could upset the victims score by deliberately being TK'd

Maybe you could keep a tally in the background, not on display. if a player has a very high percentage of TK's with a significant total number of kills, then auto kick. (you wouldnt want to kick somebody with a 100% TK record if they messed up the first round)

The game is starting to attract spoilers, and the constant votes is almost as big an issue. a quiet automatic removal would be a good alternative, especially if that was followed with a temporary block on the IP.

Incidentally why can players not be blocked on an IP basis at present? I can't think of a technical reason, so Im guessing just not yet implemented?
User avatar
Lucifer
Project Developer
Posts: 8645
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Actually, we're talking about how we can collect statistics to offer rewards for good play. :)

0.2.8 will allow permanent IP bans, with the BAN_IP config directive, which you can add to everytime.cfg or server_info.cfg. I suspect we'll eventual support a banlist file, but this is it currently. You're right, there's no technical reason it hasn't been done, it just hasn't been done before is all. Previously we used firewalls to do it, and I, for one, welcome our new BAN_IP overlords.

It occurs to me that we don't have to give a point award for good gameplay, we could just offer a statistical summary of each match showing what each player did. So if a player has a personal score of 0, but his team wins, it won't automatically be assumed that that particular player did nothing for the team. Instead, you might see that he's credited with 4 assists taking the zone, 7 successful defenses, etc.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Lucifer wrote:I guess, would these methods give us the information I'm saying they would?
I think so, yes.
Lucifer wrote:What other statistics could be collected that would give us more information?
We could see if players pass through holes blown by other players. The holes aren't actually holes, they're just non-dangerous walls, so that's technically easy.

Gnorty: The computer is very bad at detecting malice. Look at chat spammers, they know precisely how much spam is allowed before they get silenced. The same would happen for team kill based kicks, they'll find out how many team kicks are tolerated and do just as many. And any detection we do is likely to be way slower than the players judging for themselves (or a keen admin) because the code has to give the players a huge benefit of the doubt.
gnorty
Core Dumper
Posts: 187
Joined: Wed Nov 02, 2005 2:45 am

Post by gnorty »

Apologies for the off-topicness of my post - I confess to some pre-bedtime browsing and I didn't really read the whole thread.

In the interests of highlighting good play, it strikes me that just as computers cannot detect malicious play, they cannot reliably detect good play. In both cases, however it is possible to detect some of the characteristics that are generally present in each case and apportion credit as appropriate.

So how about detecting a player's proximity to the zones as an indicator? VERY close proximity to an enemy zone, for a period of time perhaps, and general proximity to the home zone while enemies are also in proximity. It shouldn't be difficult to detect an attempt at an enemy base. If a flaf were set at this point, any outer defenders could start racking up points. Direct involvement in the overturning of the zone is a no-brainer and of course should be credited also.

Also - with reference to your "good battle" detection, It strikes me that a characteristic of this is a high number of manouvres over a short time, so if you detect a player and an enemy in close proximity, and they are both making quick manouvres, it is safe to say they are in battle. I am not familiar enough with C/C++ to go delving into the source, but from general programming experience this ought to be possible.
User avatar
2020
Outside Corner Grinder
Posts: 1322
Joined: Thu Dec 29, 2005 9:21 pm
Location: the present, finally

player recommendations

Post by 2020 »

how about formalising player comments?
you know
after someone does something well
teamplayers say something nice to them

kind of the opposite of the kick option
hence supporting self-sacrifice game play
that kind of thing
hold the line
User avatar
Lucifer
Project Developer
Posts: 8645
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Yeah, the catch is detecting a long battle with pauses. You know how you fight someone for awhile, then you find yourself in a stalemated race to the grid wall, usually to try to outgrind the other guy? Whoever sees it coming first usually turns or something, to change the fight.

The difference between rewarding detected good play and penalizing detected bad play is that people generally don't get upset when a bad reward for good play is given, but people generally *do* get upset when a bad penalty is given, so we're safe to accidentally give an award to someone for defending the zone when they were just a chatbot, but if we, say, killed the person credited with a teamkill just because his teammate happened upon his wall we'd piss him off. Besides, the pyschologists have studied this. :) Punishment doesn't work in the long run, but reinforcement does. So, reward the behavior you want and you will get more of it. That's why it's so hard sometimes to get people not to charge the zone, especially if they can't get it together as a defensive team.

Anyway, proximity to the zone could be used. ;) It's a safe bet that if a player is in close proximity to the zone for most of the round, and the zone isn't conquered, and enemies came within close proximity to his wall, then he defended the zone. Also, it should be a shoe-in right now to detect that a player entered the enemy's zone and died.

Other assists should be easy to credit, like when a player is in the zone already, but there's a defender in it. So you go in after hiim to assist. That seems like a no-brainer.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
meriton
Round Winner
Posts: 256
Joined: Sun Nov 20, 2005 3:33 am

Post by meriton »

I am not sure Gnorty's suggestion of giving credit for zone proximity regardless of actual accomplishments is a good idea. Imagine an attacker circling the opponent fortress indefinitely. Since he is close to the goalie and the zone for a long time, he gets plenty of credit while nevertheless hampering the progress of his team.

Generally speaking, since the metric should measure what a player accomplishes on the grid, it seems more natural to base it on what she accomplishes, not what she tried to accomplish. While the latter might give a more refined assessment, identifying nice tries can be approximated at best, whereas success can be measured precisely.

I think the location of kills would make a simple and nevertheless useful statistic. For instance, a player could be awarded

5 points for killing an opponent in a zone
1+4 / (distance to nearest zone/size of zone)

That way, players battling at important places get higher credit.

Weakness: Blocking opponents is not rewarded.
gnorty
Core Dumper
Posts: 187
Joined: Wed Nov 02, 2005 2:45 am

Post by gnorty »

I completely agree with what meriton says about circling the zone. the last thing we want is another reason for people to mindlessly circle the zone waiting for a gap that is never going to materialise.

What about using the rankings of the players to apportion points? Somebody who kills the newby muppets hanging off the edges gets just 1 point, an average player could earn 2 points for their killer and 3 points for the top players.

Anyone who killed Meriton would get 5 points, or maybe even an automatic match win ;)
User avatar
Lucifer
Project Developer
Posts: 8645
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Hmmm, what if nemo killed meriton? Or Anumeric? Hm? ;)

I like the idea of weighing the score based on rankings, but I'd have to trust the ranking first.

I agree that circling the zone isn't good enough. Quite the contrary, it someone were in close proximity to the zone for an extended length of time without taking it, then they suck, don't they? They can't take a fortress, what good are they? ;)

I'm fishing after primitives, though. Information we can collect and make it possible to act on it, then make it configurable, of course, what to do. Then when you pile several of the primitive statistics together, you get a more complex situation, which, if it can be interpreted automatically, we can act on. ANd it has to be, ummm, extraordinary, in my mind, to give a reward.

So, for example. A defender gets crushed as soon as someone looks at his fortress the wrong way. Why penalize that defender? He already lost the zone for his team, that's penalty enough! An attacker rushes the zone quickly, kills the defender, and takes the zone. He's *got* his reward already, heaping on more rewards is useless. So I think we've got basic victory conditions covered. ;)

But a defender who successfully blocks 5 players from the fortress because his offense can't block for shit, that's worth something, isn't it? Sure, he probably got 10 points for each kill, but the difficulty of each kill could range from easy (they come 1 at a time), to very difficult (they come on in a wave, and he still gets them). In the latter case, just winning the round for the team is certainly satisfying, but it doesn't feel like enough. He did a damn good job, and the rest of his team failed him! Rewarding him in the rankings is a good place to do that, even if we don't reward him in the match. So if the rankings contained more information collected, and a fairly configurable method for determining rank, then he gets his reward. Perhaps he gets to rise on the goalie ladder, as opposed to the regular ladder. Mind you, if we reward him in the match, then we reward his whole team at the same time. There's a bad side to that, we've just rewarded his sucky offense for, well, sucking.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Post Reply