
Modified bat algorithm with quaternion representation Iztok Fister, Janez Brest, Iztok Fister Jr. Xin-She Yang University of Maribor Middlesex University Faculty of Electrical Engineering and Computer Science School of Science and Technology Smetanova 17, 2000 Maribor London NW4 4BT, United Kingdom Email: iztok.fi[email protected] Abstract—This paper introduces a modified bat algorithm The proper representation of a specific problem mainly de- using quaternion representation of individuals. Quaternions are pends on the intuition of the algorithm’s designer. Therefore, a number system, which extends complex numbers. They are developing a new representation is often a result of the successfully applied to problems of theoretical physics and to those areas needing fast rotation calculations. We propose the repeated ’trial-and-error’ principle. application of quaternions in optimization, more precisely, we This paper proposes a new representation for individuals have been using quaternions for representation of individuals using quaternions that have at first time been used by in bat algorithm belonging to a swarm intelligence family. Fister et al. in [7]. In mathematics, the quaternions extend It is expected that the problems with stagnation in swarm complex numbers. Quaternion algebra is connected with intelligence should be reduced or even eliminated. We believe that this representation could successfully be applied also to special features of the geometry of the appropriate Euclidian the other swarm intelligence and evolutionary algorithms. spaces. The idea of quaternions occurred to William Rowan Hamilton in 1845 [11] whilst he was walking along the Keywords-quaternion; swarm intelligence; evolutionary com- putation; representation of individuals; bat algorithm Royal Canal to a meeting of the Royal Irish Academy in Dublin. I. INTRODUCTION Quaternions are especially appropriate within those areas where it is necessary to compose rotations with mini- The last decades, scientists tend to build an automatic mal computation, e.g., programming the video games or problem solver that would be able to solve different prob- controllers of spacecraft [2]. For instance, 3-dimensional lems in computer science, mathematics, economy and en- rotation can be specified by a single quaternion, whilst a gineering. They often borrow a solutions from nature. For pair of quaternions are needed for 4-dimensional rotation. instance, swarm intelligence (SI) is an artificial intelligence The quaternion calculus are introduced in several physical (AI) discipline concerned with the design of intelligent applications, like: crystallography, the kinematics of rigid multi-agent systems that was inspired by the collective be- body motion, the Thomas precession, the special theory havior of social insects like ants, termites, bees, and wasps, of relativity, and classical electromagnetism [10]. A step as well as from other animal societies like flocks of bird forward in the popularization of quaternions was achieved by or shoals of fish [1]. Algorithms from this field have been Joachim Lambek in 1995 [17], who stated that quaternions applicable primarily for optimization problems and robotics. can provide a shortcut for pure mathematicians who wish The more notable swarm intelligence disciplines are as to familiarize themselves with certain aspects of theoretical follows: Ant Colony Optimization (ACO) [4], [16], Particle physics. Swarm Optimization (PSO) [14], Artificial Bees Colony In this study, the representation of quaternions was tested optimization (ABC) [13], [6], Firefly Algorithm (FA) [20], in a Bat algorithm [22] that obtains good results when Cuckoo Search (CS) [24], Bat Algorithm (BA) [22], etc. optimizing the low-dimensional problems, but become worse The representation of solution plays an important role when optimizing high-dimensional problems. The experi- in the performance and quality of the swarm intelligence ments showed that the results of the Bat algorithm could algorithms. Therefore, the tasks of designing such algorithms be improved when the same algorithm was hybridized using are to find a proper representation for the problem and the representation of individuals with quaternions (QBA). to develop appropriate search operators [18]. The proper Moreover, comparing the results of the QBA algorithm representation needs to encode all possible solutions of the with the results of other algorithms, like PSO, DE, and optimization problem. On the other hand, the appropriate ABC showed that these are also comparable with the other search operator should be applicable to the proper represen- algorithms in experiments. tation. In general, no theoretical methods exist nowadays for The rest of this paper is as follows: In Section 2, describing the effects of representation on the performance. quaternion algebra is presented in detail. Section 3, firstly, describes the Bat algorithm and then the modified QBA algo- 978-1-4799-7492-4/15/$31.00 c 2015 IEEE 491 rithm when using representation with quaternions. Section 4 where the division of a quaternion by a real-values focuses on the experiments and results. This paper concludes scalar is division of each component by norm. The by summarizing our preliminary work on representation with inverse operation satisfies the properties (q−1)−1 = q −1 −1 −1 quaternions, and the direction for further work is pointed- and (q0q1) = q0 q1 . out. • division: of quaternions q0 and q1 is defined by q /q = q q−1. II. QUATERNIONS 0 1 0 1 (7) Quaternions are formal expressions q = x0 + x1i + x2j + In addition to the pure quaternion algebra, two unary x3k, where x0,x1,x2,x3 are real values and they constitute functions are added by us as follows: the algebra over the reals generated by basic units i, j, k • qrand: is a quaternion defined as (also the imaginary part) that satisfy Hamilton’s celebrated qrand() = {x = N(0, 1) | for i =1...4}, equations: i (8) N(0, 1) ij = k, jk = i, ki = j, where denotes a random number drawn from a Gaussian distribution with zero mean and standard ji = −k, kj = −i, ik = −j, (1) deviation one. In other words, each component is i2 = j2 = k2 = −1. initialized with the random generated number. The quaternions q ∈ H describes a 4-dimensional space • qzero: is a quaternion defined as R4 over the real numbers. Using this notation, a pair of qzero() = {xi =0| for i =1...4}, (9) quaternions is denoted as q0 = x0 + x1i + x2j + x3k and q1 = y0 + y1i + y2j + y3k. The quaternion algebra defines where each component of quaternion is initialized with the following operations on quaternions [5]: zero. • addition and subtraction: is defined by These operations of quaternion algebra serve as a reach q0 ± q1 =(x0 + x1i + x2j + x3k) ± (y0 + y1i + y2j + y3k) basis for developing the different variation operators used in =(x0 ± y0)+(x1 ± y1)i +(x2 ± y2)j +(x3 ± y3)k. swarm intelligence and evolutionary algorithms. In the rest (2) of the paper, the usage of these operations by developing • scalar multiplication: is defined over the basic units the operators within the new Bat algorithm with quaternion i, j, k by Eq. (1). representation of individuals, are presented in detail. • multiplication: of quaternions is defined by III. BAT ALGORITHM q0q1 =(x0 + x1i + x2j + x3k)(y0 + y1i + y2j + y3k) =(x0y0 − x1y1 − x2y2 − x3y3)+ (x0y1 + x1y0 + x2y3 − x3y2)i+ The echolocation behavior of bats inspired Yang [22], [12] (x0y2 − x1y3 + x2y0 + x3y1)j+ by developing the Bat algorithm (BA). That means, bats (x0y3 + x1y2 − x2y1 + x3y0)k. (3) emit a sound pulse and listen to the echo bouncing back Multiplication is not commutative because the product from obstacles whilst flying. Bats are the only mammals with wings. Although some species are not blind, they use q0q1 = q1q0 in general. echolocation as their primary mechanism for orientation • conjugate: is unary arithmetical operation defined by towards a surface. Additionally, this mechanism serves as a ∗ ∗ q =(x0 + x1i + x2j + x3k) = x0 − x1i − x2j − x3k. tool for finding their prey and discriminating different types (4) of insects. The conjugate of quaternions satisfies the properties In echolocation, three parameters are important, i.e., the ∗ ∗ ∗ ∗ ∗ (q ) = q and (q0q1) = q0 q1 . range of frequencies, the rate of pulse emission, and the • norm: is defined by loudness. The frequency of pulse emission depends on the 2 2 2 2 prey’s size, i.e. the smaller the prey, the higher the frequency. N(q)=N(x0 + x1i + x2j + x3k)= x0 + x1 + x2 + x3. (5) The rate of pulse emission speeds-up when the bats move The norm is a real-valued function that satisfies near their prey when hunting. The loudness is higher when ∗ the properties N(q )=N(q) and N(q0q1)= the bats are hunt for prey and lower when they are flying N(q0)N(q1). This function is suitable for mapping homeward. the elements of vector (individual, solution) from 4-dimensional quaternion in genotype space to 1- A. Original Bat algorithm dimensional real-valued element in phenotype space. The echolocation behavior of bats can be formulated as a −1 • multiplicative inverse: of quaternion q is denoted as q new optimization algorithm, where this behavior is captured and has the property qq−1 = q−1q =1. It is constructed into an objective function of an optimization problem to as be solved. However, the following approximations of bat q−1 = q∗/N (q), (6) behavior are idealized during development: 492 • All bats use echolocation to sense distance to target nally, new bat y at i-position is determined (function objects. ’move bat’). • Bats fly randomly with the velocity vi at position xi, • local search part (lines 7-9): solution y is generated the frequency Qi ∈ [Qmin,Qmax] (also the wavelength in the neighborhood of the current best solution ac- λi), the rate of pulse emission ri ∈ [0, 1], and the loud- cording to the proximity of pulse rate ri. The function ness Ai ∈ [A0,Amin]. The frequency (and wavelength) ’neigh bat’, therefore, can be viewed as a kind of local can be adjusted depending on the proximity of their search.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-