diff --git a/README.md b/README.md index db5aeda..adc4165 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Description -`robocode-svm` is a script to demonstrate Support Vector Machine (SVM) classification on outcomes of the battles of Robocode. +`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](https://github.com/delmadord/robocode_svm/blob/master/extras/assignment.pdf). # 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](https://aur.archlinux.org/packages/libsvm/) and [robocode](https://aur.archlinux.org/packages/robocode/) from AUR (if enabled) by following command (or equivalent) @@ -23,6 +23,13 @@ USAGE: robocode-svm --battle x y [alpha] -h,--help Show this help ``` -# Extras -* [assignment](https://github.com/delmadord/robocode_svm/blob/master/extras/assignment.pdf) -* [2D visualisation](https://github.com/delmadord/robocode_svm/blob/master/extras/visualize2D.png) **sample** - the *alpha* parameter (initial gun orientation) was omitted. +# 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](https://github.com/cjlin1/libsvm). + +## 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. + +![2D visualisation](https://github.com/delmadord/robocode_svm/blob/master/extras/visualize2D.png) diff --git a/extras/visualize2D.png b/extras/visualize2D.png index cb17bc1..5743015 100644 --- a/extras/visualize2D.png +++ b/extras/visualize2D.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1dcfaa0b423bc755addfde5f33bf758391f98131d998d5641626cb5cd5cbcbc -size 13488 +oid sha256:49b456347bda2dd9d778260a85cb772069ac5b14ea9a03e40382414550676b8b +size 13536 diff --git a/robocode-svm b/robocode-svm index 932df73..fec9b7c 100755 --- a/robocode-svm +++ b/robocode-svm @@ -22,7 +22,7 @@ robot2="sample.Fire" # Requires a function because of two points where it is called show_help() { echo "Generate the data required for SVM classification and show the accuracy" - echo "of the generated SVM model. If coordinates are supported, one visual battle" + echo "of the generated SVM model. If coordinates are provided, one visual battle" echo "is shown to support the prediction." echo "" echo "USAGE: robocode-svm ACTION"