Week 3 – Prototype

It is Monday and the basic prototype has been under construction since Friday week 2. The following functionalities have been added;

  • Finite State Machine for both the AI agent and nodes.
  • AI states
    • Detected State.
    • Exploit State.
    • Movement State
  • Node states
    • Idle State.
    • Search State.
  • Entity Manager.
  • Messaging.
  • Graphical User Interface using Qt.

States Descriptions
Detected State is at the moment a state that’s run once each time the AI agent is detected by the node. It resets the detection value of all entities that are nodes.
Exploit State will steal CPU time from the node but is at the moment not implemented since it’s closely connected to the learning. Learning isn’t implemented yet but it’s next on the priority list.
Movement State moves the AI agent towards the node. When reaching the node the AI agent changes state to Exploit State.
Idle State is the state where the AI agent isn’t present at a node. In this state the node decrease it’s detection value and wait for that the AI agent enter.
Search State is the state where the AI agent is present and the node tries to detect it.

Prototype Application
Basic prototype
A screenshot of the prototype where the AI agent exploits the node and the node tries to detect it. The blue progress bar at the bottom of the application is the node detection, when the progress bar is full the AI is detected.

Week 2 – FANN testing

The search for a library that implements Artificial Neural Network has led me to FANN, Fast Artificial Neural Network. Using this library and Netbeans IDE I implement a test application.

In the application I create an neural network consisting of three layers;

Input layer has 2 neurons.
Hidden layer has 3 neurons.
Output layer has 1 neuron.

I run training data through the ANN, for a maximum of 1000 generations, every 10th generation is printed to the console. The training ends automatically when delta is small enough or all generations have passed.

Max epochs     1000. Desired error: 0.0001000000.
Epochs            1. Current error: 0.0689254403. Bit fail 1.
Epochs           10. Current error: 0.0291094370. Bit fail 0.
Epochs           20. Current error: 0.0211056732. Bit fail 0.
Epochs           30. Current error: 0.0203783922. Bit fail 0.
Epochs           40. Current error: 0.0186856706. Bit fail 0.
Epochs           50. Current error: 0.0160715990. Bit fail 0.
Epochs           60. Current error: 0.0096545052. Bit fail 0.
Epochs           70. Current error: 0.0064251241. Bit fail 0.
Epochs           80. Current error: 0.0016861609. Bit fail 0.
Epochs           90. Current error: 0.0009056885. Bit fail 0.
Epochs          100. Current error: 0.0003604345. Bit fail 0.
Epochs          110. Current error: 0.0003070266. Bit fail 0.
Epochs          120. Current error: 0.0002598952. Bit fail 0.
Epochs          130. Current error: 0.0001974458. Bit fail 0.
Epochs          140. Current error: 0.0001631431. Bit fail 0.
Epochs          150. Current error: 0.0001462692. Bit fail 0.
Epochs          160. Current error: 0.0001319570. Bit fail 0.
Epochs          170. Current error: 0.0001189887. Bit fail 0.
Epochs          180. Current error: 0.0001047518. Bit fail 0.
Epochs          182. Current error: 0.0000986185. Bit fail 0.

Update: Forgot to add setup.

Week 2 – Feasibility and Planning

With all the stress making in time with the research I did a few mistakes on my research.

I forgot that I can use existing libraries for the project. I was more or less planning to write the Artificial Neural Network from scratch.

I forgot researching if Unity could use existing libraries.

Both these points were pointed out by the teachers. Goals this week are finding an ANN library and building the prototype..

Week 1 – Proposal and Research

During the first week of the project I was too focused on the proposal and research that I forgot to post here. Documents of the proposal and research can be found inside Milesone 1 in the Milestone menu.


The research was focused on Artificial Neural Network and the three learning patterns; Supervised, Unsupervised and Reinforcement Learning.