Dear Friends,
Our first post of 2014 (:-D). I hope all of you have a great year.
After changing the world and the robot. Since we got an extra RGB sensor that we are using to to detect the yellow and green stripes, which are the limits of each slot, instead of the light sensor. I cannot even begin to describe how easier it is with the RGB sensor.
The next question and our main problem was how to make it [the robot] think. After some research throughout the class papers and some discussion we figured out that the best way to make the robot intelligent was to create a little tree and look for the best attack sequence.
This was our first draft of the tree and its nodes.
While trying to make the tree we missed the good old c++ pointers and structs..Since there is no pointer in Java we got a bit confused when trying to point to other nodes.
In each node we save the energy spent, the hp the bot still has, the parent node, the sub-nodes, the total number of attacks of all the enemies, the number of enemys killed, and how many enemies it needs to attack.
The sub-nodes are the result of each attack the robot can use on the enemy. Therefore the number of sub-nodes will change accordingly to the type. 3 sub-nodes (do nothing and 2 attacks) if the enemy is an Infantry. 4 sub-nodes (do nothing and 3 attacks) if the enemy is a Tank.
To begin with, our strategy will be to kill every Artillery that shows up so, in order to reduce the tree, the Artillery will not take part in the tree. The robot has a small "brain" so we are trying not to overdo it.