Some of us more than others advocate long battles to gain real knowledge about a bots' strength. But at the same time we also need to measure the strength of a bot in shorter battles. Especially when it comes to RoboRumble@Home 1v1 performance. Hence the idea to average the score from several shorter battles. Hence the need for this add-on. Axe has already released a tool that can help with this. But I am the lazy type and need something more immediate. I hacked one of the XSLT's in the RoboLeague distribution jar. Namely "Season.xml".
It shows the results from a 100 battle, 3-rounds run. The results starts with a small table presenting an all-seasons average of all battle data. I've also added a "Score %" column since that is what counts in RoboRumble@Home. (Seems like Lacrimas still has an edge against CassiusClay in this Extreme Fast Learning (EFL) set-up. =)
Nov 17 2004 - Now the averager is aware of divisons where a "focused competitor" is used. Like so: http://pezius.com/robocode/saao_focus.html -- PEZ
This simple hack is mainly meant to deal with RL battle files with only two bots involved. But it also works with divisions where more than two bots duke it out. The score share is then a share of the total collected by all bots.
I really did this little thing for fun and it was a very fast thing. There may be all sorts of bugs and special cases I don't deal with. If it messes up your RL usage, just remove it from your roboleague/xslt directory when you don't intend to use it. (You must restart RoboLeague for this to take effect.)
<xsl:template match="/LEAGUE"> <xsl:if test="@focused_competitor_id = ''"> <h2>Averages</h2> <p><div align="center"><table bgcolor="#fff7e7" border="2" cellspacing="0" cellpadding="3"> <tr bgcolor="#ffdfb0"> <td nowrap="">Robot</td> <td nowrap="">Score</td> <td nowrap="">Score %</td> <td nowrap="">Survival</td> <td nowrap="">Last surv. b.</td> <td nowrap="">Bullet dmg.</td> <td nowrap="">Bullet dmg. b.</td> <td nowrap="">2*Ram dmg.</td> <td nowrap="">Ram dmg. b.</td> <td nowrap="">#1st</td> <td nowrap="">#2nd</td> </tr> <xsl:for-each select="COMPETITOR"> <xsl:sort select="sum(../SEASON/GROUPING/RESULTS[@id=current()/@id]/@total_score)" data-type="number" order="descending"/> <xsl:variable name="bot"><xsl:value-of select="@id"/></xsl:variable> <xsl:variable name="seasons"><xsl:value-of select="count(../SEASON)"/></xsl:variable> <xsl:variable name="scoreSum"><xsl:value-of select="sum(../SEASON/GROUPING/RESULTS/@total_score)"/></xsl:variable> <xsl:variable name="score"><xsl:value-of select="sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@total_score)"/></xsl:variable> <tr> <td><xsl:value-of select="$bot"/></td> <td><xsl:value-of select="format-number($score div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(100 * $score div $scoreSum, '#.0')"/>%</td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@survival) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@last_survivor_bonus) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@bullet_damage) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@bullet_damage_bonus) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@ram_damage) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@ram_damage_bonus) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@n_first_rank) div $seasons, '#.0')"/></td> <td><xsl:value-of select="format-number(sum(../SEASON/GROUPING/RESULTS[@id=$bot]/@n_second_rank) div $seasons, '#.0')"/></td> </tr> </xsl:for-each> </table></div></p> <hr size="2"></hr> </xsl:if> ...
I always had to do this manually. Thanks PEZ i like that tool. --deathcon
Sorry, but the link that is on this site is wrong. --deathcon
Thanks! Now corrected. -- PEZ
Sorry, but the link seems to be broken again :( --Krabb
You can always extract the file from the source zip included with roboleague and paste PEZ modifications in it. -- Florent