EXPERT1

버전 1.1.0.0 (8.58 KB) 작성자: Bill Whiten
An easy to use deduction engine useful for small expert systems and embedding complex condition ...
다운로드 수: 1.4K
업데이트 날짜: 2016/3/31

라이선스 보기

An easy to use deduction engine useful for small expert systems and embedding complex condition statements.

Rules are written in a structure (one field for each rule) using a general format easily obtained from "If And Then? rules e.g.
"If bird And ~flies And swims Then penguin" is input as
rules.r1={'~bird' 'flies? '~swims? 'penguin?}
(This is the conjunctive normal form where each term (proposition) in the converted rule is separated by an "or" operator, and each rule by an "and" operator. Any logical conditions can be converted to this form)

Data is entered as a second struct e.g.
data.penguin=false; data.bird=true; data.swims=true

Deduction is done as: results=deduce(rules,data)

Both data and results can be printed e.g.:
printdata(results)

A meaning struct can be created for propositions (in data & results):
info.penguin='The animal is a penguin?; info.bird=?The animal is a bird'
and used with printdata e.g. printdata(data,info)

Rules can be constructed using classical logic, but deduction is done using a two variable logic that includes unknown, partly true, partly false, and if you get it wrong inconsistent, as well as the ordinary true and false. Logic is implemented as "min" for "and" and "max" for "or", which avoids problems with redundant rules and allows efficient simple deductions.

Results give what is known about a proposition as %true and %false. So true is 100% true and 0 %false, while false is 0% true and 100% false. Data can be entered in this format also e.g. data.flies=[50 0].

Deduction is carried out using a more efficient numerical internal format, that can be used in place of the above structs for repeated use of large rule sets e.g.

[r,names]=cnvtrules(rules);
d=cnvtdata(data,names);
d1=deduce(r,d);
results=cnvtd(d1,names)

Let me know if you find this useful, or are interested in getting extensions to it: W.Whiten@uq.edu.au

인용 양식

Bill Whiten (2024). EXPERT1 (https://www.mathworks.com/matlabcentral/fileexchange/9218-expert1), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

License update

1.0.0.0