Thread history
Viewing a history listing
Time | User | Activity | Comment |
---|---|---|---|
16:59, 25 December 2012 | Chase-san (talk | contribs) | Comment text edited | |
16:57, 25 December 2012 | Chase-san (talk | contribs) | Comment text edited | |
16:55, 25 December 2012 | Chase-san (talk | contribs) | New reply created | (Reply to How Scoring Works) |
01:21, 25 December 2012 | Skotty (talk | contribs) | New thread created |
Okay folks. Help me out here. I didn't see any page on the wiki that details how all the challenge scoring types work. I'm basically just guessing on everything but normal scoring and bullet damage scoring. What I'm currently doing is best shown by just posting the class that currently handles scoring, and you all can let me know what needs to be changed. Thanks!
//TODO: Verify how each scoring function is supposed to work public class ScoreFunctions { public static ScoreFunction PERCENT_SCORE = new ScoreFunction() { @Override public double getScore(RobotScore challenger, RobotScore opponent, int numRounds) { return challenger.score / (challenger.score + opponent.score); } }; public static ScoreFunction SURVIVAL_FIRSTS = new ScoreFunction() { @Override public double getScore(RobotScore challenger, RobotScore opponent, int numRounds) { return challenger.survivalRounds / (double)numRounds; } }; public static ScoreFunction SURVIVAL_SCORE = new ScoreFunction() { @Override public double getScore(RobotScore challenger, RobotScore opponent, int numRounds) { return challenger.survivalScore / (challenger.survivalScore + opponent.survivalScore); } }; public static ScoreFunction BULLET_DAMAGE = new ScoreFunction() { @Override public double getScore(RobotScore challenger, RobotScore opponent, int numRounds) { return challenger.bulletDamage / (double)numRounds; } }; public static ScoreFunction MOVEMENT_CHALLENGE = new ScoreFunction() { @Override public double getScore(RobotScore challenger, RobotScore opponent, int numRounds) { return challenger.energyConserved / (double)numRounds; } }; }
MOVEMENT_CHALLENGE is generally "100 - (bullet damage taken / total rounds)", or "return 100 - (opponent.bulletDamage / (double)numRounds)". Though if you can get the Energy Conserved, that might be approximately the same.
BULLET_DAMAGE is AVERAGE_BULLET_DAMAGE.
Otherwise I think it looks correct.
Also keep in mind that RoboRunner supports melee battles last I checked, so a single RobotScore opponent may not be sufficient unless you add up all the opponents data into that one entry. Even then, I am not sure if the math works out correctly, especially with my definition MOVEMENT_CHALLENGE.