人工知能入門

Similar documents
25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

Page 1 of 6 B (The World of Mathematics) November 20, 2006 Final Exam 2006 Division: ID#: Name: 1. p, q, r (Let p, q, r are propositions. ) (10pts) (a

日本内科学会雑誌第97巻第7号

日本内科学会雑誌第98巻第4号

,,,,., C Java,,.,,.,., ,,.,, i

T rank A max{rank Q[R Q, J] t-rank T [R T, C \ J] J C} 2 ([1, p.138, Theorem 4.2.5]) A = ( ) Q rank A = min{ρ(j) γ(j) J J C} C, (5) ρ(j) = rank Q[R Q,

CPP46 UFO Image Analysis File on yucatan091206a By Tree man (on) BLACK MOON (Kinohito KULOTSUKI) CPP46 UFO 画像解析ファイル yucatan091206a / 黒月樹人 Fig.02 Targe

JavaプログラミングⅠ


平成29年度英語力調査結果(中学3年生)の概要

58 10


Ł\”ƒ-2005

,,.,,., II,,,.,,.,.,,,.,,,.,, II i

L3 Japanese (90570) 2008

第90回日本感染症学会学術講演会抄録(I)

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf ("%s", str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i

日本内科学会雑誌第102巻第4号


A5 PDF.pwd

知識工学 II ( 第 2 回 ) 二宮崇 ( ) 論理的エージェント (7 章 ) 論理による推論 命題論理 述語論理 ブール関数 ( 論理回路 )+ 推論 ブール関数 +( 述語 限量子 ( ) 変数 関数 定数 等号 )+ 推論 7.1 知識

PowerPoint プレゼンテーション

平成 29 年度卒業研究 初心者のためのゲームプログラミング用 教材の開発 函館工業高等専門学校生産システム工学科情報コース 5 年 25 番細見政央指導教員東海林智也

メディプロ1 Javaプログラミング補足資料.ppt

Javaの作成の前に

MIDI_IO.book

Microsoft PowerPoint - chap10_OOP.ppt

目次 1. レッスンで使える表現 レッスンでお困りの際に使えるフレーズからレッスンの中でよく使われるフレーズまで 便利な表現をご紹介させていただきます ご活用方法として 講師に伝えたいことが伝わらない場合に下記の通りご利用ください 1 該当の表現を直接講師に伝える 2 該当の英語表現を Skype

137. Tenancy specific information (a) Amount of deposit paid. (insert amount of deposit paid; in the case of a joint tenancy it should be the total am

What s your name? Help me carry the baggage, please. politeness What s your name? Help me carry the baggage, please. iii

16_.....E...._.I.v2006


Cain & Abel


2

Read the following text messages. Study the names carefully. 次のメッセージを読みましょう 名前をしっかり覚えましょう Dear Jenny, Iʼm Kim Garcia. Iʼm your new classmate. These ar

O1-1 O1-2 O1-3 O1-4 O1-5 O1-6

Microsoft Word - PCM TL-Ed.4.4(特定電気用品適合性検査申込のご案内)

プログラム

放射線専門医認定試験(2009・20回)/HOHS‐05(基礎二次)


Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

IPSJ SIG Technical Report Vol.2016-CE-137 No /12/ e β /α α β β / α A judgment method of difficulty of task for a learner using simple


2

はじめに


Microsoft Word - Meta70_Preferences.doc

# let st1 = {name = "Taro Yamada"; id = };; val st1 : student = {name="taro Yamada"; id=123456} { 1 = 1 ;...; n = n } # let string_of_student {n

Web - DAML OIL DAML-S - 三菱電機情報技術総合研究所音声 言語処理技術部今村誠 1. Web 2. セマンティック Web とオントロジ 3. オントロジ記述言語 4. 関連ツールと実験システム 5. 従来技術との差異 6. 今後の課題 1

JAVA入門

II

<31322D899C8CA982D982A95F985F95B65F2E696E6464>

Webサービス本格活用のための設計ポイント

プログラミング基礎I(再)

JOURNAL OF THE JAPANESE ASSOCIATION FOR PETROLEUM TECHNOLOGY VOL. 66, NO. 6 (Nov., 2001) (Received August 10, 2001; accepted November 9, 2001) Alterna

Slides: TimeGraph: GPU Scheduling for Real-Time Multi-Tasking Environments

浜松医科大学紀要

Vol. 12 ( ) Mirifusus Evolution of Radiolarian Mirifusus (Marine Plankton) and Mechanical Optimization of Frame Structure Structual Mechanichal

,

ShikenPASS あなたは認証を取得するのを助ける人気認定試験向け関連勉強資料の提供者 ShikenPASS

学部ゼミ新規申請方法 (Blackboard 9.1) Seminar Application Method for Undergraduate Seminar Courses ゼミ新規申請は Blackboard で受け付けます! 次セメスターにゼミ履修を希望する学生は 下記マニュアルに従ってゼミ


オブジェクト脳のつくり方


24 Depth scaling of binocular stereopsis by observer s own movements


クイックスタートガイド [SC-06D]

1 [1, 2, 3, 4, 5, 8, 9, 10, 12, 15] The Boston Public Schools system, BPS (Deferred Acceptance system, DA) (Top Trading Cycles system, TTC) cf. [13] [

<4D F736F F D208BB38DDE5F F4390B394C52E646F6378>

現代社会文化研究

.N..

WASEDA RILAS JOURNAL

1 1 tf-idf tf-idf i

C. S2 X D. E.. (1) X S1 10 S2 X+S1 3 X+S S1S2 X+S1+S2 X S1 X+S S X+S2 X A. S1 2 a. b. c. d. e. 2

WARNING To reduce the risk of fire or electric shock,do not expose this apparatus to rain or moisture. To avoid electrical shock, do not open the cabi

Transcription:

藤田悟 黄潤和

宣言的知識 is-a 型 has-a 型 論理式を用いた表現 命題論理式 述語論理式 手続的知識 プロダクションルール ( システム )

http://www.amzi.com/expertsystemsinprolog/xsipfrtop.htm 2.1 The Bird Identification System Prolog in JavaScript http://ioctl.org/logic/prolog-latest

様々な用途のための様々な知識表現 意味ネットワーク フレーム スクリプト

様々な知識表現方法 論理式は 真理値を持つ式で知識を表現した プロダクションシステムは IF-THEN のルールで知識を表現した 空間を使って 可視化 構造化した知識を表現できたら 人間が理解しやすい グラフ構造を使って 知識を表現する!! 節点 (node): 概念 枝 (arc): 関係

コンピュータ 計算を実行する データを保存する is-a is-a is-a スーパーコンピュータ 共用する高速に演算する サーバ is-a PC is-a 個人利用する ディスプレイ has-a デスクトップ PC 設置型 ノート PC 一体型軽量 instance instance instance VALUESTAR Lavie dynabook

Social graph は 知り合いの関係をネットワークで表現する ハブ

1. ネコ科の継承関係について意味ネットワークで表現せよ ネコ科の下にはネコ属の他に ヒョウ属があり ヒョウ属の中にはトラやライオンが分類されます ネコ属のイエネコの下には ペルシャ猫 三毛猫.. 2. 机 の周りにある概念を意味ネットワークで表現せよ

表現力 事実 事実間の関係を表現できる 階層構造を持たせると一般 / 特殊の知識を表現できる 有効性 枝に沿った推論が可能 効率性 階層構造により知識を抽象化できる 説明性 わかりやすく 推論が可視化できる

Minsky, 1975 フレームは 対象物の持つ特性や構造を階層的な詳細化手法をもって体系化する 継承構造は 意味ネットワークの is-a 構造の保有関係は 意味ネットワークの has-a 対象物の性質 属性を明確に定義 Java のクラスの概念とマップしやすい

frame 卒業研究担当教員 (slot) 研究テーマ (slot) 研究室 (slot) frame 担当教員教員名 (slot) 教員室 (slot) frame 研究テーマテーマ名 (slot) 研究分野 (slot) frame 研究分野分野名 (slot) 関連研究分野 (slot)

class 卒業研究 { 担当教員 prof; 研究テーマ thema; class 担当教員 { String name; 教員室 room; } class 研究分野 { String name; 研究室 room; } class 研究テーマ { String name; 研究分野 relates; } } 研究分野 domain;

CPU CPU 名 コンピュータ CPU コア数 SSD 型 メモリ メモリサイズ SSD サイズ 外部記憶 周辺機器 外部記憶型 HDD 型 HDD サイズ instance サイズ

class コンピュータ { CPU cpu; class CPU { String name; int cores; } 外部記憶の下位クラスとして作成しても良い メモリ memory; 外部記憶 ext; class メモリ { int size; } 外部記憶 ssd = new 外部記憶 (); ssd. 型 = SSD; ssd.size = 128,000; } 周辺機器 periph; class 外部記憶 { 型 type; int size; } instance 外部記憶 hdd = new 外部記憶 (); hdd. 型 = HDD; hdd.size = 1000000;

CPU メモリ has-a 名前を持つコア数 has-a 一時記憶 コンピュータ is-a 計算を実行するデータを保存する has-a 外部記憶長期記憶 is-a SSD 高速 HDD 低速 大容量

表現力 構造化された知識と手続知識の表現ができる 有効性 スロットの値変化時にイベントを実行できる 効率性 オブジェクト指向言語で効率的に実装できる 説明性 構造 階層関係が明確に定義できる

Schank, 1977 シーンやイベントを理解するには 背景となる文脈の理解が必要になる レストランに行った おいしかった レストランに行く を文字通り 移動行動 と理解すると なぜ おいしかった と続くのか理解できない プログラム演習をした PC の調子がおかしい プログラム演習 の中で 何が必要で 何をするのかを知っていないと なぜ PC が出てくるのか理解できない

レストランに行く 家を出る 移動する 歩く 自動車に乗る 電車に乗る レストランに到着する メニューを選ぶ 前菜を食べる 主菜を食べる 満腹になる レジで料金を払う 移動する 家に帰る このような一連の出来事を知らないと レストランを背景とした文章を理解することはできない

使用条件 : スクリプトを始める前提知識 空腹であるレストランが開店している所持金を持っている 結果 : スクリプトが終了した時の知識 満腹である所持金が減っている プロップ : 出来事に現れる対象物 レストラン 移動手段 前菜 主菜 レジ シーン : 出来事の系列トラック : いくつかの選択肢 歩いていく / 自動車に乗る / 電車に乗るステーキを食べる / お寿司を食べる

使用条件 : 時間に余裕がある お金がある 結果 : お金が減る 満足する ストレスが減る プロップ : 移動手段 宿泊施設 観光地 シーン : 移動する 観光地を訪れる ホテルに泊まる 夕食を食べる 温泉に入る 移動する トラック : 自動車に乗る / 電車に乗る ホテルに泊まる / 旅館に泊まる

物事の状態を知るための情報 論理式表現 意味ネットワーク フレーム 物事を推論するための情報 論理式表現 prolog プロダクションルール 物事の文脈知識を知るための情報 スクリプト

SHRDLU の積み木の世界は 全ての知識を表現 操作可能 closed world = toy problem 自然言語の理解は 幅広い知識が必要 かつ 適用知識を限定する必要がある open world 文脈知識 ( スクリプト ) が必要 フレーム問題 : 問題の対象となる変化する知識と 対象でない変化しない知識を分離して推論する必要がある

目的に合った適切な表現形式を用いる 表現力 : 何が表現できるか 有効性 : どのように利用できるか 効率性 : 無駄なく利用できるか 明確性 : 曖昧性がないか 必要な知識の範囲を限定する 経験としては システム設計時に想定した以上の 一般知識 が必要になる プログラムでの利用イメージを考えて 知識表現形式を検討することも重要

次のスクリプトを作成せよ 期末試験を受ける ショッピングに出かける

教科書 p37 の演習 3 に解答せよ 下記のいずれかの項目を選択して それを推論するのに必要な知識表現 ( 論理式表現 手続的表現 意味ネットワーク フレーム スクリプトなど ) をレポートにまとめよ 風が吹くと 桶屋が儲かる 友達の友達は 皆友達だ ダチョウは 空を飛ぶか

Appendix ( 追加 ) 35

Wumpus world The wumpus world is a grid of squares surrounded by walls, where each square can contain agents and objects. The agent always starts in the lower left corner, a square that we will label [1,1]. The agent s task is to find the gold, return to [1,1] and climb out of the cave. 4 3 2 s w s s g b b p b p b A b g p s Agent Breeze 微風 Gold 金 Pit 穴 Smelly 1 A START b p b w Wumpus 1 2 3 4 36

The knowledge base for Wumpus world problem Percept sentences: there is no stench in the square [1,1] S 1,1 there is no breeze in the square [1,1] B 1,1 there is no stench in the square [2,1] S 2,1 there is breeze in the square [2,1] B 2,1 there is a stench in the square [1,2] S 1,2 there is no breeze in the square [1,2] B 1,2 knowledge sentences: if a square has no smell, then neither the square nor any of its adjacent squares can house a wumpus. R 1 : S 1,1 W 1,1 W 1,2 W 2,1 R 2 : S 2,1 W 1,1 W 2,1 W 2,2 W 3,1 if there is a stench in [1,2], then there must be a wumpus in [1,2] or in one or more of the neighboring squares. R 4 : S 1,2 W 1,3 W 1,2 W 2,2 W 1,1 37

Seven inference rules for propositional Logic Modus Ponens And-Elimination α β, α β α 1 α 2 α n α i And-Introduction Or-Introduction α 1, α 2,, α n α 1 α 2 α n α i α 1 α 2 α n Double-Negation Elimination α α Unit Resolution Logic connectives: α β, β α α β, β γ α γ 38

Inferring knowledge using propositional logic Concerning with the 6 squares, [1,1], [2,1], [1,2], [3,1], [2,2], [1,3], there are 12 symbols, S 1,1, S 2,1, S 1,2, B 1,1, B 2,1, B 1,2, W 1,1, W 1,2, W 2,1, W 2,2, W 3,1, W 1,3 The process of finding a wumpus in [1,3] as follows: 1. Apply R 1 to S 1,1, we obtain W 1,1 W 1,2 W 2,1 2. Apply And-Elimination, we obtain W 1,1 W 1,2 W 2,1 3. Apply R 2 and And-Elimination to S 2,1, we obtain W 1,1 W 2,2 W 2,1 W 3,1 α 1 α 2 α n α i α β, β α R 4 : S 1,2 W 1,3 W 1,2 W 2,2 W 1,1 4. Apply R 4 and the unit resolution to S 1,2, we obtain (α is W 1,3 W 1,2 W 2,2 and β is W 1,1 ) W 1,3 W 1,2 W 2,2 5. Apply the unit resolution again, we obtain (α is W 1,3 W 1,2 and β is W 2,2 ) W 1,3 W 1,2 6. Apply the unit resolution again, we obtain (α is W 1,3 and β is W 1,2 ) W 1,3 Here is the answer: the wumpus is in [1,3]. 39

Knowledge base for the Wumpus world Perception: Stench (variable s), Breeze (variable b), Glitter (variable g), Wall (variable u), Scream (variable v) b, g, u, v, t Percept([S, b, g, u, v], t) Smelly(t) s, g, u, v, t Percept([s, B g, u, v], t) Breeze(t) s, b, u, v, t Percept([s, b, G, u, v], t) AtGoldRoom(t) Reflex: t AtGoldRoom(t) Action(Grab, t) Reflex with internal state: do we have the gold already? t AtGoldRoom(t) Holding( Gold, t) Action(Grab, t) 40

Deducing hidden properties Properties of locations: l, t At(Agent, l, t) Smell(t) Smell(l) l, t At(Agent, l, t) Breeze(t) Breeze(l) Diagnostic rule infer cause from effect e. g. Squares are breezy near a pit y Breeze(y) x Pit(x) (x=y Adjacent(x, y)) Causal rule infer effect from cause x, y Pit(x) (x=y Adjacent(x, y)) Breeze(y)... 41

Wumpus world implementation in Prolog https://archives.limsi.fr/individu/hernandz/resources/software/wumpus/ wumpus.html 42