ITV0060 lab 2 new example
Allikas: Lambda
% clear automatic strategy selection clear(auto). % use capital letters (A,X,T,...) as vars set(prolog_style_variables). % select the search strategy set(hyper_res). set(factor). set(para_into). set(para_from). % select sensible amount of output % clear(print_given). set(print_kept). % this is important: prints all generated and kept clauses assign(stats_level, 0). % just make it stop after N secs assign(max_seconds, 10). formula_list(sos). sona(jaan,jooks,"0.5"). sona(jaan,ujumine,"0.1"). sona(jaan,voistlus,"0.7"). sona(jaan,tehnikaylikool,"0.7"). all X all Y all Z (sona(X,jooks,Z) -> huvi(X,sport,$FPROD(Z,"0.8"))). all X all Y all Z (sona(X,ujumine,Z) -> huvi(X,sport,$FPROD(Z,"0.6"))). all X all Y all Z (sona(X,voistlus,Z) -> huvi(X,sport,$FPROD(Z,"0.9"))). all X all Y all Z (sona(X,tehnikaylikool,Z) -> korgharidus(X,$FPROD(Z,"0.6"))). all X all Y all Z all W (sona(X,jooks,Z) & sona(X,voistlus,W) & $FLT("0.4",Z) -> huvi(X,sport,"1.0")). all X all Y all Z all U (huvi(X,sport,Z) & $FLT("0.8",Z) & korgharidus(X,U) -> ylekeskmraha(X,$FPROD($FPROD(Z,"0.9"),U))). end_of_list.