Peter Babič
86682d8027
|
9 years ago | |
---|---|---|
data | 9 years ago | |
extras | 9 years ago | |
.gitattributes | 9 years ago | |
.gitignore | 9 years ago | |
LICENSE | 9 years ago | |
README.md | 9 years ago | |
robocode-svm | 9 years ago |
README.md
Description
robocode-svm
is a script to demonstrate Support Vector Machine (SVM) classification on outcomes of the battles of Robocode. You can check the original assignment tht led to this work here.
Installation
The script runs under Linux and requires robocode
, svm-scale
, svm-train
and svm-predict
executables located in the PATH
. On Arch Linux (or it's derivative, like i.e. Manjaro), this can be achieved by installing libsvm and robocode from AUR (if enabled) by following command (or equivalent)
yaourt -S robocode libsvm
Usage
Generate the data required for SVM classification and show the accuracy
of the generated SVM model. If coordinates are supported, one visual battle
is shown to support the prediction.
USAGE: robocode-svm ACTION
USAGE: robocode-svm --battle x y [alpha]
--battle Shows visual run of the specified battle
-g,--generate Just generate the battle data
-a,--accuracy Show the accuracy of the SVM model,
-c,--clean Delete all the battle data!
-h,--help Show this help
Details
The robots on test are sample.Corners(starting in center) and sample.TrackFire(roaming). The gun cooling rate is set to 0.07. These were obtained by experimenting and provide great outcomes on the battlefied, that can be classified easily.
SVM kernel parameters
The SVM type used is C-SVC (multi-class classification), with the radial babsis kernel. The cost parameter C is 10 and the sigma parameter is 2. You can find more details about these at libsvm home.
2D visualisation
When the third parameter (initial gun orientation) of the roaming robot is omitted, we can generate sample visualisation of the result of this classification. Our experiments were indicating, that this parameter has low (about 2%) significance on the output of the battle.