# A Decision Support System for Fish Feeding Based on Hybrid Reasoning

Mingfei Zhang, Huiping Xue, Lianzhi Wang, Daoliang Li

► To cite this version:

Mingfei Zhang, Huiping Xue, Lianzhi Wang, Daoliang Li. A Decision Support System for Fish Feeding Based on Hybrid Reasoning. 6th Computer and Computing Technologies in Agriculture (CCTA), Oct 2012, Zhangjiajie, China. pp.19-26, 10.1007/978-3-642-36124-1_3 . hal-01348076

HAL Id: hal-01348076

https://inria.hal.science/hal-01348076

Submitted on 22 Jul 2016

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
A Decision Support System for Fish Feeding Based on
Hybrid Reasoning¹

Mingfei Zhang, Huiping Xue, Lianzhi Wang, Daoliang Li

College of Information and Electrical Engineering, China Agricultural University
Beijing, China
wangcau@163.com

**Abstract.** Considering the complex of decision-making process of rainbow trout feeding, a rainbow trout feeding decision support system is built by integrating case-based reasoning and rule-based reasoning with XML. This paper describes the theory of hybrid reasoning, and several experiment results with their own interpretation. The web based feeding decision support system is proved to have improved the feeding, and lessened the difficulty of obtaining expert knowledge in practice.

**Keywords:** Knowledge Representation; Case-based Reasoning; Decision Support System

# 1 Introduction

With the Development of computer network, on-line expert decision support system plays a more and more important role[1][2]. As a key part of decision support system, the knowledge database provides important foundation for decision[3]. How to convert the expert knowledge and experiment into cases and store them in database, and work with reasoning mechanism that generate fast and correct decision information, is a key issue in practice.

The rainbow trout cultivation is complex and it is difficult to abstract the feeding knowledge. In conventional feeding decision support system, people input the quantity, growth stage, and middleweight of fish, and the information of bait feed and nutritional needs, then calculate the feeding scheme using decision model, which mainly accomplished by linear programming, RBR(Case-based Reasoning), and CBR(Case-based Reasoning). RBR is easy understanding, and can efficiently present knowledge, and the disadvantages are: difficult to get and define rules, not obvious relationship between the rules, inconvenience of process knowledge, inadvisable management and maintenance, lack flexibility in reasoning. The advantages of CBR includes: fast speed of reasoning, easy build and maintain case base, more flexible, strong self learning ability; CBR also has its limitations: not easy to express, sensitive to noise, and lack correction mechanism.

In this paper, we tried to combine RBR and CBR, and build a feeding decision support system of rainbow trout. In many cases, a simple CBR method or RBR method

¹ Fund Project: Beijing Municipal Natural Science Foundation (4092024)
cannot ensure the accuracy of result when solving problems. So, the combination of RBR and CBR reasoning is a better model, in which they not only play the respective advantages, but also compensate shortcomings for each other. There are many repeats between the CBR case attributes and the RBR knowledge rules, which contribute to combining reasoning. Depending on the unified representation format (XML, Extensible Markup Language), RBR and CBR perform a seamless connection in the reasoning process. Through realizing a reasoning scheduling system, CBR can visit and call RBR auxiliary unit and RBR correction unit at each stage when they are required. Therefore, whether the RBR is used and when it is used depends on whether the CBR system request for reasoning scheduling module and when request. This ensures the parallel execution of the same knowledge in rules and cases during reasoning process, and reduces the search times, improves the efficiency, but also keeps the independence of unit itself and the entirety of system strategy.

# 2 Knowledge Representation Based On XML

## 2.1 Features of XML

In decision support system, there are many traditional methods to present knowledge, such as logic, production, frame, semantic network, object oriented, agent, rough set theory, and etc. Those single methods cannot meet the needs of artificial system, and people have put forward many new ways to present domain knowledge, which combined different ways[4]. In this paper, because of the difficulty of structurization and management of mixed knowledge, we adopted the XML to present knowledge.

The advantage of XML is arithmetical, easy organized and management, therefore nowadays more and more researchers use XML to present knowledge and solve problems[5].

As an open standard, XML enables organizations and persons to build standard set that is suitable in different situations. Secondly, XML is separate, and the storage format of data does not have to follow the display format. The self-describing feature makes XML better in describing complex data relations. Those properties also make applications that based on XML more correct and effective to search data, and pay no attention to irrelevant content[6]. XML has many other advantages, such as good format, abundant display style and convenient data processing ability. All this features can help the rainbow trout feeding decision support system provide easy, capable and exact services for users.

## 2.2 Representation format of rules and cases based on XML

The specific feeding cases described by XML are shown below, in which the attributes of case involves caseName, caseID, caseDate, caseTime, growPeriod and their own weight. The attributes of including water temperature, DO(dissolved oxygen), the content of ammonium, pH, water quality, content of protein in feed, salinity of water, average length of fish, average weight of fish. The case results are feeding rates and feeding advices.

```
<case caseName="案例1" caseID="2" caseTime="14:00"
caseDate="2009-1-12" growPeriod="鱼种"
```
```xml
weight="0.287-0.287-0.162-0.109-0.073-0.049-0.033">
<caseAttribute>
  <temperature rangeLow="2" rangeHigh="20">15</temperature>
  <DO>8</DO>
  <ammonia>0.015</ammonia>
  <pH>6.8</pH>
  <quality>12</quality>
  <feed>44</feed>
  <salt>0.4</salt>
  <avgLength>15</avgLength>
  <avgWeight>0.5</avgWeight>
</caseAttribute>
<caseResult>
  <caseFeedPer>7.2</caseFeedPer>
</caseResult>
</case>
```

We use the production rule "IF-THEN" to describe the feeding rule, whose type consists with feature attributes stored in database. In the process of reasoning, we achieved one time retrieval, and at the same time match and judge case and rule, finally, generated the hybrid feeding advice. The rules are presented as follows.

```xml
<rule name="规则2" type="DO">
  <premise unit="mg/L">
    <DO restrain="小于" nested="and">7</DO>
    <DO restrain="大于" nested="no">5</DO>
  </premise>
  <conclusion>溶氧不足,需要及时补氧!</conclusion>
</rule>
```

# 3 Reasoning Based On Case

## 3.1 Case reasoning process

Case based reasoning process can be summarized by three steps[7]:

(1) Retrieve historical experiments, and find similarities with current questions.

(2) Search the most similar cases from database.

(3) Learn from retrieved cases.

Meanwhile, many actions, such as retrieve, reuse, revise and save must be done in CBR:

Retrieve: using similarity match to search the most similar cases from database

Reuse: using the solutions of similar cases to solve current questions.

Revise: if the historical solution does not fit current questions, adapt it as a base solution to new questions

Save: the adapted solution becomes a new case, and save it to database, mainly the worthy experience and knowledge.
CBR is mainly consist of case presentation, case index, cases storage, case retrieve, case revise and inductions. Aiming at the particularities of hybrid reasoning feeding decision support system, we will discuss the case presentation and case index as below.

## 3.2 Case presentation based on XML

$CaseBase$= {case<sub>1</sub>, case<sub>2</sub>, ..., case<sub>i</sub>},

where case<sub>i</sub> = case(F<sub>i</sub>, S<sub>i</sub>), present the i-th case of database.

F<sub>i</sub>=(f<sub>i1</sub>,f<sub>i2</sub>,...,f<sub>in</sub>) present the feature sets of case i,

f<sub>in</sub> present the n-th feature of case Ci

S<sub>i</sub>=(s<sub>i1</sub>,s<sub>i2</sub>,...,s<sub>in</sub>) present the solution sets of case Ci

s<sub>in</sub> present the n-th solution of case Ci.

In rainbow trout feeding decision support system, the case database is consist of many cases, and each case includes three child elements, which are respectively case attribute, feature attribute and solution. The case attribute classifies the case, aiming at structuring an efficient case database in indexing and retrieving. The feature attribute plays an import role in reasoning process, and the retrieval of match case mainly depends on the similarity match of feature attribute, which contains feature name and feature value. The solution is the treatment method or conclusion of corresponding cases.

## 3.3 Case index

After saving cases, the system will retrieve and match the case. How to quickly and correctly obtain the case solution is not only an important aspect of evaluation, but also a core part of case based reasoning system. In the process of retrieval, efficiency is not only related to the retrieval algorithm, but also closely with the case database structure. Efficiency is even more critical considering the increasing size of the case database.

Generally, the retrieval indexes of case database are grouped by single index and multi-level index. It is comparatively simple to implement single index, and fit for the case database where not many cases are involved in early phases and the index can be set according to the feature attribute of problems. Therefore, we can have a retrieve and index in accordance with the attribute of the different stages of rainbow trout in the feeding decision system.

In the context of large scale of cases, the multi level index technology presumes there are N cases in the whole database, described as CaseBase={case<sub>1</sub>,case<sub>2</sub>, ..., case<sub>i</sub>}.

At first, we set top level indexes of case attributes according different stages of rainbow trout, and get the first layer child case of m-classes:

IndexCaseBase= {Icase<sub>1</sub>, Icase<sub>2</sub>, ..., Icase<sub>m</sub>} , m≤n

Then we chose the feature attribute to build the second index that weights more by using clustering method, and built child case of lower levels. As the first index, the m-classes first layer case database contains many specific cases, Icase<sub>i</sub>= {case<sub>i1</sub>, case<sub>i2</sub>, ..., case<sub>ir</sub>} , r is the case number in i-class layer cases. Finally, those specific cases cluster by the value scale of feature attribute and form the second index. The left layer index can be recursively built by choosing the minor important feature attribute
according to the method described above. Fig. 1 shows the case database structured by index tree, using the methods and layer index mechanism, and case feature attribute with value ranges.

<figure><img src="image_2.png" /><figcaption>Fig. 1 Multi index of case database</figcaption></figure>

## 4 Combination of Case Reasoning And Rule Reasoning

Considering the Complexity of decision content and the inner shortage of different decision methods, current decision support system more and more depends on multi methods in combination. Decision support system combined with different decision methods performed great effect on different decision content[8][9][10]. This paper combined RBR auxiliary unit and RBR revised unit of CBR that are needed in different stages, and integrated them into a unified module. By implementing and visiting the reasoning dispatch system, we can combine CBR and RBR into the greatest extent, without breaking the dependence and completeness of every reasoning unit. In the reasoning process, whether and when to use the RBR completely depend on the request by CBR system towards the reasoning dispatch system, and once called, this not only insures the parallel implementation of same knowledge in rules and cases, decreases the retrieve count and improves the efficiency, but also keeps the integrity of system strategy and unit itself. Fig. 2 shows the hybrid reasoning frame.

<figure><img src="image_3.png" /><figcaption>Fig. 2 combined RBR and CBR</figcaption></figure>

In a fine-feeding decision support system that combines rules and cases, the knowledge database is composed of a group of rules and cases respectively contain cultivation rule knowledge, and feeding case sample. In the reasoning process, the
feeding case sample and cultivation rule knowledge support each other, and perform specific decision task together. In accordance with the hybrid reasoning frame combining rules and cases, the specific decision task will be performed as follows:

(1) According to the main impact factors that influence the growth of rainbow trout that described above, the inputted cultivation information of new case should includes:

Culture stage: adult

Water temperature: 18 °C

Dissolved oxygen: 7mg/L

PH: 7

Ammonia: 0.0015mg/L

Protein: 39.5%

Salty: 0.4mg/L

Turbidity: 10NTU

(2) According to the layered structure, we retrieve the first layer classification index in accordance with cultivation stages, and then retrieve the adult case in accordance with the cultivation stage of adult fishes. In the process of retrieval, by calling the RBR auxiliary selection module, and judging from the water temperature and dissolved oxygen in multi layer index, the retrieve will be accelerated.

(3) Calculate the similarity of retrieved case data and new case, and match the case database by KNN (K Nearest Neighbors). If there is a case that exists in case database: CaseExist=⟨e₁, e₂, ..., eₙ⟩, and a new case : CaseNew=⟨f₁, f₂, ..., fₙ⟩, Sᵢ represents the similarity of feature i. If the values of feature were quantitative, then Sᵢ=1-abs(fᵢ-eᵢ)/eᵢ; otherwise, if the values of feature were same, then Sᵢ=1; else Sᵢ=0.

Hence, the similarity can be calculated as formula (1):

$$S = (\sum (w_i \times S_i) / \sum w_i) \times 100\% \quad (1)$$

When the similarity of case match is less than 0.75, after calculating by the rainbow trout feeding decision support system, all the results will be shown as Fig. 3.

<figure><img src="image_4.png" /><figcaption>Fig. 3 Results of similarity match</figcaption></figure>
(4) In the reasoning process, the frame dispatch engine provides cultivation advice by calling rule reasoning module according to the cultivation information input. The advantage of hybrid feeding is that 1-time retrieval of case in decision process will serve the purpose. The RBR and CBR were performed on one round, with cross support and cross-dependence in decision reasoning process. For example, according to input cultivation information, the system gives following advices:

*Feeding time: feed 2 times once a day.*

*Feed time: 9:30, feed amount percentage: 50%;*

*Feed time: 15:00, feed amount percentage: 50%.*

*Particles Fodders feeding advices: 5mm pellet feed*

(5) Revise and reuse the case result by calling RBR auxiliary module.

If the similarity of retrieval results cannot meet the expectations, and there is corresponding warning information on feeding, we can adjust in new case in view of the warning information, and add it to the database for reversion which will finally be evaluated by experts.

For the cases with retrieval failure, we directly add it to the case database, and get it reversed to experts. For example, when current water temperature is lower than normal temperature that fits for rainbow trout, the cultivator can adjust the water temperature to maintain a healthy cultivation environment according warning information.

## Conclusion

This paper presents a feeding decision-making method of combining the CBR and RBR, which made it more efficient in decision retrieval by using the mechanism of case index, and unified the expression forms of rules and cases by using XML to represent knowledge. The decision system combined rule reasoning and case reasoning work in practice has shown that it enhances the professionalism of feeding, and reduces the expert cost in cultivation.

## References

[1] SHIM J P, WARKENTIN M, COURTNEY J F, et al. Past, present, and future of decision support technology [J]. Decision Support Systems, 2002,33(2):111-126

[2] OMAR F E, BRIAN D F. A web-based multi-perspective decision support system for information security planning [J]. Decision Support Systems, 2010,50(1):43-54

[3] KLEIN M. Finsim expert; A KB/DSS for financial analysis and planning [J]. Engineering Costs and Production Economics, 2002,17(1-4):359-367

[4] CORCHADO J M, LEES B. A hybrid case-based model for forecasting [J]. Applied Artificial Intelligence, 2001,15(6):105-127

[5] MEHDI B, SIAVOSH K. A new method for knowledge representation in expert system's (XMLKR)[C]//ICETET '08 Proceedings of the 2008 First International Conference on Emerging Trends in Engineering and Technology. Washington DC, USA: IEEE Computer Society, 2008:326-331

[6] LI Guo-liang, FENG Jian-hua, ZHOU Li-zhu. Keyword searches in data-centric XML documents using tree partitioning [J]. Tsinghua Science & Technology, 2009,14(1):7-18
<footnote>[7] MARLING C, SQALLI M, RISSLAND E, et al. Case-based reasoning integrations [J]. AI Magazine, 2002,23(1):69-86</footnote>

<footnote>[8] ZHUANG Z Y, CHURILOV L, BURSTEIN F, et al. Combining data mining and case-based reasoning for intelligent decision support for pathology ordering by general practitioners. European Journal of Operational Research, 2009, 195(3):662-675</footnote>

<footnote>[9] Ting S L, WANG W M, KWOK S K, et al. PACER: rule-associated case-base reasoning for supporting general practitioners in prescription making [J]. Expert Systems with Applications, 2010, 37(12):8079-8089</footnote>

<footnote>[10] LIU K F R, YU C W. Integrating case-based and fuzzy reasoning to qualitatively predict risk in an environmental impact assessment review. Environmental Modelling & Software, 2009,24(10):1241-1251</footnote>