智慧型代理人
代理人的性能
代理人的性能依 agency, intelligence, 和 mobility 三個維度描述:
- agency 指具有 autonomy 和 authority 的程度。
- intelligence 是推理和學習能力的程度。
- mobility 是代理人能在網路上移動的程度。
JessAgent的行為
JessAgent 採用 BasicJessBehaviour 行為 (繼承 CyclicBehaviour 行為),
JADE 所附 JessAgent 的原始程式如下:
此 agent 固定使用 jadeAgent.clp
每次收到 ACL 信文, 即在 JESS assert 一項 fact。
JessAgent 的行為在 jadeAgent.clp 檔規定。
假如在建造代理人時, 允許載入不同的 clips 檔案, 則可以具備不同的行為。
例如.
PAgent.java.
建造一代理人:
- 在 RMA 視窗的 DF 區域, 選擇 Main-Container,
- 在功能列, 選擇 Actions -> Start New Agent, 跳出另一 "Insert Start Parameters" 小視窗,
- 填上 Agent Name, Class Name, 和 Arguments
- 按下 OK 按鈕即可
注意: 代理人 PAgent 的行為是由參數規定, 此例為 hello.clp
Reference:
JADE with Jess Behavior
(local)
JessAgent的信文接送
ACLMessage 使用下列 template 界定:
(deftemplate ACLMessage
(slot communicative-act) (slot sender) (multislot receiver)
(slot reply-with) (slot in-reply-to) (slot envelope)
(slot conversation-id) (slot protocol)
(slot language) (slot ontology) (slot content)
(slot encoding) (multislot reply-to) (slot reply-by))
假設 JADE3.2 平台已在 210.70.83.101 上運轉, 則在不同機器的容器中(但使用同一平台)建造一代理人 TalkAgent,
可用:
runjade -gui -host 210.70.83.101 -container talk:examples.messages.TalkAgent
JessAgent Examples
To run:
runjade -gui -host 210.70.83.101 -container hello:examples.jess.P2Agent hello.clp
"hello" 可分別用下列名稱替代:
- hello
- echo
- ping
- chat
- blocks
Up TOC