Posts

Showing posts from October, 2017

Stochastic Diffusion Search ( SDS )

Image
Stochastic Diffusion Search ( SDS ) is a search algorithm that is using swarm intelligence to solve its assigned problem. In this blog post I will talk about how I am implementing this algorithm using a mining simulation game. Stochastic Diffusion Search contains multiple agents and in this particular case, miners. Every miner has a position, a hypothesis and a current state. All the miners are also communicating with one another. The landscape we are simulating contains multiple hills which is represented by larger squares in our example, and each hill contains multiple locations within each hill which is represented by smaller squares. We initialise our miners with a random location together with randomly scattered gold objects across our landscape. If a miner strike gold, that hill now becomes their hypothesis which basically says: "this is a good hill for mining gold" and the miner will switch state to become satisfied. If the miner is satisfied , it w

Extended DFO Experimentation

Image
This week we have continued working on our optimisation algorithm using DFO and the focus this week was to apply our DFO to a specific problem. The assigned problem for our DFO is to find the brightest pixels in an image. The image have replaced the sphere function I used in previous post. In this experiment I am generating a black and white image using perlin noise, I am using the continuous randomising image as my search space. This will make the search space dynamic and the flies will always try to find the brightest pixel. My initial idea was to use the webcam to move the brightest pixel around but I found this more aesthetically appealing. ( I'm a huge fan of perlin noise ) The calculation to get the brightest pixel is very simple, I iterate through all the flies in my population and I take the fly’s current position and subtracting the brightness value from that particular location from 255, which is the maximum brightness. This means that if the current pixel b

Dispersive Flies Optimisation ( DFO )

Image
Dispersive Flies Optimisation (DFO) is a global optimisation algorithm that is inspired by observing behaviour of swarming flies in the real world. The algorithm is going through a defined search space and it’s trying to find the most optimal value, which will converge the flies towards their target. We use the DFO to benchmark different test functions for our optimisation. The swarming behaviour of the flies optimisation is based on a value called ‘fitness’. This value judges how optimal the data is and based on the value of the ‘fitness’, it will attract the swarm of flies towards the new found optimal position. During the test of finding the most optimal fitness value, the algorithm is also applying random values to disburse the flies across the search space and away from the best fitness value. This is an attempt to further explore the search space and perhaps find a better potential fitness value. Together with Terry, we implemented the algorithm that was given to us in t

No Free Lunch Theorem

Image
One thing that loved about the first lecture in this module is that I brought me back a few years back in time when I was taking a stand alone course in Evolutionary Biology at Uppsala University in Sweden. It was a night course I took as I was working because the field have always interested me and I have read many books about the subject. My initial plan was to study biology and become a zoologist. Many of the topics in this module fascinates me and I love when after all these years of technological innovations, we look back at nature and trying to simulate behaviour that we see others entities performing. Evolution has been around for so long that nature is pretty much bound to have figure some useful solutions for us. By reading the paper on “ No Free Lunch Theorem” I found it a bit hard to grasp the overall concept, specifically when you focus on the actual theorem about X being our countable search base and that you have to specify and objective function of f: X ->