Chicken feed optimization using evolution strategies and firefly algorithm

Received Jan 12, 2018 Revised Aug 1, 2018 Accepted Aug 16, 2018 Mixing broiler chicken and layer hens feed using various feed ingredients is a difficult task. The feed must fulfill the minimum nutrient requirement and must break the constraint. Some classic approach like Pearson’s Square has been already introduced to solve this problem. However, the approaches cannot guarantee to fulfill nutrient requirements and desirable price. The two metaheuristic algorithms Evolution Strategies (ES) and Firefly Algorithms (FA) are being proposed in this paper to know how well they performed this problems. Result show that ES is perform much better compared to classic Pearson’s Square, but ES itself is outperform by FA on both cases.


INTRODUCTION
Livestock farming is an activity of keeping animals that can be utilized by humans mainly as a food producer [1]. Two among many of the farm product is meat and eggs. In Indonesia, such consumption of meat products has risen consistently over the years. Among the meat product, 62% of meat product coming from poultry farm [2]. This statement supported by data published by USAID whose state that in 2013, Indonesia's poultry industry produced about 1.285 million tons meat for a year. Meanwhile the production of poultry eggs in 2013 reached 1.2 million tons [3].
When raising livestock such as chicken or cow, one aspect that must be considered is the aspect of feeding livestock. The feed must have sufficient nutrition to keep livestock grow well, but it requires considerable daily cost, which is about 65-70% of operating costs [1], [4]. Based on the fact, farmers have to figure out how to meet the nutritional needs of cattle at the minimum cost. As farmer and expert know, animal feed usually are a mixture of feed materials from agricultural and industrial waste, if necessary additional components such as vitamins and mineral extracts may be added. The main nutrient content that must be considered is the protein, fat, and fiber [5]. But to make a good feed composition we also need to consider about some factors such as fluctuating prices, and proper nutrition simultaneously [4].
Optimal feeding composition is being needed to gain weight for both broiler chicken and laying hens. For broiler chicken, the more their weight gained the more carcass' meat they produced, meanwhile for laying hens the more they gained weight, they will produce bigger egg and with better quality. For laying hens, after they reached optimal weight, the feed will act as energy provider for egg production. [6], [7]. While it possible to use manual search to mix feed ingredients, study already proved that the manual search of a solution for optimizing requires a great deal of insight and patience [8]. To solve this problem, some methods are already be introduced. The most classical approach to solve feed optimization problem usually using Pearson's Square (PS). PS is relatively easy to understand and implemented but it usually only maximizing the requirements for one or two elements of nutrition only. Besides if we judge from the price point, the price of the material sometimes becomes quite expensive [9].
Another proposed solution is using Evolution Strategies (ES). ES is part of evolutionary algorithms, a group of algorithm that has been successful to solve many composition problems on many disciplines such as Engineering, Biomedic, Economy, Operation Research, Social Science, Physics and many more. For example for drugs composition, livestock feed composition and Cutting Stock Problem [10]- [12]. ES itself was being invented by Ingo Rechenberg from Technical University Berlin at almost the same time with Genetic Algorithm's (GA) invention [13]. While GA is widely used by many researchsrs, study by Salimans et.al. mention that ES may be used to be alternative evolutionary algorithm besides GA [14].
ES algorithm aims to find the optimum solution and can be applied as a solution to solve complex problems with many parameters and restrictions [1], [15]. Some research about this algorithm to solve combinatorial problem was already done such as work by Ahire et al [16]. which using ES to solve Workforce-constrained Preventive Maintenance Scheduling that usually exist on heavy equipment overhaul facilities such as aircraft service centers or railroad yards. On the other side, Schmidt-Dannert et al. [17] was trying to implement ES method to solve a very complex problem : create carotenoid diversity in E. coli cells.
Another nature inspired algorithm besides ES that can be used is Firefly algorithm (FA). FA was relatively new among nature inspired algorithm. It was being invented by Xin-She Yang from Cambridge University on 2007. By took concept of fireflies flashing light that will become weaker after some distances, the fireflies object that represents real world problems will be attract into nearest firefly object with strongest flashing light [18]. FA also has many similarities with particle swarm optimization (PSO) algorithm, because it is also based on swarm behavior but FA has better efficiency and robustness in complex optimization problems [19]. On previous study by Wang et.al, FA with some modified attraction rule proved to be able to solve optimization function such as Sphere, Rosenbrock, and Griewank with relatively high success rate [20].
Study by Genfu et.al proved that FA can be used to solve NP hard problem, especially-in this study-Reactive Power Optimization. Meanwhile, research by Apostolopoulos and Vlachos [21] that trying to solve energy problems by solve the economic emissions load dispatch problem using the FA proved that FA is able to generate optimal solution with proper selection of control parameters. This study has objective to compare performance of ES and FA based on their average fitness and computational time. The average fitness test will measure how good the solution resulted by the algorithm while computational time will measure how fast the algorithm will give the result.

RESEARCH METHOD 2.1. Nutrient requirements
To ensure the nutrient requirements for broiler and layer chickens can be fulfilled, we use some standard that can be viewed on Table 1 and Table 2. for broiler chicken case. For laying hens that produce eggs, the standard can be viewed on Table 3.

[22], [23].
To make chicken feed we will combine four ingredients as can be seen on Table 4. It consists of corn, sorgum, rice, and coconut oilcake. The price is on Indonesian Rupiahs (IDR) and the price will be counted as price per kilograms.

Representation
The first step in implementing evolutionary algorithm is to define the exact representation of chromosomes (encoding). A good chromosomes representation is very important because it will affect the effectivity of ES and FA in exploring the search space [24]. To formulate the feed composition, we will use real code representation that describes the amount of each feed ingredient used in the feed mixing. The number of genes in a chromosome both in ES or FA is the percentage of feed ingredients and each chromosome will represent how many that ingredients will be used. Zero means that ingredients will not be included. The example of chromosomes can be seen on Table 5. (1)

Evolution strategis (ES)
Evolution Strategy Algorithm using the two main parameters (μ and λ) where μ is the number of candidate solutions in the generation of parent while λ is the number of candidate solutions produced from the parent generation. That's why it should be better that λ value greater than or equal to μ (λ ≥ μ). The pseudocode of ES as described by Mahmudy [1] can be seen on Figure 1 and as described by Brownlee [25] the flow of ES can be interpreted as Figure 2. Population will be initialized randomly and will be evaluated using fitness function which will be calculated based on the total price of feed ingredients used in feed compositions. Only the best two parent will be selected and every parent will be mutated to generate offspring. Finally the offsprings and parents will be evaluated, to select which one the best and will be survive. Meanwhile the parameter for ES is use the parameter as can be seen on Table 6. This parameter is based on research by [1]. For this research, there will be a slight modification on the ES algorithm. The modification can be seen as red marks on Figure 3. As mentioned by previous study by Sihananto et.al. [1] The purpose of this modification is to prevent the existence of genes with negative values.

Firefly algorithm (FA)
The pseudocode of Firefly Algorithm as described by Yang [26] can be seen on Figure 4, while flow diagram of Firefly Algorithm can be seen on Figure 5. As usual the population will be initialized randomly, and then among the many fireflies some fireflies will be selected as candidate solution. After the cost of the candidate solution firelies have been counted, the best candidate will be the 'center' and all other fireflies will be 'fly' to that center. The penalty will be given for each fireflies after each iteration. After maximum iteration, the one with less penalty value will be selected as solution. For the parameters, after many trial and errors, we found the optimum parameters for Firefly Algorithm (FA) as can be seen on Table 7. To make the test fair, we use 100 iteration both for ES and FA. And for every case we repeat the test 10 times because both ES and FA are metaheuristic algorithm that may result different solution from time to time.

RESULTS AND ANALYSIS
All the testing scenarios are implemented using Java programming language and consist of two section: the average fitness test and the running time test.

Average fitness test
The performance comparison of ES and FA can be seen on Table 7. Ther performance is being measured by fitness formula as described on (1). The test is being run 10 times to get average fitness as shown in Table 8. As we can see on Table 8., on layer hens case, the chicken growth's phase that being tested is on starter phase, layer phase, and layer finisher phase [23]. The Pearson's Square got lowest average performance among the three methods, while ES got much higher score than Pearson's Square and FA is the highest.
The pattern on layer hens case repeated on broiler chicken case also can be seen on Table 8., which tested on two growth phase: starter and finisher phase [22]. The Pearson's Square once again got lowest average performance, ES got medium score but FA is the highest.
The ES is perform much better than classic Pearson's Square method because ES has ability as metaheuristic algorithm where it will generate sets of random solutions then evaluate then do selection on best solution. This process is called 'evolution' by Mezura-Montes et al. [15] and by 'evolution' process, the better solution is being found.
But if we compared ES to FA, FA performed better on every test case. This may be happen because FA is population based algorithm and social behaviour of its fireflies can be easily formulated and associated with given optimization problem [21] and ES like GA sometimes fall into premature convergence, while swarm intelligence algorithm like FA can reach wider search area thus prevent the risk of premature convergence [27].

Running time test
The Table 9 show us the comparison of ES and FA performance based on running time in microseconds (ms). The PS will not be measured because the PS is being compute by Microsoft Excel and it gives almost instaneous result as soon as we change the variable. As shown on Table 9, ES needs more execution time than FA. This can be explaining by the characteristics of ES and FA itself. ES has characteristic to exploit solutions, it is more a 'fine tuning' characteristics than another evolutionary algorithm [28], as consequences, it will be slower for ES to reach convergence point. Meanwhile FA is powerful on globally-searching promising area. As part of swarm intelligence algorithm, the fireflies of FA can search solution on wider area than ES thus it can find solution faster than ES. Based on this behaviour, from the start FA focused on less computational time than ES which need longer computational time to achieve result as best as FA.

CONCLUSION
The implementation of Firefly Algorithm to make chicken feed composition both on layer and broiler chicken already proofed that Firefly Algorithm can be used to make chicken feed composition based on its average fitness result and computational time. With some forward research, the Firefly Algorithm may be implemented as helper algorithm for local farmers on Indonesia, so they can compose their own chicken feed.
Meanwhile Evolution Strategies performance itself is not too bad compared with Firefly Algorithm. With some tuning and another modification such as hybridization to improve its computational time and fitness performance, the Evolution Strategies itself may become an alternative algorithm to make livestock feed composition.