Presentation is loading. Please wait.

Presentation is loading. Please wait.

Temperature Manager System

Similar presentations


Presentation on theme: "Temperature Manager System"— Presentation transcript:

1 Temperature Manager System
Agent System Temperature Manager System 인공지능 특론1

2 Temperature Manager System
Agent System 28° Rule Fact 22° Inference Engine Window (Open / Closed) Air conditioner (On / Off) Thermometer (Temperature) Fact( (?Window) (?Airconditioner) (?Temperature) )

3 시나리오 창문과 에어컨으로 온도를 조절하는 방 1. 문이 열리면 온도가 1도씩 상승한다
2. 에어컨이 작동하면 1도씩 온도가 감소한다 3. 에어컨은 온도가 27도 이상일 때 작동한다 4. 창문은 온도가 22도 이하일 때 열린다 5. 방안은 22도에서 28도 사이를 유지한다.

4 Temperature Manager System 규칙 #1
(clear) (reset) (bind ?*CUR_temperature* 27) (bind ?*SLEEP_TIME* 500) (deftemplate curEnv (slot temperature) (slot window) (slot aircon) )

5 Temperature Manager System 규칙 #2
(assert (curEnv (temperature ?*CUR_temperature*) (window closed) (aircon on))) (run) (facts)

6 Temperature Manager System 규칙 #3
(curEnv (temperature 27) (window closed) (aircon on)) Before (defrule temperatureDown ?env <- (curEnv (window closed) (aircon on)(temperature ?t&:(> ?t 22))) => (modify ?env (temperature (- ?t 1))) (printout t (- ?t 1) crlf) (call Thread sleep ?*SLEEP_TIME*) ) Window closed, Aircon on, Temperature > 22 Temperature - 1 (curEnv (temperature 26) (window closed) (aircon on)) After

7 Temperature Manager System 규칙 #4
(curEnv (temperature 22) (window closed) (aircon on)) Before (defrule openWindowAirconOff ?env <- (curEnv (window closed)(aircon on)(temperature ?t&:(< ?t 23))) => (modify ?env (window open)(aircon off)(temperature ?t)) (printout t "Open Window & Aircon Off" crlf) ) Window closed, Aircon on, Temperature < 23 Window Open, Aircon Off (curEnv (temperature 22) (window open) (aircon off)) After

8 Temperature Manager System 규칙 #5
(curEnv (temperature 22) (window open) (aircon off)) Before (defrule temperatureRise ?env <- (curEnv (window open) (aircon off) (temperature ?t&:(< ?t 28))) => (modify ?env (temperature (+ ?t 1))) (printout t (+ ?t 1) crlf) (call Thread sleep ?*SLEEP_TIME*) ) Window open, Aircon of, Temperature < 29 Temperature + 1 (curEnv (temperature 23) (window open) (aircon off)) After

9 Temperature Manager System 규칙 #6
(curEnv (temperature 27) (window open) (aircon off)) Before (defrule closeWindowAirconOn ?env <- (curEnv (window open)(aircon off)(temperature ?t&:(> ?t 26))) => (modify ?env (window closed)(aircon on)(temperature ?t)) (printout t "Close Window & Aircon On" crlf) ) Window Open, Aircon off, Temperature > 26 Window Closed, Aircon On (curEnv (temperature 27) (window closed) (aircon on)) After


Download ppt "Temperature Manager System"

Similar presentations


Ads by Google