**3. Problem description and possible solution**

Nowadays, as was previously mentioned, CRC is the second most frequent malignancy in the case of both men and women. The tumor is localized in the rectum, the

farthest portion of the digestive tract, in around one-third of cases. Patients' quality of life is severely impacted by surgical therapy for rectal cancer, which results in dysfunctions that include fecal incontinence, urinary problems, and sexual issues. Increasing the number of sphincter-preserving surgeries was the primary goal of rectal cancer treatment for the past 20 years; today, the focus is on organ preservation strategies.

Neoadjuvant radiotherapy and chemotherapy are used to increase local control and overall survival in around 75–80% of instances for individuals with rectal cancer, making their care complicated. However, only 20–30% of patients who receive neoadjuvant therapy gets a full pathological response; the other 70–80% experiences a poor or ineffective response. How we can anticipate tumor response in people with rectal cancer is the key issue right now.

This variance is assumed to be influenced by the tumor's size, height from the anal margin, depth of invasion, differentiation and, of course, genetic variables such as the KRAS and BRAF mutation. The purpose of this work is to create an expert system to forecast tumor response value following neoadjuvant chemoradiation. A crucial issue is how to define the predict value of the tumor response following neoadjuvant chemoradiation. To assess tumor response using pertinent parameters is the fundamental problem. Using fuzzy rules, we can calculate the tumor response value. A compound index made up of five characteristics, each of which is judged by an expert, makes up the tumor response value following neoadjuvant chemoradiation, abbreviated as R.

The five components are: V—age, LO—localization of tumors, T—infestation rate, N—state of lymph nodes, G—mutation in the genes, and R—predict value of tumor response.

Using the abovementioned parameters, the tumor response value model can be expressed as a set of 21 rules obtained by using fuzzy C-means algorithm:


*…………*

3.*If Age(V) = about 20 and Localization tumor(LO) = about 92 and Infestation rate(T) = about 2 and State of lymph nodes(N) = about 3 and Mutation in the genes(G) = about 1, THEN predict value of tumor response (R) = about 100*

Our goal is to use five parameters represented by fuzzy linguistic terms to describe the level of the tumor response value. Values of linguistic terms are given below as intervals. In addition, they are expressed as fuzzy data in diagrams.

Age (V): Positive [0–40] Medium positive [30–50] Medium negative [40–60] Negative [60–100] Localization of tumors (LO): Negative [0–5] Weak negative [3–8] Medium positive [6–11] Positive [10–15] Infestation rate (T): Early form [0–1] Localized [1 – 2] Early locally developed [2 – 3] Late locally developed [3 – 4] Metastasized [4–4<] Status of lymph nodes (N): Negative [0–2] Medium Positive [1–4] Positive [4–20] Mutation in genes (G): Negative [0–0.5] Positive [0.5–1] TRG (tumor regression grade) (R): Very bad [0–10] Bad [10–20] Sufficient [50–60] Good [70–80] Excellent [90–100]

Graphical representation of these linguistic terms is as shown (**Figures 1**–**6**): From the defined linguistic terms, a knowledge base of interpretable rules is created. For instance:

Rule. *If age is about 35 and localization of tumors is middle positive and infestation rate is middle positive and state of lymph nodes is middle positive and mutation in the genes is positive,THEN predict value of tumor response is bad.*

ESPLAN shell is used for creating an expert system for rectal cancer. Below, the computer simulation is discussed.

**Computer simulation**. ESPLAN shell has the following modules: the module that manages all the procedure of the system; read-in and interpretation of knowledge; inference; explanation generator; knowledge base and work are service; environment interface; user interface. ESPLAN shell is realized using Prolog Artificial Intelligence language. There are functional constructions that Prolog predicates in this system. This possibility of system gives it a chance for including new functions to the program.

Representation objects and linguistic terms by using ESPLAN are given in **Figure 7**.

For example: Parameters about 50 are represented as: *about K: (D, K,1.1\*K,*

*D) = about 50:(D = 7.5, K = 47.5, 1.1 K = 52.5, D = 7.5).*

Given linguistic terms are used in ESPLAN system: much: (D, F – D, F, 0); more than a: (D, K + D, F, 0); about K: (D, K,1.1\*K, D); neutral: (D, M + 2 \* D, M + 3\*D, D); less than K: (0, M, K – D, D).

*Fuzzy Expert System for Rectal Cancer Based on Possibility Measure DOI: http://dx.doi.org/10.5772/intechopen.109405*

**Figure 1.** *Linguistic terms for Predict value of tumor response(R).*

**Figure 2.** *Linguistic terms for Age(V).*

**Figure 3.** *Linguistic terms for Localization of tumors(LO).*

**Figure 4.** *Linguistic terms for Infestation rate(T).*

*Fuzzy Expert System for Rectal Cancer Based on Possibility Measure DOI: http://dx.doi.org/10.5772/intechopen.109405*

**Figure 5.**

*Linguistic terms for State of Lymph nodes(N).*

**Figure 6.** *Linguistic terms for Mutation in genes(G).*


**Figure 7.** *Values of parameters for tumor response.*

Here, minimum value is M, and the maximum value of the universe is F; D = (F-M)/5.

Demonstration of the rule is given below (**Figure 8**):

Fragment of the knowledge translation process is represented in **Figure 9**, and Fuzzy inference process is in **Figures 10**–**13**.

For instance, object= "localization of tumors",


**Figure 8.** *Representation of the rule.* *Fuzzy Expert System for Rectal Cancer Based on Possibility Measure DOI: http://dx.doi.org/10.5772/intechopen.109405*

#### **Figure 9.** *Knowledge translation process.*

M = minimum = 0, F = maximum = 15,

linguistic term = "about 5": About 5 = (D, M + 2\*D, M + 3\*D, D)

The abovementioned model is created using knowledge representation language and implemented in ESPLAN shell. Results of the performed test are:

*Test 1: If age = about 38 and localization of tumors = about 4 and infestation rate = about 2 and state of lymph nodes = abou11 and mutation in the genes = about 0, THEN predict value of tumor response =?*

**Figure 10.** *Fuzzy inference process (1).*

#### *Artificial Intelligence in Medicine and Surgery – An Exploration of Current Trends, Potential…*

#### **Figure 11.**

*Fuzzy inference process (2).*

**Figure 12.**

*Fuzzy inference result.*

Result: predict value of tumor response is from 0 to 2.

The results of tests are shown in **Figures 12** and **13**.

Test 2: *Test 1: If age = middle positive and localization of tumors = weak negative and infestation rate = middle positive and state of lymph nodes = positive and mutation in the genes = negative,THEN predict value of tumor response =?*

*Fuzzy Expert System for Rectal Cancer Based on Possibility Measure DOI: http://dx.doi.org/10.5772/intechopen.109405*


**Figure 13.** *Fragment of results.*

**Figure 14.** *Linguistic terms of tumor response.*

FOR TEST 2. ANSWER:

*predict value of tumor response =? very good.*

Representation of linguistic terms of tumor response is given in **Figure 14**.

Knowledge base is realized using possibility measure-based algorithm in ESPLAN. In this system, fuzzy logic theory is used in demonstration and operation of the linguistic terms. After fulfilling of the knowledge base of the system by adding values of several objects (for example, age is about 50), searching the solution in knowledge base is done by logical inference procedure.

There is the following opportunity of the ESPLAN shell: creating an expert system for several applications, relation with applied software package, explanation of the advices, demonstration of the results, interface with user, and so on.

The advantages of the created expert system are: working with linguistic values; possibility measure-based reasoning; realization of composition rule of inference, including knowledge base as dialog; storing knowledge about different areas in the knowledge base of the system; setting of a confidence degree for any rule (in percentage); application of external programs; and data interchange by using a file system.
