1 / 21

인터넷 환경의 지식시스템 제 7 장 정방향추론 시스템 구축 도구

인터넷 환경의 지식시스템 제 7 장 정방향추론 시스템 구축 도구. 정방향 추론용 전문가시스템 구조. 작업메모리. 규칙베이스. 매칭. 수행. 상충집합. 수행집합. Yes. 메타규칙. 상충집합 = . 멈춤. No. 사용자선택. 상충해소. 기본전략. UNIK-FWD Syntax. (FWD-RULE rule-name “ 설명문 ” [RULE-GROUP group-name] [<meta-slot1> <meta-slot-value1>]

micah
Télécharger la présentation

인터넷 환경의 지식시스템 제 7 장 정방향추론 시스템 구축 도구

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 인터넷 환경의 지식시스템제 7 장 정방향추론 시스템 구축 도구

  2. 정방향 추론용 전문가시스템 구조 작업메모리 규칙베이스 매칭 수행 상충집합 수행집합 Yes 메타규칙 상충집합 =  멈춤 No 사용자선택 상충해소 기본전략

  3. UNIK-FWD Syntax (FWD-RULE rule-name “설명문” [RULE-GROUP group-name] [<meta-slot1> <meta-slot-value1>] [<meta-slot2> <meta-slot-value2>] … [<meta-slotn> <meta-slot-valuen>] IF (<class1> ^slot1 <slot-value-pattern1> ^slot2 <slot-value-pattern2> … ^slotn <slot-value-patternn>) (<class2> ^slot1 <slot-value-pattern1> ^slot2 <slot-value-pattern2> … ^slotn <slot-value-patternn>) … (<classn> ^slot1 <slot-value-pattern1> ^slot2 <slot-value-pattern2> … ^slotn <slot-value-patternn>) THEN (any-UNIK-command) … )

  4. UNIK-FWD: 조건문 • 상수 (예) (MACHINE ^frame-name ‘mc-2 ^end-time 30)

  5. UNIK-FWD: 조건문 • 변수 (예) (FWD-RULE Find-machines IF (MACHINE ^frame-name <machine> ^end-time > 10 ^status ‘working) THEN (new-value <machine> ‘status ‘ready-for-scheduling))

  6. UNIK-FWD: 조건문 • 관계연산자 • >, >=, <, <=, =, <> (예) (MACHINE ^frame-name <mc> ^end-time <> 30)

  7. UNIK-FWD: 조건문 • UNIK 도구 함수(명령어) (예) (MACHINE ^frame-name ‘mc-2 ^end-time (my-unik-function ‘arg1 ‘arg2))

  8. UNIK-FWD: 조건문 • OR (예) (MACHINE ^frame-name <mc> ^status << ‘working ‘ready >> ) • AND (예) (MACHINE ^frame-name <mc> ^end-time { > 100 < 200 })

  9. UNIK-FWD: 조건문 • 부정문(Negation) (예) (FWD-RULE find-mc-with-minimum-end-time IF (MACHINE ^frame-name <mc> ^end-time <min-end-time> ^status ‘waiting) -(MACHINE ^end-time < <min-end-time>) THEN (new-value <mc> ‘status ‘ready))

  10. UNIK-FWD Meta-Rule Syntax (FWD-META-RULE meta-rule-name “설명문” IF (RULE ^name <name> ^slot1 <slot-value-pattern1> ^slot2 <slot-value-pattern2> … ^slotn <slot-value-patternn>) THEN (FIRE <name>))

  11. UNIK-FWD Meta-Rule (FWD-RULE r1 [machine-type 2-cam] IF (MACHINE ^frame-name <mc> ^status ’working) THEN (new-value <mc> ’status ’ready-for-scheduling)) (FWD-RULE r2 [machine-type 4-cam] IF (MACHINE ^frame-name <mc> ^status ’working) THEN (new-value <mc> ’status ’ready-for-scheduling)) (FWD-META-RULE meta-1 IF (RULE ^name <name> ^machine-type ’4-cam) THEN (FIRE <name>)) (FWD-META-RULE meta-2 IF (RULE ^name <name> ^machine-type ’2-cam) THEN (FIRE <name>))

  12. 추론 과정: 규칙베이스 (FWD-RULE r1 IF (MACHINE ^frame-name <mc> ^status ’working) THEN (new-value <mc> ’status ’ready)) (FWD-RULE r2 IF (MACHINE ^frame-name <mc> ^status ’ready) (ORDER ^frame-name <order> ^status ’arrived) THEN (new-value <order> ’status ’find-materials)) (FWD-RULE r3 IF (ORDER ^frame-name <order> ^has-materials <material> ^status ’find-materials) (MATERIAL ^frame-name <material> ^status ’stock-in) THEN (new-value <order> ’status ’to-be-scheduled))

  13. 추론 과정: 초기 작업메모리 (MACHINE (frame-name machine-1) (status working)) (ORDER (frame-name order-1) (has-materials material-1) (status arrived)) (MATERIAL (frame-name material-1) (status stock-in))

  14. 추론 과정: 초기 상충집합 r1::machine-1

  15. 추론 과정: 변경된 작업메모리 (MACHINE (frame-name machine-1) (status ready))  변경된 부분 (ORDER (frame-name order-1) (has-materials material-1) (status arrived)) (MATERIAL (frame-name material-1) (status stock-in))

  16. 추론 과정: 두 번째 상충집합 r2::machine-1, order-1

  17. 추론 과정: 변경된 작업메모리 (MACHINE (frame-name machine-1) (status ready)) (ORDER (frame-name order-1) (has-materials material-1) (status find-materials))  변경된 부분 (MATERIAL (frame-name material-1) (status stock-in))

  18. 상충 해소 전략 • 반복 수행 금지 • 메타 규칙 • 사용자에 의한 해결 • 기본 상충 해소 전략 • LEX • MEA

  19. Robot 예제 (1) (DEFRAMED 스위치 (IS-A p-스위치) (at 문) (status 꺼짐)) (DEFRAMED 상자 (IS-A p-상자) (at 창문)) (DEFRAMED 로보트 (IS-A p-로보트) (at 벽장) (on 선반)) (fwd-make-wm p-스위치 at status) (fwd-make-wm p-상자 at) (fwd-make-wm p-로보트 at on) (FWD-RULE success IF (p-로보트 ^on '상자) (p-스위치 ^at <X>) (p-상자 ^at <X>) (p-스위치 ^status '꺼짐) THEN (MessageBox '"스위치를 켭니다." 'Robot 0) (new-value '스위치 'status '켜짐))

  20. Robot 예제 (2) (FWD-RULE climb-down IF (p-로보트 ^on { <X> (not (equal <> '마루)) } ) (p-스위치 ^at <Y>) (p-로보트 ^at (not (equal <> <Y>))) THEN (MessageBox (list <X> '"으로부터 내려옵니다.") 'Robot 0) (new-value '로보트 'on '마루)) (FWD-RULE push-box IF (p-로보트 ^at <X>) (p-로보트 ^on '마루) (p-상자 ^at <X>) (p-스위치 ^at { <Y> (not (equal <> <X>)) } ) THEN (MessageBox (list '"상자를 " <Y> '"까지 밀고 갑니다.") 'Robot 0) (new-value '로보트 'at <Y>) (new-value '상자 'at <Y>)) (FWD-RULE move-to-box IF (p-로보트 ^on '마루) (p-로보트 ^at <X>) (p-스위치 ^at <Y>) (p-상자 ^at { <Z> (not (equal <> <X>)) (not (equal <> <Y>)) } ) THEN (MessageBox (list <X> '"으로부터 " <Z> '"까지 갑니다.") 'Robot 0) (new-value '로보트 'at <Z>)) (FWD-RULE climb-on IF (p-로보트 ^at <X>) (p-상자 ^at <X>) (p-스위치 ^at <X>) (p-로보트 ^on '마루) THEN (MessageBox '"상자 위에 올라갑니다." 'Robot 0) (new-value '로보트 'on '상자))

  21. 연습문제 • 정방향추론 알고리즘을 그리고, 수행 과정을 간단히 설명하시오. • Negation의 의미를 설명하시오.

More Related