Optimizing Ant Food Collection Using DEAP Algorithm

BIT356 Artificial Life with Robotics For the Ant Colony Optimization

Ant Colony Optimization and Genetic Programming

The artificial life has bought different changes in the biological life. The ants of some species wander and find food and return to their colony. The genetic programming (GP), are classified into two types: using data sets and another using environment. The Ant colony optimization (ACO) is a population based and to find solutions to difficult optimization problems. Deap algorithm is a novel evolutionary framework for rapid prototyping and testing ideas. The design from most other frameworks makes the algorithm explicit and data structure transparent. Deap core has two types: The creator is a meta-factory allows run time creation by inheritance and composition. The toolbox is a container for tools and user can use it. It consists of the selected tools by the user.   

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

The main objective of the project is to optimize the ant food collection using DEAP algorithm. Each position will be estimated with its function. The genetic algorithm will be used for the object detection. Genetic algorithm technology will be used as it comes under DEAP algorithm. The implementation will be done in python and the screenshots will be provided. Suitable motivations will be made finally. 

According to [1], artificial life cycle of ants in today world has become more efficient bio-inspired technologies with combinational optimization problems discovered by Dorrigo, the ant-based metaheuristic ability provides ability on solving many fundamental and practical problems. At first it was used to solve the Ant food genetic problem. Dynamic real- life problems are more difficult to solve than the static ones. Ant Colony System in many variants was introduced and introduced a local updating pheromone rule in order to favor exploration as a consequence to find a better local solution. The Ant Colony Optimization is based in general on the ant’s ability on finding the shorter paths between their nest and the food location. The artificial ants are using the indirect communication based on pheromone quantity laid on their trails. As in real life, the ants use the trails with a strong pheromone showing that the most promising tour is the one with higher amounts of pheromone. Pharaoh ants are originally from Africa and are also called Monosodiumpharaonic. As a specific characteristic, the Pharaoh ant colonies are not well defined, they are known as “unicolonial”. It is easy to add or remove ants on create or remove colonies to whatever size. The results show that 37% of the ants make a U-turn and also walk with their sting extended. The results indicate a behavioral specialization: several ants are walking backwards and forwards laying pheromone, for guiding the other ants. It is required a continual flow of workers to replace any pheromone that decays; therefore there are necessary of a large number of ants to extend the exploitation. 

DEAP Algorithm

According to [2], DEAP (Distributed Evolutionary Algorithms in Python) algorithm is a computation framework for rapid prototyping and testing of ideas. This algorithm design from most other existing frameworks in that it seeks to make algorithms explicit and data structures transparent, as opposed to the more common black box type of frameworks.  Several OOP tools have been developed for Evolutionary Computation (EC), for example EO, ECJ, and Open BEAGLE, etc.

In the Proposed algorithm our aim is to provide a toolbox that encourages users to write their own evolutionary algorithms, explicitly controlling every aspect of the evolutionary process like data types, fitness measures, population initialization, operators, evolutionary loop, etc. 

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Artificial life has the fundamental of living system in understanding the complex information processing. The artificial life name is the natural life for recreating the biological methods with computer media. The technology has bought the variety of creating the living robots. In the field of artificial life we study about the scientific, technology, artistic, philosophical and social implications [3]. The artificial life will capture all important parameters. Artificial has great fortune in the mechanism of the natural living system. It is primarily concerned with system to get the solution. There will no different between the biological life and artificial life. It is based on the philosophy of the natural life. The traditional model of biological system will capture the important parameter. The common definition of life does not consider current life simulations [4]. There are two types of life: Strong Alife-Life is a process to abstract away from any medium. Weak Alife- Living process outside the chemical solutions [5]. This Alife considers different behavior: Adaptive behavior and social behavior. The limits of the living systems are to determine the open ended evolution of life and create a formal framework for the different hierarchy’s scales. It provides the quantitative model between the culture and biological evolution.

DEAP (Distributed Evolutionary Algorithms in Python) is a novel evolutionary computation framework for rapid prototyping and trying of ideas [6].The target is to afford a toolbox that boosts users to write their individual evolutionary algorithms, explicitly monitoring every aspect of the evolutionary process: records types, fitness measures, population initialization, evolutionary loop, etc. DEAP builds on the Python programming language for its intelligible syntax and its many powerful features.

Namely, its full support of object-oriented programming is pure dynamical runtime environment, as well as its good support of the functional programming paradigm, which makes it close to ideal for EAs that are intrinsically functional in nature DEAP [7]. All code are in real command of appearance in the real script and no line has been lost the fitness evaluation task is distinct as the sum of one’s within a different using the Python. In DEAP algorithm assessment functions always return a tuple of values even for single-objective problems creator using to create a Fitness max class encapsulates the fitness values and making fitness maximization. It creates a one new class inherit from base. Fitness and we set its weights attribute accordingly.  

Artificial Life and Ant Behaviour

Creator module expects at least two arguments. The first (Fitness Max) is the name of the new class, while the (base Fitness) is the parent class. Any extra argument given to this function is extra to the new class as an attribute. In this case, the weights attribute is a tuple containing a single positive unit weight achieving fitness maximization [8].  To minimize the fitness, we would use one instead of one for multi-objective optimization, we will allocate a tuple with as several weights as there are objectives. The second built class encapsulates. Here, for the one-max problem, it inherits from the Python standard list, and it has a fitness attribute of the just created the second one is the function used to generate the content filling for that data structure, and the last one is the number of elements to generate [9].

Genetic programming means evolving solutions to difficult problems the answer is not obvious. The program can be done by the fitness function. The fitness function can rate the performance of the solutions. The genetic programming paradigm problems of AI are viewed by the computer programs [10]. Ant genetic program evolves program to get the food collection behavior of ants. The food collection problem is common genetic program problem. In the Food collection problems the ants must work together to succeed. There are two ways in food collection problem. First, adding water to environment where the ants will be able to collect food. The stream is available and separates the ants from water [11].

The ants should build a bridge and some ants may die and some cross the bridge. Second, to carry heavy food that has to be lifted by much number of ants. Many ants need to lift the each piece of food and bring it back to the colony. They must find a place to communicate if they need help. The real difficult problems involve both rivers and heavy food with fewer ants. The traditional ant colony algorithms have difficulty in addressing the dynamic optimization problems. Due to algorithm converge solutions and dynamic change will occur, it is difficult for the population to adapt new environment. Ant colony optimization algorithm shows the behavior of real ants when they search for food [12].

To complete the food searching task as fast as possible. ACO algorithm adapt to dynamic changes as they are formed by the nature. The framework of the ACO algorithms is based on virtual population of the ants. The artificial ants move from one place to the other till they have flexible place. The framework based on the EA on actual population feasible solutions [13]. They are variety of operators: crossover and mutation are used to generate the new population. The ant has a novel approach to distribute the problem solving and optimization. ACO the vehicle routing protocol is used. VRP first take some of variants that are being formulated to bring VRP closer. Ant colony system is to solve the routing problem. ACS algorithm uses the multi-compartment vehicles to sort. Thus the ant colony has the very interesting behaviors. Communication is very limited between ants. The study of ant behavior has no problem in solving and optimization. 

Implementing Ant Food Collection Optimization in Python

The ant food collection optimization is done in python and the screenshot is provided below. The ant moves forward or random. The optimization generation value ranges from 0-99. This detects the best position and identifies by genetic algorithm technique

  • The green color represents the Ants.
  • The blue color represents the food particles.

The Ant food collection is processed and coded in python. The generations are provided in code.

The green particles moves in a random manner chasing the blue particles.

The iterations go till 100 iterations. The ant moves scattered all around the maxima which is global, and once the iterations are moving towards the global one, the literations chooses the best cases and the worst cases. Then the ant food collection optimization is obtained. After 99 iterations, the optimized results are obtained.

The following shows generation counts once the program runs. When the generation reaches 99, the output will be displayed.

36th generation is executing and the remaining generation executions are provided here. 

Once, the generation count ends, the output will be displayed. The green particles so called ants will have random movement and searches for food. The food collection is highlighted in blue color. 

Genetic algorithm is one of the DEAP algorithmic techniques. Genetic algorithm suits as the best scenario of ant food collection. This gives good scope for the scenario makes it work best in python code 

Iterations:

99 iterations happen in the method of optimization technique used.

Whenever each repetition takes place, the improved ants of image are shown and then it is limited together to form a rich picture of the ant food collecting movement. When the repetition comes to an end, the movements are shown in output.

Conclusion

The objective of the project is implemented by optimizing the ant food collection using DEAP algorithm. Each position is estimated with its function. The particle swarm optimization technique is used for the object detection. genetic algorithm technology is used as it comes under DEAP algorithm. The implementation is done in python and the screenshots are provided. Suitable motivations are made finally. 

References

[1]C. M. Pinteaa, Optimization Problems. Romania, p. 4.

[2]F. De Rainville, F. Fortin, M. Marc Parizeau and C. Gagné, DEAP: A Python Framework for Evolutionary Algorithms. Canada, p. 8.

[3]   D. Odgers, S. Odgers and J. Dawson, The python problem. Tulsa, OK: Kane Miller, 2010.

 [4] M. JI and R. XIAO, “Ant colony optimization and heuristic algorithms for rectangle layout optimization problem with equilibrium constraints”, Journal of Computer Applications, vol. 30, no. 11, pp. 2898-2901, 2010.

[5]”Ant Colony Algorithm — from Wolfram MathWorld”, Mathworld.wolfram.com, 2018. [Online]. Available: https://mathworld.wolfram.com/AntColonyAlgorithm.html. [Accessed: 08- Jan- 2018].

[6]S. Kolavali and S. Bhatnagar, “Ant Colony Optimization Algorithms for Shortest Path Problems”, 2018. .

[7] ]”Genetic Algorithms: Cool Name & Damn Simple”, Lethain.com, 2018. [Online]. Available: https://lethain.com/genetic-algorithms-cool-name-damn-simple/. [Accessed: 10- Jan- 2018].

[8]A. Aljanaby, K. Ku-Mahamud and N. Norwawi, “Interacted Multiple Ant Colonies Optimization Approach to Enhance the Performance of Ant Colony Optimization Algorithms”, Computer and Information Science, vol. 3, no. 1, 2010.

[9]D. Odgers, S. Odgers and J. Dawson, The python problem. Tulsa, OK: Kane Miller, 2010.

[10]G. Eliot, The mill on the Floss. New York: Open Road Integrated Media, 2016.

[11]”PythonForOperationsResearch – Python Wiki”, Wiki.python.org, 2018. [Online]. Available: https://wiki.python.org/moin/PythonForOperationsResearch. [Accessed: 08- Jan- 2018].

[12]”5 Python Scripts to Optimize Your Website SEO – DZone Web Dev”, dzone.com, 2018. [Online]. Available: https://dzone.com/articles/5-python-scripts-to-optimize-your-website-seo. [Accessed: 08- Jan- 2018]. 

[13]”Advancements in Genetic Engineering – Open Access Journals”, Omicsonline.org, 2018. [Online]. Available: https://www.omicsonline.org/advancements-in-genetic-engineering.php. [Accessed: 11- Jan- 2018].