You are on page 1of 9

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/327513509

Discrete Firefly Algorithm: A New Metaheuristic Approach for Solving


Constraint Satisfaction Problems

Conference Paper · July 2018


DOI: 10.1109/CEC.2018.8477823

CITATIONS READS

10 951

3 authors:

Mahdi Bidar Malek Mouhoub


University of Regina University of Regina
25 PUBLICATIONS 118 CITATIONS 180 PUBLICATIONS 842 CITATIONS

SEE PROFILE SEE PROFILE

Samira Sadaoui
University of Regina
114 PUBLICATIONS 694 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Fraud Detection based on Advanced Machine Learning View project

Incremental Feature Learning with Constructive Neural Networks View project

All content following this page was uploaded by Mahdi Bidar on 07 September 2018.

The user has requested enhancement of the downloaded file.


Discrete Firefly Algorithm: A New Metaheuristic
Approach for Solving Constraint Satisfaction
Problems
Mahdi Bidar Malek Mouhoub Samira Sadaoui
Department of Computer Science, Department of Computer Science, Department of Computer Science,
University of Regina University of Regina University of Regina
Canada Canada Canada
bidar20m@cs.uregina.ca mouhoubm@cs.uregina.ca sadaouis@cs.uregina.ca

Abstract- Constraint Satisfaction Problems are regarded as requires exponential time cost. A CSP with n variables and
NP-Complete problems which solving them with systematic a domain size d, will need a backtrack search algorithm with
methods requires exponential time. Firefly algorithm is a O(dn) time complexity in the worst case [1]. As it mentioned
nature inspired algorithm which has been successfully applied Backtrack search is the most known systematic method for
to different combinatorial problems. This paper presents a new
Discrete Firefly Algorithm for Solving Constraint Satisfaction
solving CSPs. However there are some shortcomings with
problems (CSPs) and investigates its applicability for dealing this method the most important of which is thrashing,
with such problems. Performance of the proposed method has meaning that algorithm cannot identify and remember the
been assessed through extensive experiments on CSP instances real source of conflict, so repeatedly fails due to the same
generated by Model RB which is a standard mean for reason.
generating CSPs with different tightness. Results of the
experiments in comparison with other methods including
classical methods and other metaheuristic methods clearly
In order to overcome this limitation, constraint propagation
demonstrate the significant performance of proposed discrete has been proposed and is processed through Look-ahead
firefly algorithm in dealing with CSPs. strategies including Forward Checking (FC) and
Maintaining Arc Consistency (MAC). These strategies
Keywords: Constraint Satisfaction Problems (CSPs);
enable the algorithm to prune those branches that would
metaheuristics; evolutionary algorithms. otherwise lead to failure. FC enforces a local consistency
between the current variable (the variable that is being
assigned) and the future variables (the non-assigned
I. INTRODUCTION variables connected to the current variable via constraints)
to prune earlier those branches of the search tree that will
Solving a constraint satisfaction problem refers to find lead to failure earlier. MAC (also called Full Look Ahead,
appropriate assignments of values (as solutions) to problem or FLA) performs full local consistency on the current and
variables from variables’ domain so that all constraints of the future variables. The advantage of MAC is that it also
the problem are satisfied. Any CSP can be formally defined detects the conflict between future variables and therefore
as follow: a). a set of variables, b). set of finite values as prunes more branches than FC. This requires however more
domain for each variable and c). a set of constraints that time effort than FC [1]. While reducing the size of the
restrict the values that variables can simultaneously take [1]. problem space through FC or MAC (by removing some
Dealing with CSPs in appropriate ways has been center of inconsistent values from the variables domains) helps
consideration since almost all real-world problems suffer improving the time performance of the backtrack search,
from constraints and there for finding appropriate ways to this latter still suffers from its exponential time cost
handle these constrained problems has been of the great especially for hard to solve problem instances. This is the
importance. CSPs traditionally have being dealt with main motivation for the research community in this area to
classical systematic methods like Backtrack search is the develop new algorithms and take advantages of existing
most known method in this class. However due to the powerful algorithms like metaheuristics handle these
exponential cost of systematical method researchers have problems [5].
been looking for new algorithms for solving CSPs.
Problems like graph coloring problems [2], N-queen
problems [3] as well as real-world applications like Metaheuristic algorithms including evolutionary and swarm-
scheduling and planning, configuration, timetabling, gear intelligence algorithms have shown successful results when
train design, tension/compression spring design, pressure solving constrained problems [5, 6]. This paper investigates
vessel design problem [4] can be considered as the most the applicability of the Firefly algorithm, in dealing with
well-known constraint satisfaction problems. CSPs. This paper meticulously presents all steps of applying
Firefly algorithm to CSPs which have discrete nature. In
fact the main challenging issue here is to discretize the
CSPs are known to be NP-complete problems, meaning that Firefly algorithm to be applicable for applying to discrete
solving them with classical methods like systematic search
problems. While evolutionary techniques such as Genetic improve the performance of the PSO, the authors improved
Algorithms (GAs) are generally developed to deal with the no-hope/re-hope mechanism introduced in [17]. This
discrete problem spaces (like Travelling Salesman latter is used to identify particles that have been stuck in
Problem), which make them easily applicable to CSPs, it is local optimum trap, in order to relocate them randomly to
not the case for swarm-intelligence based metaheuristics other locations of the problem space so the algorithm get
like Firefly algorithm. To evaluate the performance of the going again. And also authors of [22] proposed firefly
proposed algorithm in dealing with CSPs, we have algorithm for graph coloring problem. Their algorithm takes
conducted extensive experiments on problem instances advantages of swap local search heuristic. Due to the
randomly generated with the known Model RB [7]. The discrete nature of the graph coloring problems, they changed
main advantage of employing Model RB is the ability to the algorithm to be able to deal with discrete problem spaces
generate hard CSP instances near the phase transition which (containing permutation of values). In fact their main
are naturally very hard problem to solve (due to many contribution is to hybridization of firefly with swap local
numbers of constraints need to be satisfied). The results search to improve the quality of the solution through local
achieved by proposed algorithm have been compared to FC search.
and MAC as well as variants of GA-based techniques, in
terms of running time needed to return the solution and the III. THE FIREFLY ALGORITHM
quality of this latter (measured in number of violated
constraints). The results of the experiments are very Proposed by Yang in [5], the Firefly algorithm is one of the
promising and clearly demonstrate the superiority of our well-known nature-inspired algorithms inspired by social
proposed solving method over systematic and GA-based behavior of special flashing insect namely Firefly in nature.
techniques. These flies can be especially seen in the sky during summer
nights emitting light for communication with other fireflies
II. RELATED WORK or attracting matting partners and to allure and hunt prey.
Fireflies are attracted to the brighter ones and move toward
Genetic algorithms (GAs) are among the most known them. Their attractiveness is proportional to their brightness,
nature-inspired algorithms based on Darwinian evolution the brighter a Firefly is the more attractive he is (its light
and theory of survival of the fittest [9]. It has been shown by intensity) which however decreases with the distance. In
many researchers that GAs are well suited for solving many case there is no brighter Firefly, they move stochastically.
optimization problems like scheduling [10, 11] and resource The light intensity I of fireflies decreases as r increases in
allocation [12] and multi objective optimization [24]. In [13] terms of I / r2. Furthermore, air has impact on the intensity
a GA-based method has been proposed for solving CSPs of their light and absorbs it and makes it weak. These two
with a crossover designed as follows. When choosing two factors have negative impact on the fireflies’ vision and
parents for producing offsprings, the number of conflicts is limit it. The Firefly algorithm is one of the most well-known
computed for each gene in both parents (corresponding to an nature-inspired optimization algorithms that can be applied
assignment of a given value to a variable). Genes with the to a large variety of non-trivial optimization problems.
minimum number of conflicts are then selected. When Features of firefly algorithm are described as follows.
applying their proposed method to different randomly random() is a vector of uniformly distributed random
generated CSPs as well as temporal CSPs, the authors numbers [0,1). Features of Firefly algorithm are tabulated in
demonstrated the high performance of their improved GA. Table I.

In [14], Solnon reports the applicability of Ant Colony Table I. FEATURES OF FIREFLY ALGORITHM
Optimization (ACO) for CSPs. Their main idea was to keep
track of quality areas of problem space by using pheromone. FEATURES EQUATIONS
Information of this pheromone is then used as a heuristic to Distance: Distance between solutions i
guide search for choosing the best values for problem and j at locations xi and xj respectively, is
variables. ACO was inspired by the collective foraging measured by following equation (k is the (1)
behavior of real ants. Their indirect communication with subscript of the spatial component of xi
and xj):
pheromone enables them to find the shortest path between Attractiveness (β): it is proportional to
their nest and food source. This social behavior was distance r, absorption coefficient
modeled as an optimization algorithm and has been applied 𝛾 and I0 the light intensity at (2)
𝛾
to a wide range of optimization problems such as source that can be defined as I0 = f(xi) or
scheduling, resource allocation, Traveling Salesman I0 =1.
Problem (TSP), graph coloring and vehicle routing. Movement: Firefly i moves toward
brighter Firefly j (at xi and xj) following
(3)
Equation (3). Here, 𝛼 is the size 𝛼
In [15], the authors applied a Particle Swarm Optimization of the random step.
(PSO) algorithm to CSPs. The velocity parameter of the Stochastic Movement of the brightest
algorithm is computed based on the information about Firefly at location xmin. (4)
conflicts between variables. The authors also proposed new
PSO operators such as subtraction, addition and
multiplication for the purpose of solving CSPs. In order to
The brightness of the fireflies, representing the solution fitness function is considered as quality of each solution.
quality, is calculated with a fitness function that is defined Respective equations are:
according to the problem being solved [5, 23]. The
brightest Firefly is the optimal solution [16]. (5)

IV. PROPOSED DISCRETE FIREFLY ALGORITHM


FOR SOLVING CSPs (6)

The standard firefly algorithm is a nature-inspired swarm Here NC is the total number of constraints and
intelligence based algorithm which has been introduced to checks if solution s satisfies
deal with continues optimization problems ( ). To constraint i or not. The goal is to minimize the number of
apply it to discrete optimization problems, all the features of violated constraints in an evolutionary process until,
the algorithm must be well adapted to be able to deal with hopefully, all constraints are satisfied. Given a solutions
discrete spaces ( ) which is the space of all possible to our graph coloring problem, the
combinations of variables values (discrete chromosome-like corresponding fitness functions is calculated as shown in
solutions). This process requires redefining all the steps and Figure 3.
features of the Firefly algorithm including initialization the
population (generating discrete initial solutions), the
distance between discrete solutions, the attractiveness and
the movement features. The steps of discretization of the
Firefly algorithm are presented below.

A. Solution Formation (discrete solutions)

In the proposed DFA, the set of randomly assigned values to


problem’s variables form the initial population. In standard
firefly algorithm, initial population is the set of randomly
generated locations in the continuous problem space or the
values associated to these randomly generated locations Fig 3. Solution with 2 violated constraints.
generated by respective fitness function (objective function).
Figure 1 indicates an instance of the graph coloring problem C. Updating Solutions
and Figure 2 shows its corresponding CSP solution.
The process of updating solutions is performed through
Variables: {V1, V2, V3, V4, V5, V6}, Domain: {r, g, b, y}, several steps listed below.
Constraint: No two adjacent variables with the same color.
 Distance

Distance between solutions in standard firefly algorithm is


calculated through equation 1 (Cartesian distance of two
fireflies) which is appropriate mean to deal with continuous
problem spaces. To deal with discrete problem spaces we
propose employing Hamming distance [18, 19]. Given two
solutions Sk and Sl, the Hamming distance Hd( , ) is the
number of variables in Sk and Sl that have different values.
It is calculated as shown in Equations 7 and 8.
Fig 1. Example of the graph coloring problem.

(7)

Fig 2. CSP potential solution.


(8)
B. Fitness Function
Here, nvar is the
number of variables and
Due to the fact that our main objective is to find a solution checks if sk(i) and sl(i) share
which violates none of the constraints, we defined a fitness the same value or not. Considering solution s1 and s2 in
function which measures the number of the violated Figure 4, they differ in two variables, so Hd( , .
constraints solutions. The generated value through the The swap distance can be applied to those problems where
spaces consist of possible permutations of values which is In converting continuous Firefly to discrete Firefly the most
not the case for CSPs. important step to take is to adopt its movement to suit the
discrete problem spaces. Preserving all the features of the
movement of Firefly algorithm including exploitation and
exploration features is of the great importance and all must
be reflected with care to the discrete version of the
algorithm. Exploitation refers to local movement toward
local optimum solutions while exploration refers to
movement of the algorithm toward the global best solution.

Fig 4. Hamming distance between and . a. Local Movement (exploitation)

 Attractiveness Fitting the definition of the local movement of the fireflies,


the movement of a Firefly toward the brighter one in
From the Equation 3 it can be deduced that β controls the discrete problem spaces implies sharing more values with
convergence rate of the algorithm, meaning that larger value the brighter Firefly by the weaker firefly. From Equation (3)
of β causes the faster convergence of the fireflies to a local one can speculate that convergence rate of fireflies is
optimum solution and convergence to a solution means controlled by β. In fact β encourages exploitation of the
sharing the same quantities with that solution. To carry the algorithm and brings them together. According to above
same attribute from continuous Firefly to discrete Firefly the facts we need to define new local movement to suit the
β parameter must be defined with care. In the proposed discrete problem spaces (to bring fireflies together in
DFA, β is considered as the probability of replacing a discrete problem spaces). β movement of solution sk towards
parameter value with a new one [20]. The behavior of β for solution sl in a discrete problem space follows Equation 9.
increasing the distance from 1 to 100 when I0=1 and γ=0.4
is depicted in Figure 5. (9)

rnd is a uniformly generated random number between [0,1].


Through Equation 9, if the generated random number is
smaller than β then the values of the better solution (sl)
replace the corresponding variable value of the weaker
solution (sk) otherwise that value remains unchanged.
Equation 9 applied to those variables of weaker firefly that
have different values with their corresponding variables in
the better firefly. The steps for this discrete movement for
the given solutions s1 and s2 with F(s1)=2 and F(s2)=1 are
stated below.

Fig 5. Behavior of the β for increasing distance from 1 to 100 when I0=1 1. Find the variables that share the same value. These values
and γ=0.4.
will definitely remain unchanged in less brighter Firefly.
From Figure 5, it can be seen that β changes from 1 to 10-3
when the distance changes from 0 to 100. In CSPs to fit this S2= r b g r b b
definition, the more identical values must be shared to move S1= r g r b
from one solution to another solution to reduce the distance 2. For filling the gaps considering the β value (probability
(according to the definition of distance and fitness functions value between [0,1]), two different cases may happen:
for CSPs).
 With probability β, the value of the corresponding
According to this definition, β is proposed to be considered variable in the better solution is chosen to fill a gap in
as the probability of changing the value of a variable in less quality solution.
weaker Firefly with the value of the corresponding variable  With probability 1- β, a gap is not filled by the value of
in the brighter Firefly. So the bigger the β is the more likely the corresponding variable of the better solution. In this
the weaker solution is to replace its variables values by the case, this gap will be filled by the previous value. For
corresponding variables values of the better solution. For example, when filling the first gap in s1 we have:
instance β=0.4 determines a probability equal to 0.4 for
replacing the values of a solution with the values of the S1= r b g r b
better ones.
S1= r r g r b
This step continues until all gaps are filled.
 Movement
b. Global Movement (Exploration) We have employed Model RB (which is the standard and
most frequently used mean by researchers in this area) to
One challenge when using metaheuristics for solving randomly generate CSP instances to run our experiments on
combinatorial problems is dealing with local optimum traps. them. Due to having exact phase transition one can use it to
One way to address this issue is to perform a mutation as a generate hard to solve instances [7, 21]. The main
random search. After filling all gaps, the mutation operator parameters of Model RB which require to be set in order to
is applied to the complete assignments. We consider the generate different CSP instances are n, p, α and r. Here n is
following random mutations. the number of variables, p (0 < p < 1) is the constraint
tightness, and r and α (0 < r, α < 1) are two positive user
defined constants [7, 21]. The procedure used by Model RB
 Random Resetting Mutation (RRM): RRM assigns is briefly stated as follow:
random values from variable domains to randomly
chosen variables. RRM is an appropriate method for
problem spaces consist of lists or string of arbitrary 1. Select with repetition random constraints.
elements like integer values. The main advantage of Randomly selected non-repeated pairs of variables (2 of n
this method is reachability, meaning that every point in variables) form constraints of the problem [21].
the problem space can be reached from any arbitrary
solution in the problem space, there for using this 2. For each constraint uniformly select pd2 incompatible
method diversified solutions can be produced. As we pairs of values from variables’ domains without repetition,
know, diversity has significant impact on the where d = nα is the domain size of each variable [21].
performance of the metaheuristic algorithms.
 Swap Mutation (SwM): Through SwM values of two 3. All the variables have the same domain corresponding to
randomly selected variables are interchanged. the first d natural numbers (0 ... d−1). According to [7], pt is
 Scramble Mutation (ScM): Through this method a the phase transition of the CSP instances which is calculated
subset of values are selected and their values are as follows: pt = 1 − e −α/r. Solvable problems are therefore
shuffled or scrambled randomly. generated with p < pt.
 Inversion Mutation (IM): Through this method values
of a randomly chosen subset of variables are inverted. In fact Model RB simulates constrained problems that suffer
from restrictions on their variables, meaning values that can
The proposed discrete Firefly algorithm is presented in be assigned to their variables simultaneously are restricted
Algorithm 1. which narrow the acceptable solutions. In the other words, it
generates constraints for pairs of problem variables. These
Input constraints do not let the problem to take some values of its
m,γ,α,I //problem constants domain. CSP instances for assessing the performance of the
maxGen //maximum number of generations proposed DFA are generated through Model RB
Output: xmin //best solution (with minimum violated constraints) implemented by authors. Generated CSP instances to be
For i=1:m used in our experiments have different properties. They
xi= initialSolution() //Generate m random solutions have tightness ranging from 0.05 to 0.6 and different
Endfori number of variables (75 and 100). CSPs with higher
For Count=1:maxGen tightness are more difficult problems to solve and problems
Update the best solution found so far with 0.6 are problems close to phase transition which are the
For i=1:m most difficult CSP instances to solve. All the methods in the
For j=i+1:m experiments (Model RB as well) have been implemented by
If Fitness (si) < Fitness (sj) MATLAB R2010a and all experiments have been
Determine distance ri,j performed on a PC with Intel Core i7 1.6 GHz processor
Determine attractiveness β and 1GB RAM.
β Movement(sj , si) // Move sj toward si
Mutation
B. Test Results
Endif
Endforj
Endfori Our proposed DFA is compared to different Genetic
Apply Mutation to the best solution Algorithms (GAs) as well as classical methods including
EndforCount Backtrack search, FC and MAC. We investigate the
Algorithm 1. The proposed Discrete Firefly Algorithm (DFA) for CSPs. performance of the proposed DFA in terms of running time
(Second), Success Rate (SR, the percentage of the
V. EXPERIMENTATION experiments an algorithm returns a complete solution),
Number of Violated Constraints (NVC) and also the
A. Problem Instances and Experimentation Environment Number of Constraint Checks (NCC). The parameters of the
proposed DFA are tuned to their best by trial and error, and
their values are as follow: γ=0.009 and population size =
30. Figure 6 indicates the convergence trend of the proposed
DFA to the best solutions (in term of NVC). The significant Tables II and III report results of experiments on CSP
point that can be seen from Figure 6 is the ability of the instances with 75 and 100 variables respectively, and
proposed DFA to converge to the best solution very soon in tightness ranging from 0.05 to 0.6. The results of these
all experiments, which proves the high performance and experiments, reported in Tables II and III, show that SwM,
applicability of the proposed method. The running time is ScM and IM mutations are better operators than RRM in
the time that DFA finds the best solution. Referring to terms of running time and NCC. Also, the overall results are
Figure 6, the last two experiments (c and d) correspond to very promising and in all experiments the proposed DFA is
the hardest instances to solve. DFA was however successful successful in finding complete solutions (0 violated
in finding the best solutions in 11 iterations. In order to find constraints). Although instances with tightness equal 0.6 are
the most effective of the four mutation methods we reported the most hard to solve, the proposed method dealt very
in the previous Section, we conducted several comparative effectively with that and achieved the best result in very
experiments using the following settings. acceptable amount of time. It is worth mentioning that
diversification has significant impact on the performance of
 RRM the metaheuristics and enables the search algorithm to
 Generate a random number in [1 ... n], (α). access diverse areas of the search space thanks to the
 Choose randomly α variables. random mutation operators. According to our discussion,
 Assign random values from variable domains to the more diverse solutions one algorithm can produce the
chosen variables. higher performance that algorithm would have and so the
more likely that would be to find the best solution. To
further investigate the performance of the proposed DFA,
1 2 3 4 5 6 7 1 2 3 1 5 3 7
we conducted comparative experiments and report the
results in Tables IV (comparison with backtrack search
 SwM methods) and V (comparison with the modified GAs
 Choose randomly two variables. presented in [13]). The IM operator is used for our DFA
 Exchange the values of chosen variables. algorithm as it has the best results according to Tables II and
III. In Table IV, we observe that increasing the tightness
1 2 3 4 5 6 7 1 2 7 4 5 6 3 corresponds to a significant increase of the systematic
search methods (BT, FC and MAC). The results reported in
 ScM Table V are averaged over 20 run and SR and NVC. The
 Select randomly a subset of variables. different types of GAs considered are listed below [13].
 Values of selected variables are shuffled or
scrambled randomly.  MPC: GA with Multi Parent Crossover
 OPC: Standard GA with One Point Crossover
1 2 3 4 5 6 7 1 2 6 3 4 5 7  PSC: GA with Parental Success Crossover
 HPGA+PSC: Hierarchical Parallel Genetic Algorithm + PSC
 HPGA+GM+PSC: HPGA + proposed GM + PSC
 IM
 Select randomly a subset of variables.
 Invert values of selected variables. From Table V, we can see that all the DFA variants,
including different mutation operators, achieved the best
results in all experiments with the highest SR (100%) and
1 2 3 4 5 6 7 1 2 6 5 4 3 7 with no violated constraints. The second best method is the
HPGA+GM+PSC.

a) Tightness=0.45, Running Time=57.8270, Number of Iterations=10 b) Tightness=0.5, Running Time=77.0032, Number of Iterations=11
c) Tightness=0.55, Running Time=70.7841, Number of Iterations=11 d) Tightness=0.6, Running Time=93.7050, Number of Iterations=11
Fig 6. Convergence trend of the proposed DFA in dealing with different CSPs.

Table II. COMPARATIVE RESULTS ACHIEVED BY DIFFERENT DFA ON PROBLEMS WITH 75 VARIABLES.
RRM SwM ScM IM
Tightness Time(S) NVC NCC Time(S) NVC NCC Time(S) NVC NCC Time(S) NVC NCC
0.05 1.0097 0 611520 0.9821 0 667680 0.8755 0 606320 0.1328 0 527800
0.1 2.3613 0 1493700 1.0827 0 1309620 1.6761 0 1294020 2.3234 0 1325220
0.15 5.5889 0 3417700 6.2942 0 3413800 4.6584 0 2965300 4.2011 0 3266900
0.2 9.4845 0 4402320 6.8630 0 4037280 6.8821 0 4230720 6.8909 0 4082520
0.25 15.5502 0 7390240 13.5648 0 6926400 13.0318 0 6597760 14.3287 0 7109440
0.3 14.5899 0 7593300 13.1114 0 7291440 15.5877 0 8358480 15.8732 0 8129160
0.35 22.0229 0 10813660 23.1066 0 10930920 19.6665 0 10690680 19.6610 0 9375080
0.4 25.9733 0 13080600 23.1061 0 12570220 28.1147 0 13547040 23.8448 0 12634440
0.45 31.4167 0 15328040 22.3143 0 14782040 29.8390 0 14683760 24.0635 0 13289640
0.5 36.9495 0 18224960 30.9351 0 16165760 33.5972 0 17239040 34.4612 0 17368000
0.55 39.9539 0 19319820 38.4928 0 19213740 33.1907 0 17719780 46.0355 0 20685600
0.6 44.2037 0 22526400 42.2222 0 21469240 44.1054 0 22990760 44.5170 0 21582860

Table III. COMPARATIVE RESULTS ACHIEVED BY DIFFERENT DFA ON PROBLEMS WITH 100 VARIABLES.
RRM SwM ScM IM
Tightness Time(S) NVC NCC Time(S) NVC NCC Time(S) NVC NCC Time(Sec) NVC NCC
0.05 1.2140 0 1031136 0.4979 0 933984 1.0575 0 886144 1.1287 0 1046592
0.1 7.1269 0 3431232 3.3484 0 3548992 4.7470 0 2777664 6.0216 0 3448896
0.15 14.9180 0 7187040 12.6580 0 7074432 12.1084 0 6884544 8.4188 0 6345792
0.2 22.8456 0 10919296 21.3834 0 11031168 22.2462 0 10754432 17.6288 0 9261824
0.25 33.6261 0 14767840 31.6439 0 15982240 27.4681 0 15422880 27.6144 0 13685920
0.3 41.8278 0 18635520 36.9684 0 18268992 41.6499 0 19386240 37.5286 0 18096768
0.35 50.9483 0 22158752 49.3887 0 25038720 45.0875 0 21236544 47.8664 0 22957312
0.4 60.5928 0 26654976 56.0323 0 26837504 60.8819 0 28386048 56.7365 0 25966080
0.45 82.9892 0 34418304 87.0223 0 35345664 57.8270 0 33278976 74.2197 0 34345440
0.5 88.6096 0 39140480 80.1186 0 37271040 77.0032 0 37329920 76.7654 0 36814720
0.55 103.2232 0 48130720 88.5592 0 41241024 70.7841 0 36019104 90.9472 0 39710880
0.6 103.1124 0 46438656 97.6594 0 46906752 93.7050 0 47604480 98.9651 0 44769408

Table IV. RESULTS ON CSPs WITH DIFFERENT TIGHTNESS AND WITH 100 VARIABLES.
DFA BT FC MAC
Tightness Time(S) NVC NCC Time (S) NVC NCC Time(S) NVC NCC Time(S) NVC NCC
0.05 1.1287 0 1046592 1.5447 0 1602272 1.1769 0 1443296 0.4468 0 1441824
0.1 6.0216 0 3448896 9.3705 0 5933632 9.4333 0 6462080 5.1778 0 5056320
0.15 8.4188 0 6345792 20.3215 0 11516928 16.4282 0 10945056 15.3742 0 10794912
0.2 17.6288 0 9261824 40.0673 0 17234176 39.4435 0 17307776 26.3828 0 16236160
0.25 27.6144 0 13685920 49.5232 0 30177840 47.1757 0 31462160 39.3856 0 22852800
0.3 37.5286 0 18096768 91.0679 0 38200608 61.4103 0 37776672 56.7726 0 38160864
0.35 47.8664 0 22957312 141.9691 0 49709072 101.6795 0 46983664 100.7832 0 43150576
0.4 56.7365 0 25966080 158.8545 0 59819136 149.8388 0 55414912 124.5321 0 56150912
0.45 74.2197 0 34345440 196.6887 0 66256560 148.4843 0 64812528 145.7612 0 63017424
0.5 76.7654 0 36814720 306.4860 0 82347360 198.8774 0 74199840 165.9458 0 69356960
0.55 90.9472 0 39710880 296.9602 0 83214736 239.3077 0 82898992 213.9627 0 82121776
0.6 98.9651 0 44769408 416.1118 0 94153536 323.0191 0 91636416 252.5353 0 87776832

Table V. RESULTS ACHIEVED BY DIFFERENT DFA and DIFFERENT GAs ON CSPs WITH 100 VARIABLES.
DFA+RRM DFA+SwM DFA+ScM DFA+IM HPGA+PSC HPGA+GM+PSC MPC OPC PSC
Tightness SR, NVC SR, NVC SR, NVC SR, NVC SR, NVC SR, NVC SR, NVC SR, NVC SR, NVC
0.05 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100% 100%, 0 100%, 0
0.1 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100% 100%, 0 100%, 0
0.15 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 4 100%, 0 100%, 0
0.2 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 9 27%, 0 100%, 0
0.25 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 17 0, 3 100%, 0
0.3 100% ,0 100% ,0 100% ,0 100% ,0 100% ,0 100% ,0 0, 25 0, 5 100%, 0
0.35 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 28 0, 10 100%, 0
0.4 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 37 0, 12 62%, 0
0.45 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 45 0, 27 0, 5
0.5 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 0, 53 0, 30 0, 9
0.55 100%, 0 100%, 0 100%, 0 100%, 0 73%, 0 100%, 0 0, 69 0, 42 0, 15
0.6 100%, 0 100%, 0 100%, 0 100%, 0 0, 3 79%, 0 0, 78 0, 62 0, 17

It solved all CSPs with tightness p= 0.05 to p=0.55 with [8]. Mackworth, Alan K. "Consistency in networks of
SR=100% and CSPs with p=0.6 with SR=79%. relations." Artificial intelligence 8, no. 1 (1977): 99-118.
[9]. Goldberg, David E., and John H. Holland. "Genetic algorithms and
HPGA+PSC method also performed well and solved all machine learning." Machine learning 3, no. 2 (1988): 95-99.
problems with tightness p= 0.05 to p=0.5 with SR=100% [10]. Hartmann, Sönke. "A competitive genetic algorithm for
and CSPs with p=0.55 with SR=73%. The best result it resource‐constrained project scheduling." Naval Research Logistics
achieved when dealing with instances having p=0.6 was a (NRL) 45, no. 7 (1998): 733-750.
[11]. on alves, os ernando, orge os de agalh es endes, and
solution with NVC=3. aur cio C esende. "A hybrid genetic algorithm for the job shop
scheduling problem." European journal of operational
research 167, no. 1 (2005): 77-95.
VI. Conclusion [12]. Alcaraz, Javier, and Concepción Maroto. "A robust genetic
algorithm for resource allocation in project scheduling." Annals of
operations Research 102, no. 1-4 (2001): 83-109.
In this paper, we proposed a new Discrete Firefly algorithm, [13]. Abbasian, Reza, and Malek Mouhoub. "A new parallel ga-based
that we call DFA, for dealing with CSPs. In order to prevent method for constraint satisfaction problems." International Journal
the proposed method from being trapped in local optimum, of Computational Intelligence and Applications 15, no. 03 (2016):
we consider several random mutation methods. To assess 1650017.
[14]. Solnon, Christine. "Ants can solve constraint satisfaction
the real performance of the proposed DFA, we conducted problems." IEEE transactions on evolutionary computation 6, no. 4
extensive experiments on randomly generated CSP (2002): 347-357.
instances. The results are very promising and clearly [15]. Schoofs, Luk, and Bart Naudts. "Swarm intelligence on the binary
demonstrate the superiority of our proposed solving method constraint satisfaction problem." In Evolutionary Computation,
2002. CEC'02. Proceedings of the 2002 Congress on, vol. 2, pp.
over systematic and GA-based techniques. In the near 1444-1449. IEEE, 2002.
future, we plan to evaluate the performance of our method [16]. Bidar, Mahdi, Samira Sadaoui, Malek Mouhoub, and Mohsen Bidar.
on real world discrete decision and optimization problems. "Improving Firefly Algorithm Performance using Fuzzy Logic." In
We will also explore the possibility of running our SMC 2017.
[17]. Clerc, Maurice. "Discrete particle swarm optimization: A fuzzy
algorithm in parallel as done with GAs in [13]. combinatorial black box." 2006-05-31]. http://clerc. maurice. free.
fr/PSO (2000).
REFERENCE [18]. Li, Ming, Xin Chen, Xin Li, Bin Ma, and Paul MB Vitányi. "The
similarity metric." IEEE transactions on Information Theory 50, no.
12 (2004): 3250-3264.
[1]. Dechter, Rina. Constraint processing. Morgan Kaufmann, 2003. [19]. Merz, Peter, and Bernd Freisleben. "A genetic local search approach
[2]. Eiben, Ágoston E., Jan K. Van Der Hauw, and Jano I. van Hemert. to the quadratic assignment problem." In Proceedings of the 7th
"Graph coloring with adaptive evolutionary algorithms." Journal of international conference on genetic algorithms, pp. 1-1. 1997.
Heuristics 4, no. 1 (1998): 25-46. [20]. Durkota, Karel. "Implementation of a discrete Firefly algorithm for
[3]. Brailsford, Sally C., Chris N. Potts, and Barbara M. Smith. the QAP problem within the sage framework." Bachelor Thesis,
"Constraint satisfaction problems: Algorithms and Czech Technical University (2011).
applications." European Journal of Operational Research 119, no. 3 [21]. Mouhoub, Malek, and Amrudee Sukpan. "Managing dynamic CSPs
(1999): 557-581. with preferences." Applied Intelligence 37, no. 3 (2012): 446-462.
[4]. Cagnina, Leticia C., Susana C. Esquivel, and Carlos A. Coello [22]. Fister Jr, Iztok, Xin-She Yang, Iztok Fister, and Janez Brest.
Coello. "Solving engineering optimization problems with the simple "Memetic firefly algorithm for combinatorial optimization." arXiv
constrained particle swarm optimizer." Informatica 32, no. 3 (2008). preprint arXiv:1204.5165 (2012).
[5]. Yang, Xin-She. Nature-inspired metaheuristic algorithms. Luniver [23]. Bidar, Mahdi, Samira Sadaoui, Malek Mouhoub, and Mohsen Bidar.
press, 2010. "Enhanced Firefly Algorithm Using Fuzzy Parameter
[6]. Gandomi, Amir H. "Interior search algorithm (ISA): a novel Tuner." Computer and Information Science 11, no. 1 (2018): 26.
approach for global optimization." ISA transactions 53, no. 4 [24]. Shil, Shubhashis Kumar, and Samira Sadaoui. "Multi-Objective
(2014): 1168-1183. Optimization in Multi-Attribute and Multi-Unit Combinatorial
[7]. Xu, Ke, and Wei Li. "Exact phase transitions in random constraint Reverse Auctions." International Journal on Artificial Intelligence
satisfaction problems." J. Artif. Intell. Res.(JAIR) 12 (2000): 93-103. Tools 26, no. 05 (2017): 1760016.

View publication stats

You might also like