University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 72 Expert system to predict the numbers of livestock in Thi-Qar province https://doi.org/10.32792/utq/utj/vol12/3/6 Shaker K.Ali Atyaf J.Yaseen Amer Y. Mahdi Computer Department, Thi_Qar University Email: Shaker@utq.edu.iq Email: atyaf_jarallah@yahoo.com Abstract Predict the numbers of livestock is one of interesting research area cause the important of livestock in each countries economics, in this paper we design an expert system for predict the numbers of livestock (Sheep, Goat, Cow, Buffalo and Camel) in Thi-Qar province, and we collect the knowledge from (Directorate of meteorological in Nasiriyah, the Veterinary Hospital in Nasiriyah and Directorate of Agriculture in the province of Thi-Qar) and collect the last 5 years to compare the result from our system with actual results by compare year by year in actual world by the same years in our system , There are 10 knowledge which build rules , There are differences numbers of rule for each livestock kinds, there are 813 fuzzy rules for sheep, 558 fuzzy rules for goat, 435 fuzzy rules for cow, 425 fuzzy rules for buffalo and 537 fuzzy rules for camel. There is commands knowledge and there is specified knowledge for each livestock (Sheep, Goat, Cow, Buffalo and Camel), there rules build by using Mamdani fuzzy logic and we use SQL server 2008 to insert these fuzzy rules. The results which we obtained from our fuzzy expert system was gave high accuracy and perfect result. Keywords: expert system, fuzzy logic, Mamdani, livestock. 1. Introduction Livestock represents one of advanced center in developing countries economics, in Iraq, it's considered as national wealth that contributes in supporting the food security abilities. [1] The trend towards the development of the livestock and increase its production necessarily requires a lot of https://jutq.utq.edu.iq/index.php/main https://doi.org/10.32792/utq/utj/vol12/3/6 mailto:Shaker@utq.edu.iq University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 73 important supplies and that depends on expecting the numbers of livestock in the next years which many important decisions will entail on it such as providing feed and adequate veterinary services, for that it's important to find a means based on existing data regardless of its negative or positive trend in order to make use of these data to predict the numbers of animals, and (the expert systems) are so important in this case.[2][1] The use of fuzzy expert systems is more appropriate to problems where specialized expertise happen for a particular problem. Commonly, human experts tend to specialize in rather narrow problem solving areas or tasks. These human experts tend to solve problems fairly accurately and quickly, explain what they do and judge the consistency of their own conclusions. They know when mistakes have been made, and communicate with other experts. Knowledge is a major resource in the improvement of fuzzy expert systems and it often lies with merely a few experts [3]. Using the fuzzy expert systems in the Agricultural field has many benefits. It may provide a fast, consistent and objective results and more accurate, reduces labor costs by eliminating labor-severe tasks, can help to support and verify human expert’s opinion and may help when expert advice is required but an expert may not be found. It can work in dangerous situations and under conditions unfit for human experts. Agricultural extension services have been forced to cover larger areas with less manpower [4]. They need to identify economical, fast, and reliable methods to transmit information and advice to clientele who can access of the internet, computers can transmit a decision-support programs and variety of educational with the click of a mouse; simulation models, multimedia programs, conventional programs, and ES are available to clientele. These programs can advise, simulate, teach, and predict results of decisions made on a farm. Expert system technology can do all of the above; thus an ES may be capable of educating while advice clientele on how to solve problems at the same time. 2. Architecture of expert system An expert system consists of three main parts: A user interface, an inference engine and a knowledge base 2.1User interface It is the process by which the expert system interacts with a user. User interface may be through forms, command prompts, dialog boxes, or other input methods. Some expert systems do not interact directly with a human but interact with other computer applications. The expert system, in these cases, will not have a user interface but will have an interaction mechanism for transactions with the other application. [5],[ 6] https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 74 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 75 2.2 An inference engine It is a brain of expert system that provides methodology for reasoning and uses the rule interpreter. It acts as an interpreter which processes and analyzes the rules. The main task of inference engine is to trace its way through a set of rules to reach at a conclusion. [7] 2.3 A knowledge base It is a collection of rules and facts where the knowledge base is made from information introduced by human experts. The knowledge base is flexible to accept changes (new rules perhaps will be added and existing ones maybe edited or deleted from the knowledge base with the use of the knowledge acquisition module) without affecting the whole system because it is independent from all other components of an expert system [8]. 3. Fuzzy logic Fuzzy logic which introduced by Zadeh in 1965 is defined as a set of mathematical ideas for knowledge representation based on degrees of membership rather than on crisp membership of classical theory of logic. [9] Unlike binary Boolean logic, Fuzzy logic is multi-valued. It deals with degrees of membership and degrees of truth. It uses the continuum of logical values between 0 (completely false) and 1 (completely true). Instead of black and white only, it employs the spectrum of colors, accepting that things can be partially false and partially true at the same time. We can see that in Figure (1), fuzzy logic adds a range of logical values to Boolean logic. Now classical theory of logic can be considered as a special case of multi-valued fuzzy logic as can be seen in Figure (2). [9][10] Figure (1) Range of logical values in Boolean and fuzzy logic: (a) Boolean logic; (b) multi-valued logic Figure (2)"The classical set theory is a subset of the theory of fuzzy sets"[ ] Fuzzy set Crisp set https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 76 Fuzzy logic technique can be implemented to real application needs the following three steps: Fuzzification, Fuzzy Inference Process and Defuzzification. [11] 4. The proposed method The proposed method consist from five steps as shown in figure 3 Figure.3 flowchart of proposed method Choose one kind of livestock kinds and entry the special system for this kind Enter the specific knowledge of livestock Matching data with the knowledge base (the rules) by using Mamdani Predicting of livestock Defining a set of rules Sheep Camel Buffalo Cow Goat https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 77 4.1 Choose one kind of livestock kinds In this step, we shall choose only one kind of livestock (Sheep, goats, cows, buffalos, camels) and entry the special system for this kind. 4.2 Enter the data for livestock We got the knowledge used in this paper from experts and competent authority such as Directorate of meteorological in Nasiriyah, the Veterinary Hospital in Nasiriyah and Directorate of Agriculture in the province of Thi- Qar. Data, which obtained from the experts and from the competent authority, are made up of main knowledge and are as follows: 1. Meteorological 2. Pastures 3. Butchery 4. Livestock breeder 5. Veterinary services 6. Smuggling 7. Governmental role 8. Scientific personnel and their role 9. Diseases 10. The impact of wars on the region The above main-knowledge has much sub- knowledge, which has more details. In the Tables (1-10), we will explain the main-knowledge and the sub-knowledge that branched from them. As example, Table of Meteorological Table (1). Description of the Sub-knowledge of Meteorological Sub-knowledge range livestock Low Mid Max Temperature(C) [-2,12] [8,45] [40,60] Sheep, goat, cow, buffalo, camel Rain(mm) [0,35] [22,55] [43,75] Sheep, goat, cow, buffalo, camel The proportion of the existence of the floods (%) [0,50] [25,100] Sheep, goat, camel The proportion of the presence of the marsh (%) [0,50] [25,100] buffalo https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 78 We formalize the parameters for every kind of knowledge we must also explain the system output ranges for livestock kinds determine the range of any livestock is (low, moderate and high) as shown in the Table (2) Table (2). Description of the ranges of system output Parameter Range Livestock Low Mid Max System output [0,49] [40,70] [65,100] Sheep, goat, cow, buffalo, camel 4.3 Defining a set of rules Here we formalize all sub-knowledge mentioned by using decision tables. The sub-knowledge for each kind of livestock kinds will be formalized independently of the other livestock kinds, for example the decision Table as shown in Table (3). Table (3). An example of formalization sub-knowledge(Temperature, Rain and The proportion of the presence of artesian wells )for sheep N O Temperatur e(C) Rain(m m) The proportion of the presence of artesian wells (%) System output 1 Max Max Max Mid 2 Mid Max Max Max 3 Low Max Max Mid 4 Max Mid Max Mid 5 Mid Mid Max Max 6 Low Mid Max Mid …. …. …. …. …. 26 Mid Low Low Low 27 Low Low Low Low After knowledge formalization, we choose suitable technique to build rules for fuzzy expert system. In this paper, we use IF-THEN rules. “IF” is the condition(s) and “THEN” is the conclusion displaying the action to be taken if the condition(s) is fulfilled. For example; https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 79 IF (Temperature=Max) AND (Rain=Max) AND (The proportion of the presence of artesian wells=Max) THEN (Increased livestock=Mid) IF (Temperature=Low) AND (Rain=Low) AND (The proportion of the presence of artesian wells=Low) THEN (Increased livestock=Low). There are differences numbers of rule for each livestock kinds, there are 813 fuzzy rules for sheep, 558 fuzzy rules for goat, 435 fuzzy rules for cow, 425 fuzzy rules for buffalo and 537 fuzzy rules for camel. We use SQL server 2008 to insert these fuzzy rules. We have created one database contains five tables according to the numbers of livestock kinds (each kind has its own table). Sub-knowledge of that kind represents the columns in that table. Each rule represents one record. 4.4 Matching data with the knowledge base (the rules) by using Mamdani This expert system livestock prediction was developed by using a fuzzy rule, triangular membership function, Mamdani and centroid of area (CoA) defuzzification models. Every kind of livestock has its own (FIS) operates independently from the rest of the species, so we will have a six FIS.one FIS used for each kind of five livestock and the sixth one used the output of all livestock kinds to find the final result of predicting. The following example show sample of how to use Mamdani in our program: 1. IF (Temperature=Max) AND (Rain=Max) AND (The proportion of the presence of artesian wells=Max) THEN (Increased livestock=Mid) 2. IF (Temperature=Mid) AND (Rain=Max) AND (The proportion of the presence of artesian wells=Max) THEN (Increased livestock=Max). 3. IF (Temperature=Low) AND (Rain=Max) AND (The proportion of the presence of artesian wells=Max) THEN (Increased livestock=Mid). 4. IF (Temperature=Max) AND (Rain=Mid) AND (The proportion of the presence of artesian wells=Max) THEN (Increased livestock=Mid). 5. IF (Temperature=Mid) AND (Rain=Mid) AND (The proportion of the presence of artesian wells=Max) THEN (Increased livestock=Max). 6. IF (Temperature=Mid) AND (Rain=Low) AND (The proportion of the presence of artesian wells=Low) THEN (Increased livestock=Low). 7. IF (Temperature=Low) AND (Rain=Low) AND (The proportion of the presence of artesian wells=Low) THEN (Increased livestock=Low). Each sub-knowledge of crisp values will be fuzzyfied by using triangular membership function µ𝐴 (𝑥) which depends on the scalar parameter ( a) as a https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 80 lower limit, (b) as an upper limit, and a < m < b. Figure (4) shows the diagram of Triangular MF. [12] Figure (4). Triangular Membership Function µ𝐴 (𝑥) = { 1, 𝑥 = 𝑚 𝑥 − 𝑎 𝑚 − 𝑎 , 𝑎 ≤ 𝑥 < 𝑚 𝑏 − 𝑥 𝑏 − 𝑚 , 𝑚 < 𝑥 ≤ 𝑏 (1) Membership Function of Temperature is as the following 𝑙𝑜𝑤 (𝑋) = { 𝑥 − (−2) 5 − (−2) ,−2 ≤ 𝑥 < 5 1 ,𝑥 = 5 12 − 𝑥 12 − 5 ,5 < 𝑥 ≤ 12 (2) 𝑚𝑖𝑑 (𝑋) = { 𝑥 − 8 26.5 − 8 ,8 ≤ 𝑥 < 26.5 1 ,𝑥 = 26.5 45 − 𝑥 45 − 26.5 ,26.5 < 𝑥 ≤ 45 (3) 𝑚𝑎𝑥 (𝑋) = { 𝑥 − 40 50 − 40 ,40 ≤ 𝑥 < 50 1 ,𝑥 = 50 60 − 𝑥 60 − 50 ,50 < 𝑥 ≤ 60 (4) Membership Function of Rain is as the following https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 81 𝑙𝑜𝑤 (𝑋) = { 𝑥 − 0 17.5 − 0 ,0 ≤ 𝑥 < 17.5 1 ,𝑥 = 17.5 35 − 𝑥 35 − 17.5 ,17.5 < 𝑥 ≤ 35 (5) 𝑚𝑖𝑑 (𝑋) = { 𝑥 − 22 38.5 − 22 ,22 ≤ 𝑥 < 38.5 1 ,𝑥 = 38.5 55 − 𝑥 55 − 38.5 ,38.5 < 𝑥 ≤ 55 (6) 𝑚𝑎𝑥 (𝑋) = { 𝑥 − 43 75 − 43 ,43 ≤ 𝑥 < 75 1 ,𝑥 = 75 (7) Membership Function of the proportion of the presence of artesian wells is as the following 𝑙𝑜𝑤 (𝑋) = { 𝑥 − 0 25 − 0 ,0 ≤ 𝑥 < 25 1 ,𝑥 = 50 50 − 𝑥 50 − 25 ,25 < 𝑥 ≤ 50 (8) 𝑚𝑖𝑑 (𝑋) = { 𝑥 − 22 38.5 − 22 ,40 ≤ 𝑥 < 57.5 1 ,𝑥 = 57.5 55 − 𝑥 55 − 38.5 ,57.5 < 𝑥 ≤ 75 (9) 𝑚𝑎𝑥 (𝑋) = { 𝑥 − 65 100 − 65 ,65 ≤ 𝑥 < 100 1 ,𝑥 = 100 (10) Then, we use “Min” as implication function which was in accordance with the Mamdani model. The implication value is got from the minimum value of input parameter values of each rule. In the above rule, the implication functions Temperature (TR), Rain (RR) and the proportion of the presence of artesian wells (WR). We get (implication1 for the first rule, implication2 for the second rule… and implication7 for the seventh rule). https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 82 . implication1=Min (TR1, RR1, WR1) implication2=Min (TR2, RR2, WR2) implication3=Min (TR3, RR3, WR3) implication4=Min (TR4, RR4, WR4) implication5=Min (TR5, RR5, WR5) implication6=Min (TR6, RR6, WR6) implication7=Min (TR7, RR7, WR7) This expert system consists of a large number of fuzzy correlation rules To do a fuzzy inference system, we use the Maximum Method (Max) which determined the maximum value of implication of each rule which has the same result. So we will get the three new implications with different results (Max, Med, low). Implication (max) =Max (implication1, implication3, implication4) Implication (mid) =Max (implication2, implication5) Implication (low) =Max (implication6, implication7) The fuzzy values transform to crisp value crisp value in defuzzification by using Centroid of Area (CoA).The ranges for system output, which be identified and formalized already in a section 4.2,in Table (2),will be used. 𝐶𝑜𝐴 = i (max) × 82.5 + i(mid) × 55 + i (low) × 24.5 i (max) + i(mid) + i(low) (10) Where i is implication. 4.5 Predicting of livestock Crisp values, which obtained from the previous step, are not clear to the user as where it is representing an increase or moderation or decreasing. So we fuzzfied the results of the previous step in order to be more clear for the user. By using the following Triangular Membership functions (CoA) will be fuzzified. 𝑙𝑜𝑤 (𝐶𝑜𝐴) = { 𝐶𝑜𝐴 − 0 24.5 − 0 ,0 ≤ 𝐶𝑜𝐴 < 24.5 1 ,𝐶𝑜𝐴 = 24.5 49 − 𝐶𝑜𝐴 49 − 24.5 ,24.5 < 𝐶𝑜𝐴 ≤ 49 (11) https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 83 𝑚𝑖𝑑 (𝐶𝑜𝐴) = { 𝐶𝑜𝐴 − 40 55 − 40 ,40 ≤ 𝐶𝑜𝐴 < 55 1 ,𝐶𝑜𝐴 = 55 70 − 𝐶𝑜𝐴 70 − 55 ,55 < 𝐶𝑜𝐴 ≤ 70 (12) 𝑚𝑎𝑥 (𝐶𝑜𝐴) = { 𝐶𝑜𝐴 − 65 82.5 − 65 65 ≤ 𝐶𝑜𝐴 < 82.5 1 𝐶𝑜𝐴 = 82.5 100 − 𝐶𝑜𝐴 100 − 82.5 82.5 < 𝐶𝑜𝐴 ≤ 100 (13) 5. Implementation and Results In our system, we predict the number of five kinds of livestock (sheep, goat, cow, buffalo and camel) .Here as example, we implement (sheep, goat) and discuss their results. The system was tested previous years (2013, 2014 and 2015) where all data of livestock, the conditions experienced by the livestock and the number of livestock are known for these years. Table (4) shows the real number for sheep and goat in the years (2013, 2014 and 2015). Table (4) The real numbers for sheep and goats for years (2013,2014 and 2015) id year NO.of.Sheep NO.of.Goat 1. 2013 431506 54775 2. 2014 496810 63413 3. 2015 663341 66032 We calculate the rate of increase in the number of livestock for two years according to the following law. 𝑇ℎ𝑒 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑖𝑛𝑐𝑟𝑒𝑎𝑠𝑒 = ((𝑁𝐴𝐶 − 𝑁𝐴𝑃)/ 𝑁𝐴𝑃) ∗ 100%…….(14) Where NAC is 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑎𝑛𝑖𝑚𝑎𝑙𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑦𝑒𝑎𝑟, NAP is 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑎𝑛𝑖𝑚𝑎𝑙𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑝𝑟𝑒𝑣𝑖𝑜𝑢𝑠 𝑦𝑒𝑎𝑟 Table (5) shows Actual increase rate for sheep and goat. Table (5) Actual increase rate for sheep and goat id year Sheep goat 1. 2013-2014 15.13 15.76 2. 2014-2015 33.11 33.93 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 84 Table(6) illustrate the input and results values to our system for sheep in the years(2013,2014 and 2015) I d Sub-knowledge for sheep 2013 2014 2015 1. Temperature (C) 27.9 27.1 28 2. Rain (mm) 14,51 6 17 49.5 3. Torrents (%) 0 0 0 4. The proportion of the presence of artesian wells (%) 10 15 35 5. Ratio of determine the grazing areas and the work of nature reserves (%) 20 25 50 6. Ratio of activate and revitalize the role of the Directorate of pastures (%) 0 0 0 7. Ratio of providing homes for breeders (%) 0 0 0 8. Percentage of domestic consumption (%) 20 10 10 9. Ratio of standard of living of the individual (%) 70 66 55 10. Ratio of religious and social occasions (%) 10 20 10 11. Proportion of commitment of livestock breeders to vaccinate their animals (%) 90 90 90 12. Ratio of organize periods for livestock feed (%) 60 60 60 13. Ratio of Cultural awareness among livestock breeders in the feasibility of modern production for livestock (%) 30 40 50 14. Ratio of Address the stagnant pools and disposal of contaminated feed (%) 0 0 0 15. Ratio of Get rid of the diseased dogs or processed (%) 0 0 0 16. Ratio of availability committees veterinary to visit villages and pastures (%) 90 90 90 17. Ratio of conducting spraying and dipping (%) 90 90 90 18. Ratio of availability of vaccines and treatments (%) 90 90 90 19. Ratio of Smuggling (%) 0 0 0 20. Ratio of Wool and leather prices in the market (%) 0 0 0 21. Ratio of Import of meat and milk and dairy products (%) 95 95 95 22. Ratio of Provide fodders for livestock breeders by the government (%) 10 70 40 23. Ratio of the provision of trucks and cars to 0 0 0 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 85 Ranchers by the government (%) 24. Ratio of Interest in international relations, to control the intercontinental diseases (%) 10 10 10 25. Ratio of The presence of wool production plants, leather and milk products (%) 10 10 12 26. Ratio of Activation of the massacres and livestock slaughter law (%) 70 70 70 27. Ratio of Increase cultural awareness among breeders (%) 100 95 85 28. Ratio of The presence of private associations for each type of livestock species (%) 10 10 10 29. Ratio of A census of livestock to learn their numbers and kinds (%) 40 50 75 30. Ratio of Genetic improvement for livestock (%) 0 0 0 31. Ratio of Building stockyard for animals (%) 5 5 10 32. Percentage of compliance with laws that prevent the smuggling operation (%) 90 90 90 33. Ratio of Planning for the development of livestock (%) 10 10 10 34. The proportion of use of scientific and technical cadres (%) 50 50 50 35. The proportion of attention in the Faculty of Veterinary Medicine and the College of Agriculture, Department of Animal Wealth (%) 60 60 60 36. Ratio of Attention in veterinarians and agronomists (%) 70 70 70 37. Ratio of Excessive intake of feed (%) 10 10 10 38. Ratio of presence Infectious diseases (%) 50 50 50 39. Ratio of the spread of viruses, parasites, and insects and contaminated feed (%) 60 60 60 40. Ratio of The emergence of genetic mutations (%) 10 10 10 41. Ratio of The presence of mines in pastures (%) 15 12 10 42. Result Low 43. Mid 0.620 2 0.14 95 44. Max 0.15 75 0.34 39 45. Real increase rate 15.1 3 33.1 1 46. Error rate 4.09 3.86 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 86 % % Table(7) illustrate the input and reults values for our system for goat in the years (2013,2014 and 2015) Id sub-knowledge for goat 2013 2014 2015 1. Temperature (C) 27.9 27.1 28 2. Rain (mm) 14,516 17 49.5 3. Torrents (%) 0 0 0 4. The proportion of the presence of artesian wells (%) 10 15 35 5. Ratio of determine the grazing areas and the work of nature reserves (%) 20 25 50 6. Ratio of activate and revitalize the role of the Directorate of pastures (%) 0 0 0 7. Ratio of providing homes for breeders (%) 0 0 0 8. Percentage of domestic consumption (%) 20 10 10 9. Proportion of commitment of livestock breeders to vaccinate their animals (%) 90 90 90 10. Ratio of organize periods for livestock feed (%) 60 60 80 11. Ratio of Cultural awareness among livestock breeders in the feasibility of modern production for livestock (%) 30 40 55 12. Ratio of Address the stagnant pools and disposal of contaminated feed (%) 0 0 0 13. Ratio of Get rid of the diseased dogs or processed (%) 0 0 0 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 87 14. Ratio of availability committees veterinary to visit villages and pastures (%) 90 90 90 15. Ratio of conducting spraying and dipping (%) 90 90 90 16. Ratio of availability of vaccines and treatments (%) 90 90 90 17. Ratio of Provide fodders for livestock breeders by the government (%) 10 70 40 18. Ratio of the provision of trucks and cars to pelvic Ranchers by the government (%) 0 0 0 19. Ratio of Interest in international relations, to control the intercontinental diseases (%) 10 10 10 20. Ratio of Activation of the massacres and livestock slaughter law (%) 70 70 70 21. Ratio of Increase cultural awareness among breeders (%) 100 95 85 22. Ratio of The presence of private associations for each type of livestock species (%) 10 10 10 23. Ratio of A census of livestock to learn their numbers and kinds (%) 40 50 75 24. Ratio of Building stockyard for animals (%) 5 5 10 25. Ratio of Planning for the development of livestock (%) 10 10 10 26. The proportion of use of scientific and technical cadres (%) 50 50 50 27. The proportion of attention in the Faculty of Veterinary Medicine and the College of Agriculture, Department of Animal Wealth (%) 60 60 60 28. Ratio of Attention in veterinarians and agronomists (%) 70 70 70 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 88 29. Ratio of Excessive intake of feed (%) 10 10 10 30. Ratio of presence Infectious diseases (%) 50 50 50 31. Ratio of the spread of viruses, parasites, and insects and contaminated feed (%) 60 60 60 32. Ratio of The emergence of genetic mutations (%) 10 10 10 33. Result Low 34. Mid 0.6115 0.1388 35. Max 0.1667 0.3529 36. Real increase rate 15.76 33.93 37. Error rate 5.77 4.13 Tables (6) and (7) illustrate the inputs of our expert system for the years (2013, 2014 and 2015) as well as the system results for each of these years. Because we deal with fuzzy logic systems, system results are usually decimal fractions less than 1 and the highest value we can get is 1. Therefore, the system output will be multiplied by 100 to make the results of the system are identical to reality. We will compare the results of the expert system with the actual rates of increase for livestock of all kinds in the years listed above and compute error rates for each kind in Table (8) Table (8). compare the results of the expert system with the actual rates of increase for livestock and error rate id Livestock kinds 2013-2014 2014-2015 1. Sheep Real increase rate 15.13 Real increase rate 33.11 Expected increase rate 15.75 Expected increase rate 34.39 Error rate 4.09% Error rate 3.86 % 2. Goat Real increase rate 15.76 Real increase rate 33.93 Expected increase rate 16.67 Expected increase rate 35.29 https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 89 Error rate 5.77% Error rate 4.13 % 3. Conclusions This paper shows how to build an expert system for predicting livestock preparation, where the fuzzy logic was used. FIS were used because they have broken the bounds of conventional programming, which is designed like the human reasoning. This enables the FIS to represent and handle more complex problems than conventional programming. The advantage of using fuzzy expert systems to predict livestock numbers is to help decision makers, farmers and researchers to predict livestock production quickly and accurately. References 1. T. Abdul-Mageed, U. K. Jabra," An Economic Study About The Demand Of Major Red And White Meat In Iraq Of 1990 – 2012 Using Linear Approximation Modelof Almost Ideal Demand System", The Iraqi Journal Of Agricultural Sciences ,3, 47, 829-836,2016. 2. Mahmood Bader Ali Al-Samea, Muthana Fadhil Ali," Geographic Analysis of the livestock in Iraq and its Natural and biotic problems and its development potentialities",Adab Al-Kufa,18,1, 171-218,2014. 3. Sanjay Kumar, Dr. Rajkishore Prasad," Importance of Expert System Shell in Development of Expert System", International Journal of Innovative Research and Development", Vol 4, Issue 3,128-133, March, 2015. 4. Özlem İnan, Derya Arslan, Şakir Taşdemir, and Mehmet Musa Özcan," Application of fuzzy expert system approach on prediction of some quality characteristics of grape juice concentrate (Pekmez) after different heat treatments", Journal of Food Science and Technology,48(3),423-431,Aug 2011. 5. Enrique Castillo ،Jose M. Gutierrez ،Ali S. Hadi ," Expert Systems and Probabilistic Network Models", Springer, 1997. 6. Diana-Aderina Moisuc and Mihai-Constantin Avornicului," ARCHITECTURAL MODEL OF EXPERT SYSTEMS", 5th International Symposium Engineering Management and Competitiveness, 7. K P Tripathi," A Review on Knowledge-based Expert System:Concept and Architecture" , IJCA Journal, Number 4 - Article 4,19-22,2011. https://jutq.utq.edu.iq/index.php/main University of Thi-Qar Journal Vol.12 No.3 SEP 2017 Web Site: https://jutq.utq.edu.iq/index.php/main Email: journal@jutq.utq.edu.iq 90 8. Nwigbo Stella N and Agbo Okechuku Chuks," EXPERT SYSTEM: A CATALYST IN EDUCATIONAL DEVELOPMENT IN NIGERIA", 1st International Technology, Education and Environment Conference (c) African Society for Scientific Research (ASSR), 566-571, 2011. 9. L.A. Zadeh, Fuzzy sets. Information and Control, 8(3):338 – 353, 1965. 10. Franck Dernoncourt," Introduction to fuzzy logic",Masschusetts Institute of Technology, January 2013. 11. Leekwijck, W. V. and Kerre, E. E. Defuzzication :criteria and classification. Fuzzy Sets and Systems, 108(2):159 – 178, 1999. 12. Ekananta Manalif," Fuzzy Expert-COCOMO Risk Assessment and Effort Contingency Model in Software Project Management", The University of Western Ontario, A thesis submitted in partial fulfillment of the requirements for the degree in Master of Engineering Science,2013. https://jutq.utq.edu.iq/index.php/main