Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tournament #12

Open
wants to merge 148 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 135 commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
69c526b
Update published battle
Jan 10, 2016
d2e219d
Update published battle
Jan 10, 2016
6f15d2b
Revert "Update published battle" (accidental damage) [ci skip]
jacobsims Jan 10, 2016
99ab69c
Fix the issue with changing branches
jacobsims Jan 10, 2016
b1af884
This should actually fix that issue
jacobsims Jan 10, 2016
8b77b56
Update README to reflect changes in recording access [ci skip]
jacobsims Jan 10, 2016
06b374b
Consistency in file paths
enzanki-ars Jan 10, 2016
b820417
Add my name to robot [ci skip]
enzanki-ars Jan 10, 2016
9065da0
Fix an issue with my robot
jacobsims Jan 10, 2016
d7d9daa
Put commands on one line to speed up Circle
jacobsims Jan 10, 2016
6a99026
Remove old result printing to speed up builds
enzanki-ars Jan 10, 2016
2686820
Improve and rename bot [ci skip]
enzanki-ars Jan 10, 2016
3b0fb9e
Rename bot in battle file
enzanki-ars Jan 10, 2016
f80c2d0
No paying much attention to what that line was...
enzanki-ars Jan 10, 2016
3860357
Add a header to the leaderboard
jacobsims Jan 10, 2016
2f3c124
Oops yaml comments
jacobsims Jan 10, 2016
c564021
git pull before updating gh-pages
jacobsims Jan 10, 2016
6501863
Force re-run of bots
enzanki-ars Jan 10, 2016
da28747
Add imagemaker.py to Circle
jacobsims Jan 11, 2016
d5d986c
Add the graphic to the README
jacobsims Jan 11, 2016
289fdd3
Try to get the SVG links working [ci skip]
jacobsims Jan 11, 2016
c591eca
Add links where you can click them
jacobsims Jan 11, 2016
84f3faa
Put the links onto the next line [ci skip]
jacobsims Jan 11, 2016
1584694
Make the summary graphic a link to the leaderboard
jacobsims Jan 11, 2016
14b0233
Line break [ci skip]
jacobsims Jan 11, 2016
0179650
Update circle.yml
enzanki-ars Jan 11, 2016
4548dde
pip install cairosvg
enzanki-ars Jan 11, 2016
548c700
Update circle.yml
enzanki-ars Jan 11, 2016
1cb6c65
Missing a character
enzanki-ars Jan 11, 2016
d93244c
Update circle.yml
enzanki-ars Jan 11, 2016
07ad7cc
Separate and add more battles
enzanki-ars Jan 11, 2016
a4f0e1b
Organize
enzanki-ars Jan 11, 2016
6121bce
GitIgnore [ci skip]
enzanki-ars Jan 11, 2016
545dada
Update geninfo.sh
enzanki-ars Jan 11, 2016
16d73b1
Update geninfo.sh
enzanki-ars Jan 11, 2016
70069c2
Update published battle
Jan 11, 2016
2f8601d
Delete epl-v10.html
enzanki-ars Jan 11, 2016
9d61172
Delete roborumble.properties
enzanki-ars Jan 11, 2016
aa55036
Update .gitignore
enzanki-ars Jan 11, 2016
d943230
fix stupidity
enzanki-ars Jan 11, 2016
3fd1554
Correct directory name
enzanki-ars Jan 11, 2016
6274e6c
Stabilize battles [ci skip]
enzanki-ars Jan 11, 2016
86e835e
Add a glob of magic...
enzanki-ars Jan 11, 2016
4dafae8
Relink results [ci skip]
enzanki-ars Jan 11, 2016
7dd46f5
Relink to results [ci skip]
enzanki-ars Jan 11, 2016
b20a000
Relink results [ci skip]
enzanki-ars Jan 11, 2016
e817e9b
Improve release cycle so forks dont triger updates to site
enzanki-ars Jan 11, 2016
6a0f52f
Rename owner
enzanki-ars Jan 11, 2016
44ef4ba
Start of python runner
enzanki-ars Jan 12, 2016
fedc968
Add full runner
enzanki-ars Jan 12, 2016
e74972e
Fix geninfo
enzanki-ars Jan 12, 2016
094dc5c
Fix typo
enzanki-ars Jan 12, 2016
401aab2
Correct implementation
enzanki-ars Jan 12, 2016
a422ec6
Corrent int conversion
enzanki-ars Jan 12, 2016
9cfe90e
Merge branch 'pythonrunner' of https://github.com/DarbyComputerClub/d…
enzanki-ars Jan 12, 2016
5b0da34
Fix split code
enzanki-ars Jan 12, 2016
b91a77b
Use a list instead of generator so indexing works
jacobsims Jan 12, 2016
0870b0d
Convert env vars to ints at the top
jacobsims Jan 12, 2016
b0e9aab
Merge branch 'pythonrunner' of https://github.com/DarbyComputerClub/d…
enzanki-ars Jan 12, 2016
0b3f9f8
Merge branch 'pythonrunner' of https://github.com/DarbyComputerClub/d…
enzanki-ars Jan 12, 2016
d32cc3a
Correct var name
enzanki-ars Jan 12, 2016
855f04e
Correct circle index
enzanki-ars Jan 12, 2016
8e44562
Correct syntax
enzanki-ars Jan 12, 2016
4095381
Make directories
enzanki-ars Jan 12, 2016
e39a9f7
Correct syntax
enzanki-ars Jan 12, 2016
3a736d0
Use bash for thing
jacobsims Jan 12, 2016
06c710a
Correct home expansion
enzanki-ars Jan 12, 2016
c42aeac
Update circle.yml
enzanki-ars Jan 12, 2016
2295823
Syntax error
enzanki-ars Jan 12, 2016
5ac58fa
Correct links
enzanki-ars Jan 12, 2016
0bcd6da
Merge pull request #3 from DarbyComputerClub/pythonrunner
enzanki-ars Jan 12, 2016
5bb4df1
One link to screw them all [ci skip]
enzanki-ars Jan 12, 2016
ed0a276
Another one bites the dust [ci skip]
enzanki-ars Jan 12, 2016
81e221e
Attempt to fix issues with multiple battle uploads
enzanki-ars Jan 12, 2016
dcac2af
Update gh-pages in the testing phase to avoid losing results
jacobsims Jan 12, 2016
9453536
Merge branch 'master' into pythonrunner
jacobsims Jan 12, 2016
057899b
Merge pull request #5 from DarbyComputerClub/pythonrunner
jacobsims Jan 12, 2016
fbb5f12
More informative commit messages
jacobsims Jan 12, 2016
8b09ba0
Add new battles.
enzanki-ars Jan 12, 2016
0d5bc17
Move running scripts to ~/run/
jacobsims Jan 12, 2016
5eb2149
Expand the tilde to fix running geninfo.sh
jacobsims Jan 12, 2016
7105fc0
Don't compile twice
jacobsims Jan 12, 2016
68e242f
Split image maker into separate file
jacobsims Jan 12, 2016
8d59f38
Fix forgetting to change variable name
jacobsims Jan 12, 2016
ab9113b
remove useless line
jacobsims Jan 12, 2016
f22e1b7
Don't depend on bash, and exit if a battle fails
jacobsims Jan 12, 2016
5f39661
Merge branch 'master' of https://github.com/DarbyComputerClub/darbyro…
jacobsims Jan 12, 2016
60da070
Fix stupid comma error
jacobsims Jan 12, 2016
78e877c
Debug testing
jacobsims Jan 12, 2016
ff367c8
Correct compile script.
enzanki-ars Jan 12, 2016
efe21ed
WIP move to csv parse [ci skip]
enzanki-ars Jan 13, 2016
b28ccce
correct indents
enzanki-ars Jan 13, 2016
fd6922a
Fix winner extraction errors
jacobsims Jan 13, 2016
4abc9f7
Get the data we want
jacobsims Jan 13, 2016
421f6b3
Don't hardcode the listings
jacobsims Jan 13, 2016
85d338e
Use safer version of leaderboard, without extra information
jacobsims Jan 13, 2016
5e4eb27
Forgot these start at 1
jacobsims Jan 13, 2016
084c0ba
Allow any amount of listings (up to 5 for now)
jacobsims Jan 13, 2016
d94ff9c
Dynamic height
jacobsims Jan 13, 2016
24d1cc4
Forgot enumerate
jacobsims Jan 13, 2016
457da19
change svg y position for different heights
jacobsims Jan 13, 2016
801cfdb
Move the text to the right y pos
jacobsims Jan 13, 2016
58271c0
Add the percentages back
jacobsims Jan 13, 2016
2e048b7
Try new look
jacobsims Jan 13, 2016
be111fd
Use the position prefix straight from the leaderboard
jacobsims Jan 13, 2016
79620bf
Don't remove the ':'
jacobsims Jan 13, 2016
53416bd
Include the battle name in the graphic
jacobsims Jan 13, 2016
344ac74
Merge pull request #8 from DarbyComputerClub/fixgraphicdesign
enzanki-ars Jan 13, 2016
b99096b
Separate score from name and put it on the right
jacobsims Jan 14, 2016
dc4d87b
Color names
jacobsims Jan 14, 2016
d680339
Merge branch 'fixgraphicdesign'
jacobsims Jan 14, 2016
d6dd2a2
Use better-looking font
jacobsims Jan 14, 2016
d07dd2f
Use PNG instead of SVG in the readme [ci skip]
jacobsims Jan 14, 2016
720c0fa
Use --user to install pip items
enzanki-ars Jan 14, 2016
53d029d
Move upload code (1/3) [ci skip]
enzanki-ars Jan 14, 2016
d15e548
Move upload code (2/3) [ci skip]
enzanki-ars Jan 14, 2016
dedf633
Move upload code (3/4) [ci skip]
enzanki-ars Jan 14, 2016
3a30a28
Move upload script (4/4) [ci skip]
enzanki-ars Jan 14, 2016
b91e002
Correct publish script [ci skip]
enzanki-ars Jan 14, 2016
beb9df0
Remove extra info sent to script.
enzanki-ars Jan 14, 2016
38d956d
Fix permissions and typo
enzanki-ars Jan 14, 2016
9ce6d94
Correct typos
enzanki-ars Jan 14, 2016
452b699
Correct command [ci skip]
enzanki-ars Jan 14, 2016
df9252a
Missing statement.
enzanki-ars Jan 14, 2016
32bc875
Missing import
enzanki-ars Jan 14, 2016
6b2a575
Update runner.py
enzanki-ars Jan 14, 2016
c0b66ea
SCP was in wrong order
enzanki-ars Jan 14, 2016
1903cda
Fix directory location
enzanki-ars Jan 14, 2016
5996d2d
Kill me.
enzanki-ars Jan 14, 2016
4674a9e
First try at making tournament skeleton
jacobsims Jan 14, 2016
c8eb41d
Install pyjavaproperties
jacobsims Jan 14, 2016
78eda6d
Add an actual tournament
jacobsims Jan 14, 2016
3a161ea
Move robocode runner to new file
jacobsims Jan 14, 2016
da4861e
Add a tournament to the list
jacobsims Jan 14, 2016
b8d3175
Fix global error to tournament
jacobsims Jan 14, 2016
50bb314
dont use globals
jacobsims Jan 15, 2016
7186911
Disable copying for now
jacobsims Jan 15, 2016
91b9d10
Fix recursive call for use without global
jacobsims Jan 15, 2016
fa4e32e
No need to make that last directory
jacobsims Jan 15, 2016
e7e152f
Have tournaments actually run robocode
jacobsims Jan 15, 2016
06a48a3
Push some changes for later [ci skip]
jacobsims Jan 15, 2016
631b370
Save results
jacobsims Jan 16, 2016
e7933a5
Imports important
jacobsims Jan 16, 2016
9591deb
More tournaments
jacobsims Jan 16, 2016
99c0d60
Fix alex bot name
jacobsims Jan 16, 2016
6beb153
Merge branch 'master' into tournament
enzanki-ars Mar 8, 2016
079b4b4
Fix the merge artifact...
enzanki-ars Mar 8, 2016
ea66440
Merge pull request #16 from DarbyComputerClub/tournament-merge
enzanki-ars Mar 8, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,23 @@ Temporary Items
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# RoboCode

*META-INF*
ReadMe.txt
ReadMe.html
compilers*
config*
desktop*
javadoc*
libs*
meleerumble*
net*
robocode/*
robots/sample*
roborumble*
teamrumble*
templates*
theme*
twinduel*
versions.md
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
# Robocode - Darby Computer Club Battles

[![Summary graphic for the latest battle](https://darbycomputerclub.github.io/darbyrobocode/results/melee/darbygraphic.png)](https://darbycomputerclub.github.io/darbyrobocode/results/melee/darby-col.txt)<br>
[view leaderboard](https://darbycomputerclub.github.io/darbyrobocode/results/melee/darby-col.txt) | [download battle record](https://darbycomputerclub.github.io/darbyrobocode/results/melee/darby.br)

[![Circle CI](https://circleci.com/gh/DarbyComputerClub/darbyrobocode/tree/master.svg?style=svg)](https://circleci.com/gh/DarbyComputerClub/darbyrobocode/tree/master)

This version of robocode is for the Darby Computer Club.

To add your self to the battle, make a fork and add your robot to the `robots` folder in the form `robots/lastname/firstname/RobotName.java`. Then, submit a pull request.

If you are signed in to github, you can access the artifacts from the build which will contain the battle replay. If you do not have access to these artifacts, submit a comment here: https://github.com/DarbyComputerClub/darbyrobocode/issues/1
Current battles run:
- darby.battle
- sample.Corners
- sample.Fire
- sample.MyFirstRobot
- sample.SittingDuck
- sample.Walls
- io.github.enzanki_ars.AlexSimpleBot*
- io.github.jacobsims.AimingBot*

If you would like to see the most recent battle, download [this battle record](https://darbycomputerclub.github.io/darbyrobocode/results/melee/darby.br) or take a look at [the leaderboard](https://darbycomputerclub.github.io/darbyrobocode/results/melee/darby-col.txt)
10 changes: 10 additions & 0 deletions battles/1v1/enz_v_jac.battle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Battle Properties
robocode.battleField.width=800
robocode.battleField.height=600
robocode.battle.numRounds=10
robocode.battle.gunCoolingRate=0.1
robocode.battle.rules.inactivityTime=450
robocode.battle.hideEnemyNames=true
# ADD YOUR ROBOT HERE IN THE FORM lastname.firstname.RobotName*
# star is important ^
robocode.battle.selectedRobots=io.github.enzanki_ars.AlexSimpleBot*,io.github.jacobsims.AimingBot*
10 changes: 10 additions & 0 deletions battles/1v1/enz_v_wall.battle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Battle Properties
robocode.battleField.width=800
robocode.battleField.height=600
robocode.battle.numRounds=10
robocode.battle.gunCoolingRate=0.1
robocode.battle.rules.inactivityTime=450
robocode.battle.hideEnemyNames=true
# ADD YOUR ROBOT HERE IN THE FORM lastname.firstname.RobotName*
# star is important ^
robocode.battle.selectedRobots=io.github.enzanki_ars.AlexSimpleBot*,sample.Walls
10 changes: 10 additions & 0 deletions battles/1v1/jac_v_wall.battle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Battle Properties
robocode.battleField.width=800
robocode.battleField.height=600
robocode.battle.numRounds=10
robocode.battle.gunCoolingRate=0.1
robocode.battle.rules.inactivityTime=450
robocode.battle.hideEnemyNames=true
# ADD YOUR ROBOT HERE IN THE FORM lastname.firstname.RobotName*
# star is important ^
robocode.battle.selectedRobots=sample.Walls,io.github.jacobsims.AimingBot*
10 changes: 10 additions & 0 deletions battles/melee/darby.battle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Battle Properties
robocode.battleField.width=800
robocode.battleField.height=600
robocode.battle.numRounds=20
robocode.battle.gunCoolingRate=0.1
robocode.battle.rules.inactivityTime=450
robocode.battle.hideEnemyNames=true
# ADD YOUR ROBOT HERE IN THE FORM lastname.firstname.RobotName*
# star is important ^
robocode.battle.selectedRobots=io.github.enzanki_ars.AlexSimpleBot*,io.github.jacobsims.AimingBot*
4 changes: 2 additions & 2 deletions battles/darby.battle → battles/melee/withsample.battle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#Battle Properties
robocode.battleField.width=800
robocode.battleField.height=600
robocode.battle.numRounds=10
robocode.battle.numRounds=20
robocode.battle.gunCoolingRate=0.1
robocode.battle.rules.inactivityTime=450
robocode.battle.hideEnemyNames=true
# ADD YOUR ROBOT HERE IN THE FORM lastname.firstname.RobotName*
# star is important ^
robocode.battle.selectedRobots=sample.Corners,sample.Fire,sample.MyFirstRobot,sample.SittingDuck,sample.Walls,io.github.enzanki_ars.DemoBot*,io.github.jacobsims.AimingBot*
robocode.battle.selectedRobots=sample.Corners,sample.Fire,sample.MyFirstRobot,sample.RamFire,sample.Target,sample.TrackFire,sample.Walls,sample.Crazy,io.github.enzanki_ars.AlexSimpleBot*,io.github.jacobsims.AimingBot*
10 changes: 10 additions & 0 deletions battles/tournament/withsample.tournament
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Battle Properties
robocode.battleField.width=800
robocode.battleField.height=600
robocode.battle.numRounds=5
robocode.battle.gunCoolingRate=0.1
robocode.battle.rules.inactivityTime=450
robocode.battle.hideEnemyNames=true
# ADD YOUR ROBOT HERE IN THE FORM lastname.firstname.RobotName*
# star is important ^
darby.tournament.selectedRobots=sample.Corners,sample.Fire,sample.MyFirstRobot,sample.RamFire,sample.Target,sample.TrackFire,sample.Walls,sample.Crazy,io.github.enzanki_ars.AlexSimpleBot*,io.github.jacobsims.AimingBot*
27 changes: 11 additions & 16 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
general:
artifacts:
- "darbyrecord.br"
- "results-columns.txt"
- "~/battles/"
branches:
ignore:
- gh-pages

dependencies:
pre:
- pip install --user cairosvg pyjavaproperties
override:
- unzip robocode-1.9.2.5-setup.jar
- cp -R run ~/run
- unzip ~/run/robocode-1.9.2.5-setup.jar -d .
- mkdir ~/battles

test:
override:
- find robots/ -name '*.java' -print0 | xargs -0 javac -classpath "$CLASSPATH":./libs/robocode.jar:./robots -deprecation -g -source 1.6 -encoding UTF-8
- java -Xmx512M -Dsun.io.useCanonCaches=false -cp libs/robocode.jar robocode.Robocode -battle battles/darby.battle -nodisplay -results results.txt -nosound -record darbyrecord.br
- column -ts $'\t' results.txt | tee results-columns.txt
post:
- mkdir ~/results/
- cp darbyrecord.br results-columns.txt ../results/
- git checkout gh-pages
- cp ../results/results-columns.txt ../results/darbyrecord.br .
- git config user.email '@'
- git config user.name 'CircleCI'
- git add results-columns.txt darbyrecord.br
- git commit -m 'Update published battle'
- git push
- find robots/ -name '*.java' -print0 | xargs -0 javac -classpath "$CLASSPATH":./libs/robocode.jar:./robots -encoding UTF-8:
parallel: true
- ~/run/runner.py:
parallel: true
- ~/run/upload.py
53 changes: 53 additions & 0 deletions robots/io/github/enzanki_ars/AlexSimpleBot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package io.github.enzanki_ars;
import robocode.*;
import java.awt.Color;

// API help : http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html

/**
* DemoBot - a robot by Alex Shafer
*/
public class AlexSimpleBot extends AdvancedRobot
{
private boolean cantSeeBot = true;

public void run() {
setColors(Color.green,Color.blue,Color.red);
setAdjustGunForRobotTurn(true);
while(true) {
if (cantSeeBot) {
setTurnGunLeft(10);
setAhead(20);
}
else {
cantSeeBot = true;
}
execute();
}
}

public void onScannedRobot(ScannedRobotEvent e) {
cantSeeBot = false;
setTurnGunRight(0);
setFire(2);
}

public void onHitByBullet(HitByBulletEvent e) {
setBack(10);
execute();
}

public void onHitRobot(HitRobotEvent e) {
setBack(10);
execute();
}

/**
* onHitWall: What to do when you hit a wall
*/
public void onHitWall(HitWallEvent e) {
setBack(20);
setTurnLeft(180);
execute();
}
}
56 changes: 0 additions & 56 deletions robots/io/github/enzanki_ars/DemoBot.java

This file was deleted.

2 changes: 1 addition & 1 deletion robots/io/github/jacobsims/AimingBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void onScannedRobot(ScannedRobotEvent e) {
double eBearingRelGun = Utils.normalRelativeAngleDegrees(e.getBearing() - (getGunHeading() - getHeading()));
double currentPerpAxis = Math.sin(Math.toRadians(eBearingRelGun)) * e.getDistance();
double currentHeadAxis = Math.cos(Math.toRadians(eBearingRelGun)) * e.getDistance();
double eHeadingRelGun = Utils.normalRelativeAngleDegrees(e.getHeading() - (getGunHeading() - getHeading()));
double eHeadingRelGun = Utils.normalRelativeAngleDegrees(e.getHeading() - (getGunHeading()));
double projectedPerpAxis = 0;
double projectedHeadAxis = 0;
double projectionTime = (e.getDistance() / Rules.getBulletSpeed(bulletPower));
Expand Down
12 changes: 12 additions & 0 deletions run/geninfo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

git checkout gh-pages
git pull
mkdir results
cp -r ~/battles/* .
git config user.email '@' && git config user.name 'CircleCI'
git add .
git commit -m "Update published battles $CIRCLE_BUILD_NUM"
git pull
git push
git checkout master
File renamed without changes.
11 changes: 11 additions & 0 deletions run/robocoderun.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import subprocess

def robocoderun(battlefile, resultsfile, recordfile):
code = subprocess.call(['java', '-Xmx512M', '-Dsun.io.useCanonCaches=false', '-cp', 'libs/robocode.jar',
'robocode.Robocode',
'-battle', battlefile,
'-nodisplay',
'-results', resultsfile,
'-nosound',
'-record', recordfile])
return code
Loading