Jess
JessはJavaプラットフォーム向けのルールエンジンである。CLIPSプログラミング言語の上位互換であり、サンディア国立研究所の Ernest Friedman-Hill が開発した。1995年末ごろ最初の版が完成した。
エキスパートシステム開発自動化に適したルールベースのプログラミング言語であり、しばしば「エキスパートシステム・シェル」と呼ばれる。近年、知的エージェントと呼ばれるシステムも開発されているが、それと同様の機能を持つ。
Jess は手続き型パラダイムではなく宣言型パラダイムであり、「パターンマッチング」と呼ばれる処理によって規則群を事実群に適用する。規則は事実群に変更を加えたり、何らかの Java コードを実行したりする。
Jess は、宣言型規則の形で知識を使って結論や推論を導くタイプの Java のアプレットやアプリケーションを構築するのに使える。多くの規則が多くの入力にマッチするが、効果的な汎用マッチングアルゴリズムは少ない。JessのルールエンジンはReteアルゴリズムを使用している。
なお、オープンソースではない。
記事
JessはJavaプラットフォーム向けのルールエンジンである。CLIPSプログラミング言語の上位互換であり、サンディア国立研究所の Ernest Friedman-Hill が開発した。1995年末ごろ最初の版が完成した。
エキスパートシステム開発自動化に適したルールベースのプログラミング言語であり、しばしば「エキスパートシステム・シェル」と呼ばれる。近年、知的エージェントと呼ばれるシステムも開発されているが、それと同様の機能を持つ。
Jess は手続き型パラダイムではなく宣言型パラダイムであり、「パターンマッチング」と呼ばれる処理によって規則群を事実群に適用する。規則は事実群に変更を加えたり、何らかの Java コードを実行したりする。
Jess は、宣言型規則の形で知識を使って結論や推論を導くタイプの Java のアプレットやアプリケーションを構築するのに使える。多くの規則が多くの入力にマッチするが、効果的な汎用マッチングアルゴリズムは少ない。JessのルールエンジンはReteアルゴリズムを使用している。
なお、オープンソースではない。
== コード例 ==
; これはコメント
(bind ?x 100)
; x = 100
(deffunction max (?a ?b)
(if (> ?a ?b) then ?a else ?b))
(deffacts myroom
(furniture chair)
(furniture table)
(furniture bed)
)
(deftemplate car
(slot color)
(slot mileage)
(slot value)
)
(assert (car (color red) (mileage 10000) (value 400)))
(clear)
(deftemplate blood-donor (slot name) (slot type))
(deffacts blood-bank ; 名前と血液型をワーキングメモリに置く
(blood-donor (name "Alice")(type "A"))
(blood-donor (name "Agatha")(type "A"))
(blood-donor (name "Bob")(type "B"))
(blood-donor (name "Barbara")(type "B"))
(blood-donor (name "Jess")(type "AB"))
(blood-donor (name "Karen")(type "AB"))
(blood-donor (name "Onan")(type "O"))
(blood-donor (name "Osbert")(type "O"))
)
(defrule can-give-to-same-type-but-not-self ; A>A, B>B, O>O, AB>AB をカバー。ただし同一人による輸血は不可
(blood-donor (name ?name)(type ?type))
(blood-donor (name ?name2)(type ?type2 &:(eq ?type ?type2) &: (neq ?name ?name2) ))
=>
(printout t ?name " can give blood to " ?name2 crlf)
)
(defrule O-gives-to-others-but-not-itself ; O型からO型は上の規則でカバー
(blood-donor (name ?name)(type ?type &:(eq ?type "O")))
(blood-donor (name ?name2)(type ?type2 &: (neq ?type ?type2) &: (neq ?name ?name2) ))
=>
(printout t ?name " can give blood to " ?name2 crlf)
)
(defrule A-or-B-gives-to-AB ; O型からAB型、AB型からAB型は既にカバーされている
(blood-donor (name ?name)(type ?type &:(or (eq ?type "A") (eq ?type "B" ))))
(blood-donor (name ?name2)(type ?type2 &: (eq ?type2 "AB") &: (neq ?name ?name2) ))
=>
(printout t ?name " can give blood to " ?name2 crlf)
)
;(watch all)
(reset)
(run)
== 書籍 ==
Jess in Action - ISBN 1-930110-89-8
== 外部リンク ==
Official Website(英語)
出典: Wikipedia
プロット
Silas Croft was a kindly old Englishman who had a farm in South Africa. With him resided his two nieces, whom he had taken from their drunken, worthless father when they were of a tender age. Jess, the elder, was brilliant and educated; Bess, the younger was beautiful, but frankly admitted that she did not possess the mental attainments of Jess. The two were great friends, and Jess, although the senior by only three years, had almost a motherly affection for her pretty little sister. Croft, finding old age stealing upon him, advertised for a partner, stipulating that he must be a gentleman. Probably it was his secret idea that the right man might come along, and fall in love with his favorite, beautiful Bessie.
キャスト
| 俳優 | 役割 |
|---|---|
| Marguerite Snow | Jess |
| Florence La Badie | Jess's Sister, Bess |
| James Cruze | Captain John Neil |
| William Russell | Frank Muller, the Treacherous Boer |
| William Garwood | The Lawyer |
| Jean Darnell | The Doctor's Sister |
| Harry Marks | |
| Harry Spear |
乗組員
| 役割 | 名前 |
|---|---|
| Director | George Nichols |
| Story | H. Rider Haggard |