View source for Talk:RoboRunner
- [View source↑]
- [History↑]
Contents
Thread title | Replies | Last modified |
---|---|---|
Inconsistent APS with LiteRumble | 5 | 10:47, 7 April 2024 |
RoboRunner GUI | 4 | 00:11, 10 December 2013 |
First page |
Previous page |
Next page |
Last page |
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
Return to Thread:Talk:RoboRunner/Inconsistent APS with LiteRumble.
Here is a Python script that calculates APS correctly. Use this script when you want to align with LiteRumble.
import os
import gzip
import xml.etree.ElementTree as ET
from statistics import mean
from collections import defaultdict
roborunner_dir = os.path.expanduser('~/roborunner') # replace with your roborunner directory
def get_aps_dict(bot):
scores = ET.parse(gzip.open(f'{roborunner_dir}/data/{bot}.xml.gz', 'r')).getroot()
aps_raw = defaultdict(list)
for bot_list in scores:
for battle in bot_list:
battle_scores = {}
total_score = 0
for robot_score in battle.findall('robot_score'):
name = robot_score.find('name').text
score = int(robot_score.find('score').text)
battle_scores[name] = score
total_score += score
aps = 100 * battle_scores[bot] / total_score
for name, _ in battle_scores.items():
if name != bot:
aps_raw[name].append(aps)
return dict((name, mean(aps)) for name, aps in aps_raw.items())
Update: The APS fix is now included in the newest release of my fork. A PR is also made to Voidious’s version.
I wrote a custom GUI for RoboRunner, it directly interfaces with a modified RoboRunner. It is in early early alpha. The feature set is nowhere near complete. Please let me know of any bugs.
Robots are not automatically copied to robocode directories. Nothing is saved. Paths cannot (at the moment) be altered. Results do no update automatically, they need to be closed and reopened to update them (I plan to fix this). Thread count cannot be changed after starting (for now, changing this would be involved).
I guess I should mention its advantages over RoboJogger, the other GUI for RoboRunner, also over RoboRunner itself.
It has a queue that runs challenges in whatever order they happen to be in the queue. This means once you start it, you can run multiple challenges without robocode needing to restart, and you can also reorder the queue after starting the battle threads.
It is better to consider it's limitations compared to RoboResearch. Aside from the first post, you cannot start and stop threads individually. I may support this eventually, but at the moment it would require rewriting RoboRunner's BattleRunner class. Which also means once you start the threads, you cannot alter the number of threads running.
Congrats on the first release! I'll try to have a look tonight or tomorrow.
Do we need any setup instructions? Or are the roborunner.properties and empty Robocode installs already in the zip?
I am working on automating the runner creation and robot jar copying process today. As well as adding an options dialog to configure the paths and jvm arguments.
The GUI won't use the properties as the standard roborunner. But the current version doesn't use any at all.
But for the current version, you need to create the robocodes/r[0-9]+ directories yourself (or use the script you wrote). You can pick the thread count in the program itself (but only up to the number of runners you created). Make sure to copy the robots into robocodes/r[0-9]+/robots directories as well.
v0.9.2-Alpha
Adding options (that save), automatic robocode runner creation (based on threads), and automatic robot jar copying.
First page |
Previous page |
Next page |
Last page |