開発環境
- OS X Lion - Apple(OS)
- Emacs、BBEdit - Bare Bones Software, Inc. (Text Editor)
- Scheme (プログラミング言語)
- MIT/GNU Scheme (処理系)
計算機プログラムの構造と解釈(Gerald Jay Sussman(原著)、Julie Sussman(原著)、Harold Abelson(原著)、和田 英一(翻訳)、ピアソンエデュケーション、原書: Structure and Interpretation of Computer Programs (MIT Electrical Engineering and Computer Science)(SICP))の4(超言語的抽象)、4.4(論理型プログラミング)、4.4.1(推論的情報検索)、データベースの例、単純質問、合成質問、規則、問題 4.57を解いてみる。
その他参考書籍
問題 4.57
規則を定義。
(rule (replace ?person-1 ?person-2) (and (job ?person-1 ?x) (job ?person-2 ?y) (or (can-do-job ?x ?y) (same ?x ?y)) (not (same ?person-1 ?person-2))))
規則を使った質問。
;; a (replace ?person (Fect Cy D)) ;; b (and (replace ?person-1 ?person-2) (salary ?person-1 ?x) (salary ?person-2 ?y) (lisp-value < ?x ?y))
質問システムの実装はまだ(この先に実装もあるみたい)なので、実装できたら入出力結果を確認してみることに。
0 コメント:
コメントを投稿