Разработка экспертной системы

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

q ?season 2) (eq ?ball 2)))

(send [getsport] put-score (+ (send [getsport] get-score) 4))

)

(if (and (and (eq ?type 1) (eq ?sex 2)) (and (eq ?season 1) (eq ?skates 2)))

(send [getsport] put-score (+ (send [getsport] get-) 5))

 

)

(if (and (and (eq ?type 2) (eq ?dance 1)) (and (eq ?season 1) (eq ?skates 1)))

(send [getsport] put-score (+ (send [getsport] get-score) 6))

)

(if (and (and (eq ?type 2) (eq ?dance 2)) (and (eq ?season 1) (eq ?skates 1)))

(send [getsport] put-score (+ (send [getsport] get-score) 7))

)

(if (and (and (eq ?type 2) (eq ?shoot 1)) (and (eq ?season 1) (eq ?skates 2)))

(send [getsport] put-score (+ (send [getsport] get-score) 8))

)

(if (and (and (eq ?type 2) (eq ?shoot 2)) (and (eq ?season 1) (eq ?skates 2)))

(send [getsport] put-score (+ (send [getsport] get-score) 9))

)

(if (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 1) (eq ?swim 1)))

(send [getsport] put-score (+ (send [getsport] get-score) 10))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 1) (eq ?swim 2))) (eq ?sport 1))

(send [getsport] put-score (+ (send [getsport] get-score) 11))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 1) (eq ?swim 2))) (eq ?sport 2))

(send [getsport] put-score (+ (send [getsport] get-score) 12))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 1) (eq ?swim 2))) (eq ?sport 3))

(send [getsport] put-score (+ (send [getsport] get-score) 13))

)

(if (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 2) (and (eq ?swim 1) (eq ?type_swim 1))))

(send [getsport] put-score (+ (send [getsport] get-score) 14))

)

(if (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 2) (and (eq ?swim 1) (eq ?type_swim 2))))

(send [getsport] put-score (+ (send [getsport] get-score) 15))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 2) (and (eq ?swim 2) (eq ?type_gim 1)))) (eq ?sport 1))

(send [getsport] put-score (+ (send [getsport] get-score) 16))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 2) (and (eq ?swim 2) (eq ?type_gim 2)))) (eq ?sport 1))

(send [getsport] put-score (+ (send [getsport] get-score) 17))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 2) (eq ?swim 2))) (eq ?sport 2))

(send [getsport] put-score (+ (send [getsport] get-score) 18))

)

(if (and (and (and (eq ?type 2) (eq ?season 2)) (and (eq ?sex 2) (eq ?swim 2))) (eq ?sport 3))

(send [getsport] put-score (+ (send [getsport] get-score) 19))

)

(if (and (and (eq ?type 1) (eq ?season 2)) (eq ?swim 1))

(send [getsport] put-score (+ (send [getsport] get-score) 20))

)

(send [getsport] get-score)

)

Файл index.php:

<?php(Content-Type: text/html; charset=utf-8);

$title = Экспертная система;_clear();_load(expert.clp);(isset($_POST[type],$_POST[sex],$_POST[season],$_POST[skates],$_POST[swim],$_POST[sport],$_POST[shoot],$_POST[dance],$_POST[ball],$_POST[type_gim],$_POST[type_swim])) {

$sport = clips_function_call(getsport,$_POST[type]. .$_POST[sex]. .$_POST[season]. .$_POST[skates]. .$_POST[swim]. .$_POST[sport]. .$_POST[shoot]. .$_POST[dance]. .$_POST[ball]. .$_POST[type_gim]. .$_POST[type_swim]);

}else {

$sport = NULL;

}($sport != NULL) {(views/results.php);

$content = $result;

$title = Результат теста;

}else {

$content = file_get_contents(views/questions.php);

}(views/main.php);

Файл views/main.php:

">

Файл views/questions.php:

">

Ваш пол:

Женский

Какие виды спорта вы предпочитаете?

В какое время года вы хотите заниматься спортом?

Летом

Вы любите кататься на коньках?

Нет

Вы любите плавать?

Нет

Что вы предпочитаете?

Тяжелый спорт

Вы любите стрелять?

Вы любите танцевать?

Вы играть с мячом?

Вам нравятся упражнения с мячом, лентами и прочее?

Нет

Вам нравится плавать под музыку?

<input type="radio" name="type_swim" value