三、後向鏈非確定性推理現實世界中,事物往往不是非此即彼的簡單邏輯關係,而是與專家的經驗直覺相關的非確定性關係。以下,介紹一個後向鏈非確定性推理的專家系統,Clam,它有自己獨特的規則格式和推理機。(一)信賴度(Certainty Factors)
處理非確定性問題的最常用的辦法,是給系統中的每條資訊加上信賴度。推理機自動更新維護信賴度,並將其作為推理產生的結果。Clam 的一個用例:信賴度(cf)取值-100(全假)至+100(全真)。以下是Clam中的小型知識庫,用於診斷汽車為何不點火啟動。它描述了處理非確定性一些方法。goal problem.rule 1if not turn_over and battery_badthen problem is battery.rule 2if lights_weakthen battery_bad cf 50.rule 3if radio_weakthen battery_bad cf 50.rule 4if turn_over and smell_gasthen problem is flooded cf 80.rule 5if turn_over and gas_gauge is emptythen problem is out_of_gas cf 90.rule 6if turn_over and gas_gauge is lowthen problem is out_of_gas cf 30.ask turn_overmenu (yes no)prompt 'Does the engine turn over?'.ask lights_weakmenu (yes no)prompt 'Are the lights weak?'.ask radio_weakmenu (yes no)prompt 'Is the radio weak?'.ask smell_gasmenu (yes no)prompt 'Do you smell gas?'.ask gas_gaugemenu (empty low full)prompt 'What does the gas gauge say?'.非確定性規則以下是使用者與汽車專家系統的諮詢對話:consult, restart, load, list, trace, how, exit:consultDoes the engine turn over?: yesDo you smell gas?: yesWhat does the gas gauge say?emptylowfull: emptyproblem-out_of_gas-cf-90problem-flooded-cf-80done with problem注意,這個推理機不像Prolog那樣只管找出一個答案,而是找出全部合理答案,並且報告答案的可信程度。可見,信賴度不是機率值,而是簡單地對各個答案的可信性給出一個權重。使用者定義的信賴度,可以置入系統::consultDoes the engine turn over?: yesDo you smell gas?: yes cf 50What does the gas gauge say?emptylowfull: emptyproblem-out_of_gas-cfproblem-flooded-cf-40-90done with problem複合信賴度::consultDoes the engine turn over?: noAre the lights weak?: yesIs the radio weak?: yesproblem-battery-cf-75done with problem該例以2條規則,確定“電池缺電”的信賴度是75。信賴度的用途範圍:● 結論不確定的規則;● 前提不確定的規則;● 使用者輸入的不確定資料;● 前提和結論都不確定的規則;● 用不確定的資訊,更新黑板中的不確定資料;● 將已知的前提設為不確定。(二)MYCIN的信賴度