Niching in Genetic Algorithms
Updated on September 23, 2011
Niching is a term often used in the Evolutionary Algorithms literature and its significance and implications may become clear only after the researcher has worked her way up some of them literature. My aim with this post is to informally define the term, and hopefully hint at its meaning and significance and more importantly consolidate the foundational literature in this area.
Since my niche is Genetic Algorithms (GAs), the discussion here will be limited to them. However, as the literature will show Niching methods originally proposed for the GA community has found applications in other Evolutionary Algorithms (EAs) as well. Niching methods extend canonical Genetic Algorithms to domains that require finding and maintenance of multiple solutions. They are traditionally used in domains when the finding of multiple solutions is desired, such as in a multi-modal optimization task or to maintain diversity so as to lead to one single, final solution in a difficult optimization task. A niching method must be able to form and maintain multiple diverse solutions and preserve them for the entire duration of the GA run. Under the effect of niching, the population of solutions is dynamically stable under the selection pressure.
From , “Niching involves the formation of distinct species exploiting different niches (resources) in the environment. It can promote cooperative populations that work together to solve a problem. Whereas the simple GA is purely competitive, with the best individuals quickly taking over the population, niched GAs converge to a population of diverse species (niches) that together cover a set of resources or rewards“. The resources or rewards, of course vary from one application domain to another. In a multi-modal optimization task, the resources would be the multiple optima, for example.
Classification of Niching methods
In  and , Mahfoud suggests a classification based on the way multiple niches are found in a GA: (Note that this classification is independent of the number of physical computer processors being used)
- Spatial or Parallel Niching methods: Niching methods belonging to this category finds and maintains multiple niches simultaneously in a single population. Examples of parallel niching methods are Sharing, Crowding function approach and Clearing method
- Temporal or Sequential Niching methods: These niching methods find multiple niches iteratively or temporally. For example the Sequential Niching method finds multiple niches iteratively.
Frequently Answered Questions (Answered in )
- Why do niching?
- Why maintain niches?
- Why not locate multiple solutions individually, by iterating the GA?
Essence of Niching
To better understand the essence and need for niching, here is a demo showing a function optimization task when no effort is made to maintain multiple soltuions and a second one where an explicit multiple-solution preserving mechanism is in place(For details refer here and here)
(please note that the demo has been created with an algorithm which does not use a niching mechanism, but it shows why niching is needed and what happens in the absence of a multiple solution preserving mechanism, such as niching)
Without multiple-solution preserving mechanism
With multiple-solution preserving mechanism
Use of Niching in Maintaining diverse feasible solutions in constrained optimization
The idea of niching is applicable in optimization of constrained problems. In such problems, maintaining diverse feasible solutions is desirable so as to prevent accumulation of solutions only in one part of the feasible space, especially in problems containing disconnected patches of feasible regions. Prof. Deb in his constraint handling paper  suggests one such use of niching.
References  and  are the most exhaustive treatment of Niching I have come across in the literature
- Niching methods for Genetic Algorithms
- A Comparison of Parallel and Sequential Niching Methods
- The Nature of Niching:, Genetic Algorithms and the Evolution of Optimal, Cooperative Populations
- Niching methods, specifically in the context of Multi-modal function optimization is discussed in the book “Multi-objective Optimization using Evolutionary Algorithms“
- An Efficient Constraint Handling Method for Genetic Algorithms
Fantastic demo, Can we get code for this?
Hello Anala: Thanks for your interest. The first demo is created using a simple RGA code (and capturing the video using one of the desktop screen recorders). The RGA code used was the one available here:http://www.iitk.ac.in/kangal/codes.shtml
The second demo was created using an algorithm proposed by us: http://echorand.me/2010/03/27/ga-demo-multimodal-function-optimization/.
Unfortunately, I have lost the exact code used for this demo. But, let me know if the work mentioned in the second demo interests you.
Thanks. Yes I am interested in the second demo. We did manage to find the code for simple binary GA. I was curious how niching was introduced in the basic GA algo, Please do send the code if you find it. Thanks again.