You are on page 1of 265

1

1.

Images : google.com, movie posters

1.
(, intelligence)
,

(, Artificial Intelligence)

(Turing test)
(operational definition)
:

(TuringAward)
ACM .
$250,000 (Intel, Goolge ) Image : wikipedia

2

(Artificial Intelligence)
Dartmouth Conference (1956, Dartmouth University, USA)
John McCarthy AI

(19272011)

AI@50 conference (2005) : Trenchard More, John McCarthy, Marvin Minsky,


Oliver Selfridge, Ray Solomonoff

Image : www.dartmouth.edu, wikipedia


(, Artificial Intelligence)
, , ,
(Bellman, 1978)

(Rich & Knight, 1991)
(Kurzweil, 1990)
(Poole et al. 1998)
, ,
(Wilson, 1992)
(Nisson, 1990)

3

(strong AI)


, , , , , (self-awareness),
(sentiment), (sapience), (conscience)

(weak AI, narrow AI)





(Chinese room thought experiment)


(The Chinese Room Thought Experiment)
John Searle (1980)




(1932-)


(intelligent)

Image : wikipedia, http://www.mind.ilstu.edu/curriculum/searle_chinese_room/searle_chinese_room.php

4
2.
1960
1946 , ENIAC
,
LISP (McCarthy, 1958)
Advice Taker (axiom) (McCarthy)
Perceptron (Rosenblatt, 1958)
- (means-ends analysis) (Newell & Simon, 1958)
GPS(General Problem Solver)

Allen Newell Herbert Simon


Frank Rosenblatt
(1927-1992) (1927-1992)
(19281971)
, , 1978

Image : wikipedia


- (means-ends analysis)
(state)
(goal state)
(operator, )

5

- (means-ends analysis) cont.
.

Source: udacity


1970 1980

(expert system)

1970 1980
MYCIN, PROSPECTOR, DENDRAL
(expert system shell)
Prolog
(logic)

6


MYCIN

PROSPECTOR

DENDRAL

Edward Feigenbaum


1980 1990

(multi-layer Perceptron, MLP) :
(error backpropagation)

(fuzzy theory)
: ,

(Bayesian network)
(Markov random field)
(Support Vector Machine, SVM)

7

2000
(agent)
(semantic web)
(machine learning)
(data mining)
(deep learning, )


Siri, Now, MS Cortana
IBM Watson
: Boston Dynamics BigDog, Atlas



Eugene Goostman
13 (chatbot)
60
(2014.6)
30 5 : 33%

8

(AlphaGo)
DeepMind
2016.3.9~3.15 5 4 1

( : TV)

3.
(search)
(space) ,


(breadth-first search), (depth-first
search)

A*

mini-max , - (pruning),

9

(knowledge representation)

IF-THEN (rule)
(frame)
(semantic net)
(logic) : (propositional logic), (predicate logic)

: RDF, OWL
: , ,


(inference)


(forward inference)
(backward inference)


(Bayesian theorem)
(marginalization)
,

10

(machine learning)
(task)



, ,

(supervised learning)
() () ,

97+16
1+2 = 3
4+8 = 12
10+13 = 24

23+52 = 75

43+101 =144
14+31 = 45
123+15 = 138
113


(machine learning) cont.
(unsupervised learning)

11

(machine learning) cont.
(reinforcement learning)

(expected reward)
(policy)

(policy)

Image source : RMI MUNOS


RAPPORT ANNUEL INRIA 2008


(planning)



http://www.youtube.com/watch?v=1u4PR-pfghU Image : spir.al, gamma.cs.unc.edu

12

(agent)

BDI(Belief-Desire-Intention)
Belief ( ), Desire(), Intention(,
)

(software agent)
(chatting bot) : Siri, Tay

(physical agent)
(robot)

4.
(knowledge-based system)
,
(expert system)


, ,

13

(natural language processing)

: () + () + ()

, , ,
, ,
,


(data mining)
, ,


,



(visualization)
www.businessnewsdaily.com

14



university


(computer vision)

http://www.cis.upenn.edu/~jshi/ http://www.alternet.org/ http://www.cs.tau.ac.il/~wolf/OR2/

15

(intelligent robots)
(robotics)
, ,
,

Image : http://www.dailymail.co.uk/

5.

Siri Now

(voice recognition)
(natural language processing)
(information retrieval)
(recommendation)
hey Siri

16

cont.
Echo
(hands-free)
Alexa
, , ,

Cortana
MS
,

Viv
Siri Dag Kittlaus Adam Cheyer 2016.5
, ,


IBM (Watson)

, , ,

(unstructured data)

Jeopardy!

, ,
(2016)

17

(Driverless Car)


2009 2016 3 : 2.4 km
2016.2.14
2020

Tesla Motors, Volvo, GM, Daimler, Ford, Audi, BMW, Hyundai

image : www.entrepreneur.com


(robotics)
Jibo
, , ,

[YOUTUBE / JIBO]

Pepper
SoftBank

18

(robotics)
2



Mobileye





19



Goggles

blog.intelligistgroup.com


(machine translation)
Google Translate (translate.google.com)

20

(Tay)
10
18~24
Twitter 2016.3.23 16
(personalized conversation)
,


CPS(cyber-physical system)

IoT

21
6.

(LAWS: Lethal Autonomous Weapon Systems)




National Robotics Engineering Center of Carnegie Mellon University http://www.briefreport.co.uk/news/taranis-uk-armed-drone-prototype-revealed-2218569.html


cont.


Autonomous Vehicles Need Experimental Ethics: Are We Ready for Utilitarian Cars?
[Bonnefon, Shariff, Rahwan, 2015.10]

22

cont.
3
[1942]
1. ,
.
Isaac Asimov
2. ,
(1920-1992) .
3. ,
.

[Lin, Abney, Bekey 2012]



'(moral code)

OpenAI
2015.12
( , X, ) 10

Elon Musk
(1971-)

7.
(singularity)

Vernor S. Vinge The Coming Technological Singularity
(1993)
(superhuman)



R. Kurzweil The singularity is near 2045

23


,


, , , , ,


, , , , ,

24
- I

1
1.
(, search)
(solution) (space) ,


- --(tic-tac-toe)

8- (traveling
salesperson problem, TSP)

8-(queen)

(, solution)


(state)

(world)

(state space)

(initial state)

(goal state)

2

(state space graph)

:
:

m:
c:

(solution)
(path)




image : Gillian Mosley

2.
(blind search)

(depth-first search, DFS)




, (backtracking, )

3

8-

2 8 3 1 2 3
1 6 4 8 4
7 5 7 6 5

2 8 3 2 8 3
1 6 4 1 4
7 5 7 6 5

2 8 3 2 8 3 2 3
6 4 1 4 1 8 4
1 7 5 7 6 5 7 6 5

8 3 2 8 3 8 3 2 8 3 2 3
2 6 4 6 4 2 1 4 7 1 4 1 8 4
1 7 5 1 7 5 7 6 5 6 5 7 6 5

8 3 2 3 2 8 3 2 8 3 8 3 2 8 3 1 2 3
2 6 4 6 8 4 6 4 6 7 4 2 1 4 7 1 4 8 4
1 7 5 1 7 5 1 7 5 1 5 7 6 5 6 5 7 6 5

8 3 8 6 3 2 3 2 3 2 8 2 8 3 2 8 3 2 8 3 8 3 8 1 3 2 8 3 2 8 3 1 2 3
2 6 4 2 4 6 8 4 6 8 4 6 4 3 6 4 5 6 7 4 6 7 4 2 1 4 2 4 7 4 7 1 4 8 4
1 7 5 1 7 5 1 7 5 1 7 5 1 7 5 1 7 1 5 1 5 7 6 5 7 6 5 6 1 5 6 5 7 6 5


(breadth-first search, BFS)

4

8-

2 8 3
1 6 4
7 5

2 8 3 2 8 3 2 8 3
1 6 4 1 4 1 6 4
7 5 7 6 5 7 5

2 8 3 2 8 3 2 3 2 8 3 2 8 3
6 4 1 4 1 8 4 1 4 1 6
1 7 5 7 6 5 7 6 5 7 6 5 7 5 4

8 3 2 8 3 8 3 2 8 3 2 3 2 3 2 8 2 8 3 2 8 3 2 8
2 6 4 6 4 2 1 4 7 1 4 1 8 4 1 8 4 1 4 3 1 4 5 1 6 1 6 3
1 7 5 1 7 5 7 6 5 6 5 7 6 5 7 6 5 7 6 5 7 6 7 5 4 7 5 4

8 3 2 3 2 8 3 2 8 3 8 3 2 8 3 1 2 3 2 3 4 2 8 2 8 3 2 8 3 23 2 8 3 2 8
2 6 4 6 8 4 6 4 6 7 4 2 1 4 7 1 4 8 4 1 8 1 4 3 1 4 5 1 6 1 8 6 1 5 6 1 6 3
1 7 5 1 7 5 1 7 5 1 5 7 6 5 6 5 7 6 5 7 6 5 7 6 5 7 6 7 5 4 7 5 4 7 4 7 5 4

8 3 8 6 3 2 3 2 3 2 8 2 8 3 2 8 3 2 8 3 8 3 8 1 3 2 8 3 2 8 3 1 2 3
2 6 4 2 4 6 8 4 6 8 4 6 4 3 6 4 5 6 7 4 6 7 4 2 1 4 2 4 7 4 7 1 4 8 4
1 7 5 1 7 5 1 7 5 1 7 5 1 7 5 1 7 1 5 1 5 7 6 5 7 6 5 6 1 5 6 5 7 6 5


(iterative-deepening search)

0:

5

(iterative-deepening search)

0:
1: ,,


(iterative-deepening search)

0:
1: ,,
2: ,,,,,,

6

(iterative-deepening search)

0:
1: ,,
2: ,,,,,,
3: ,,,,,,,,,,,,,,


(iterative-deepening search)

0:
1: ,,
2: ,,,,,,
3: ,,,,,,,,,,,,,,
4: ,,,,,,,,,,,,






10 ,
11%


(bidirectional search)


3.
(informed search)
(heuristic search)
, , , A*

(heuristic)
(Eurisko, , )
,


.

( )

8- 8-

: 4


(hill climbing method)
(local search), (heuristic search)


(local optimal solution)

10

(best-first search)




2 8 3
4 1 6 4
7 5

2 8 3 2 8 3 2 8 3
5 1 6 4 3 1 4 5 1 6 4
7 5 7 6 5 7 5

2 8 3 2 3 2 8 3
3 1 4 3 1 8 4 4 1 4
7 6 5 7 6 5 7 6 5

8 3 2 8 3
3 2 1 4 4 7 1 4
7 6 5 6 5

8 3
3 2 1 4
7 6 5


(beam search)

Image : america.pink

11

A*

n
n g(n)
h(n)

:
: (heuristic function)
n


8- A*
2 8 3

0+4 1 6 4
7 5

2 8 3 2 8 3 2 8 3
1+5 1 6 4 1+3 1 4 1+5 1 6 4
7 5 7 6 5 7 5

2 8 3 2 3 2 8 3
2+3 1 4 2+3 1 8 4 2+4 1 4
7 6 5 7 6 5 7 6 5

8 3 2 8 3 2 3 2 3
3+3 2 1 4 3+4 7 1 4 3+2 1 8 4 3+4 1 8 4
7 6 5 6 5 7 6 5 7 6 5

1 2 3
4+1 8 4
7 6 5

1 2 3 1 2 3
5+0 8 4 5+2 7 8 4
7 6 5 7 6 5

12
4.
(game tree)


--(tic-tac-toc), , ,

(lookahead)

O O O
X X X X O X X X O X
O O O

X X
X X ... X X
O O O


mini-max (mini-max algorithm)
MAX

MIN

(minimum)-(maximum)

6 MAX

3 6 5 MIN

5 3 6 7 5 8 MAX

5 4 3 6 6 7 5 8 6 MIN

5 6 7 4 5 3 6 6 9 7 5 9 8 6 MAX

13

- (prunning)

, MAX MIN

-(cut-off) : MIN ,

- : MAX ,

3
6 MAX

5
3 6 5 MIN

5 3 6 7 5 MAX

5 7
4 3 6 6 7 5 MIN

5 6 7 4 5 3 6 6 9 7 5 9 8 6 MAX


(Monte Carlo Simulation)
(random sample)
,

,

images: www.fansshare.com, www.casinonewsdaily.com

14

(Monte Carlo Tree Search, MCTS)

Coulom (06)
Chaslot, Saito & Bouzy (06)
Slide from Sylvain Gelly

Slide from Sylvain Gelly

15

Slide from Sylvain Gelly

Slide from Sylvain Gelly

16

Slide from Sylvain Gelly

Kocsis & Szepesvari (06)


Slide from Sylvain Gelly

17

Slide from Sylvain Gelly

Slide from Sylvain Gelly

18

(Monte Carlo Tree Search, MCTS)
(search space) (random sampling) ,

4
(selection)
(expansion)
(simulation) :
(back propagation)

()

image : wikipedia


cont.
(selection) : (tree policy)



UCB(Upper Confidence Bound) : UCB
, :
:
: ( )
(exploitation) (exploration)

()

19

cont.
(expansion)

. (move)
(simulation)
(default policy)
(random moves)
(backpropagation)

()


cont.




,
confidence bound ,

()

20

cont.
,

,

(move)
,

()




,
(rollout policy network)

0.6

: () :



(value network)

Image : Nature

21



CPU GPU

Image : Nature

22
- II

1
5.
(constraint satisfaction problem)
(combinatorial solution)
. 8-(queen)

(backtracking search)



. 4-(queen)

2

(constraint propagation)

A B C D A B
{1 , 2 , 3, 4} {1 , 2 , 3 , 4}


C D
{ 1 , 2 , 3, 4} {1 , 2 , 3 , 4}


(constraint propagation)

A B C D A B
{1 , 2 , 3, 4} { , , 3 , 4}


C D
{ , , , } { ,2 , , }

A B C D
A B
{1 , 2 , 3, 4} {1 , 2 , 3 , 4}


C D
{ 1 , 2 , 3, 4} {1 , 2 , 3 , 4}

3

4 (four color problem)
, 4

4
6.
(optimization)

(objective function)


(combinatorial optimization)
(TSP)

(,,,,,,)

(,, , ,,, )

5

(genetic algorithm, GA)
(John Holland, 1975)
(evolutionary computation)
, (genetic programming),
(evolutionary strategy)


(chromosome) (gene)
(fittest survival)/(natural selection)




(population)

(generation)

(crossover)
(mutation)

image : medicalhealthinsurance.info


cont.

(candidate solution)
(problem)
(quality)

Yes

No


6

cont.
(candidate solution)
(chromosome)
1 0 1 1 0 1 0 0 0 0 1 0 1 0 1

(0.6 0.8 . . . 1.2 0.9)

(E2 E5 E3 . . . E11 E7)

(population)

(fitness function)
(solution)


cont.
(selection)


. 1 : 10, 2 : 5, 3 : 15

(genetic operator) :
(crossover)

(mutation)

7

cont.

(generation)
(elitism)

Image : MICHAEL NEGNEVITSKY, Artificial Intelligence


(meta heuristics)
(optimal solution) (suboptimal
solution)


(memetic algorithm)
(particle swarm optimization, PSO)
(ant colony)
(Tabu search)
(simulated annealing)
(Harmonic search)


image source: Tarek Hegazy

8

(function optimization)
(objective function) ,

Find ,
which minimizes , 1

(objective function)

,
2 2 0 1

,
2 0 0


, 1,0


(constrained optimization) (feasible solutions)

(constraints)


(constraintx)

SVM

9

(constrained optimization) (feasible solution)


(constraint)

(Lagrange) :


: (feasible solution)

(dual function)


, (complementary slackness)


(constrained optimization) cont.

10

(regression)
(, approximation)
(least mean square method)
(error function) (energy function)


(gradient descent method, )

(gradient)


:
: (0 1

11

(gradient descent method)
,
(local minima)

conjugate gradient method

12
- I

1
1.

(data)

(information)


(knowledge)

(wisdom)


(, knowledge)
(understanding)

,

(, tacit knowledge)
,
(, explicit knowledge)

(procedural knowledge)

(declarative knowledge)
,



, , , , ,

2
2.
(rule)
~, ~ ~, ~
IF-THEN


. ,

, ,
:
: ,
/ : , .

IF THEN
IF THEN


(rule)
IF THEN
IF THEN

IF trafficLight = green THEN action = cross


IF trafficLight= red THEN action = stop

IF

(conditional part, antecedent)

THEN

(conclusion, consequent)

3



AND OR
IF <1> AND <2> AND <3> THEN <>
IF <1> OR <2> OR <3> THEN <>



IF <>
THEN <1>
AND <2>
AND <3>





IF
THEN



IF AND
THEN



IF AND
THEN

4


(strategy)


IF
THEN AND 1
IF 1 AND
THEN AND 2

(heuristic)



IF AND PH 6 AND
THEN

5
3.
(frame)
(M. Minsky, 1927~2016)
(slot)

.
frame-name Computer
frame-type Class (frame
default Intel (frame-name Computer)
(frame-type class)
data-type string
CPU (CPU (default Intel)
require Intel AMD ARM (data-type string)
SPARC (require (Intel AMD ARM SPARC)))
default Windows (OS (default Windows)
OS (data-type string)
data-type string
(memory (data-type integer))
memory data-type integer
(warranty (default 3years)
warranty default 3years (HDD (default 1TB))
HDD default 1TB (price (data-type integer))
(stock (default in-stock)))
price data-type integer
stock default in-stock



(slot)
(attribute)
(slot name) (slot value)
:
:

(slot value)
(facet) (demon)

6

Cont.
(facet)



value : (, , )
data-type :
default : ( )
require :

default Intel
data-type string
CPU
require Intel AMD
ARM SPARC
memory data-type integer


Cont.
(demon)
(procedure)


if_needed : (, )
if_added :
if_removed :
if_modified :

HDD value 512GB


price if-needed look-up-the-list
stock if-needed ask-for-vendor

7


(class)
(class)
(instance)

(hierachy)




(inheritance)


:
Computer

frame-name Computer
(frame
(frame-name Computer) frame-type Class
(frame-type class) default Intel
(CPU (default Intel) data-type string
(data-type string) CPU
(require (Intel AMD ARM SPARC))) require Intel AMD ARM
SPARC
(OS (default Windows)
(data-type string) default Windows
OS
(memory (data-type integer)) data-type string
(warranty (default 3years) memory data-type integer
(HDD (default 1TB))
(price (data-type integer)) warranty default 3years
(stock (default in-stock))) HDD default 1TB
price data-type integer
stock default in-stock

8

:
Ultra-Slim-Notebook

(frame
(frame-name Ultra-Slim-Notebook)
(frame-type instance (class Computer))
(CPU (value ARM))
(OS (value Android))
(memory (value 4G)) frame-name Ultra-Slim-Notebook
(HDD (value 512GB))
frame-type instance (class Computer)
(price (if-needed look-up-the-list)
(stock (if-needed ask-for-vendor))) CPU value ARM

OS value Android

memory value 4G
(warranty 3years ) ? warranty value 3years
HDD value 512GB
price if-needed look-up-the-list

stock if-needed ask-for-vendor

(object)

9

vs

,

4.
(, logic)
,


(Aristotle, BC384-BC322)
(syllogism)

(George Boule, 1815-1864)


(propositional logic)

(Gottlob Frege, 1848-1925)


(predicate logic)

10
4.1

4.1
(propositional logic)
(, proposition)
,
. ()
1+1 = 3. ()
. ( )

P, Q
(truth value)

,

11

(primitive proposition)
(statement)

(compound proposition)

.
P
Q
, P Q


(logical expression)

, T F,
, , , ,

12

(literal)
P P

(clause)

(conjunctive normal form, CNF)


(disjunctive normal form, DNF)



(well-formed formula, wff)

13

(truth table)
,

(interpretation)

T, F, T
( )( )=F

,
. => , F
() (denotation)


(model)
(T) (F)
( )( ) : T, F, T

, ,

n , T F
, 2n

14

(valid logical expression)
(T)
(, tautology)
.
= T : = T
= F : = T

(, contradiction)

.
= T : = F
= F : = F


(satisfiable)

. ( )( )
= T, = T, = F

(unsatisfiable)


.

15

(equivalence relation)




(CNF)

16

(logical entailment)
: (wff) . = { , }
: . =

(T) , (T)
= (logically entail)
= (logically follow)
= (logical consequence)

:
{ , }

,

,


(, inference)
(inductive inference)
(generalization)

(deductive inference)


()
p q
p : (premise)
q : (conclusion, consequence)

17

(inference rule)

(modus ponens)

(modus tollens)

(syllogism)


cont.
(resolution)

, ,

,

P q, P r qr

(resolvent)

18


(sound)

.
, .

(complete)

.


(theorem proving)
(axiom)
,
(theorem)

(constructive proof)

(resolution refutation)
(negation) ,
,

19


False

20
21

Part II

1
4.2
(predicate logic)
,
,

(, predicate)
+

(T) (F)
.
Student(John)
Friend(John, Mary)
Father(Adam, )

2


(existential quantifier) (universal quantifier)



John


(function)
,

(term)

: , ,

x y Horse(x) Dog(y) Faster(x,y)

y Greyhound(y) (z Rabbit(z) Faster(y,z))

Horse(Harry)

Rabbit(Ralph)

y Greyhound(y) Dog(y)

x y z Faster(x,y) Faster(y,z) Faster(x,z)


(first-order predicate logic, FOL)

x P(x)

(high-order predicate logic)


,

S S(x)
gx (f(x) = h(g(x))

(a) Whoever can read is literate. ( )


(b) Monkeys are not literate. ( )
(c) Some monkeys are intelligent. ( )
(d) Some who are intelligent cannot read. ( )


CNF
1.

2.



3.
(T)
(Skolem function)



s(x)
Q(x, s(x)) x (magic
function)

5

(unification)
(resolution) ,

(d)

(d) , (d)

6

Horn (Horn clause)
, A(x) B(x) C(x)

Prolog
Horn

father(noah, shem).
father(noah, ham).
father(shem, elam).
father(shem, arphaxad).
father(arphaxad, caina).
grandfather(X,Y) :- father(X,Z), father(Z,Y).
:- grandfather(X,Y).

(backtracking)

5.

7

(semantic network)
(binary relation)

(node)
, , , ,
(edge)


8

(relationship)
is-a
(, is-a(,)),
(, is-a(,))

(transitive)

has-a
-
part-of
has-a(X,Y) part-of(Y,X)




(relationship) (object)
(reification)

9


(inheritance)

. ?
can(,)
is-a
can(, ) ,



(default value, )

. ?

10




. 1 2 1 , 2 1


donor gift
donee

1 2 1

owner object

:
1=, 2=, 1=
:




(slot)

frame-name frame-name
frame-type Class frame-type Class
is-a is-a
can can
cannot has-a

11


,






and, or, implies




6.
(script)


(event)


(track)

(role)

(props)

(entry condition)

(scene)

(result)

12

.

7. RDF

13
RDF
(ontology)
()

(domain) , ,
, ()

(vocabulary)

RDF

Amazon.com
dmoz(Directory of Mozilla, www.dmoz.org)

14
RDF
cont.
UNSPSC(United Nations Standard Products and Services Code)

WordNet(wordnet.princeton.edu)

RDF
cont.
UMLS(Unified Medical Language System)

SNOMED-CT(Systematized Nomenclature of Medicine - Clinical


Terms)
, ,

LOINC(Logical Observation Identifiers Names and Codes)


GO(Gene Ontology)

FOAF (Friend of a friend)


SIOC (Semantically-Interlinked Online Communities Project)


, ,

15
RDF
cont.
SNOMED-CT (common cold)

RDF
cont.
FOAF (Friend of a friend)

http://xmlns.com/foaf/spec/images/foafspec.jpg

16
RDF
cont.
SIOC (Semantically-Interlinked Online Communities Project)

https://www.w3.org/TR/hcls-sioc/

RDF

RDFS(Resource Description Framework Schema)


RDF

RDF(Resource Description Framework)


(metadata, )
(specification)

17
RDF

RDF(Resource Description Framework)
(sentence)
++
(; resource) (, , attribute)
(value)
abc kdhong@abc.org
http://www.w3.org/2000/10/swap/pim/contact#Person

http://www.w3.org/1999/02/22-rdf-syntax-ns#type

http://www.abc.org/People/EM/contact#me http://www.w3.org/2000/10/swap/pim/contact#fullName

http://www.w3.org/2000/10/swap/pim/contact#mailbox

mailto:kdhong@abc.org

http://www.w3.org/2000/10/swap/pim/contact#personalTitle

RDF

RDF(Resource Description Framework) Conf.


http://www.abc.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#fullName,
http://www.abc.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#mailbox,
mailto:kdhong@abc.org
http://www.abc.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#personalTitle,
http://www.abc.org/People/EM/contact#me, http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
http://www.w3.org/2000/10/swap/pim/contact#Person

XML
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
<contact:Person rdf:about="http://www.abc.org/People/EM/contact#me">
<contact:fullName></contact:fullName>
<contact:mailbox rdf:resource="mailto:kdhong@abc.org"/>
<contact:personalTitle></contact:personalTitle>
</contact:Person>
</rdf:RDF>

18
RDF

SPARQL
RDF
SQL

PREFIX contact: <http://www.w3.org/2000/10/swap/pim/contact#>


PREFIX rdf: < http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?name ?email
WHERE { ?person rdf:type contact:Person.
?person contact:name ?name.
?person contact:mbox ?email. }

RDF

RIF (Rule Interchange Format)

Prefix(ex <http://example.com/2008/prd1#>)
(* ex:rule_1 *)
Forall ?customer ?purchasesYTD (
If And ( ?customer#ex:Customer
?customer[ex:purchasesYTD->?purchasesYTD]
External(pred:numeric-greater-than(?purchasesYTD 5000)) )
Then Do ( Modify(?customer[ex:status->"Gold"]) ) )

$5,000 Gold

19
RDF

(semantic web)



Tim bernes-Lee

(tag)
XML

RDF

RDF


(interoperability)

20
RDF

Protg
GUI

21

Part III

1
8.




(weak implication) (vague
association)
ex. IF() THEN( )
(certainty degree)
(Bayesian theorem)


(natural language) (vague)
(imprecise)
ex. (frequently), (big), (heavy)
(fuzzy theory)

2

cont.
(incomplete) (missing)
(unknown) ,
(approximate reasoning)


(contradictory opinion) (conflicting
knowledge)

8.1
(certainty factor)
(rule) (fact) [ 1,1]
1 ( ), 1 ( )
cf
: IF THEN cf( )
: cf( )
: cf( )


1.0 : (definitely not)
0.8 : (almost certainly not)
0.6 : (probably not)
0.4 : (maybe not)
0.2 ~ 0.2 : (unknown)
0.4 : (maybe)
0.6 : (probably)
0.8 : (almost certainly)
1.0 : (definitely)

3


IF A THEN B
A

B

IF A and B THEN C
A min ,
B
C

IF A or B THEN C
A
B
max ,
C


cont.
IF sky is clear
AND the forecast is sunny
THEN the action is wear sunglasses 0.8

sky is clear = 0.9,


the forecast is sunny = 0.7
wear sunglasses min 0.9, 0.7 0.8 0.7 0.8 0.56

IF sky is overcast
OR the forecast is rain
THEN the action is take an umbrella { 0.9}

sky is overcast 0.6


the forecast is rain 0.8

take an umbrella max 0.6,0.8 0.9 0.8 0.9 0.72

4

cont.

IF A THEN B

A 1

IF C THEN B
C
2
B

8.2
(probability)


(relative frequency probability)
(frequentist probability)

(subjective probability)
(degree of belief)

5

( joint probability)
, , ,

.
A : , B :
, 0.25


(conditional probability)
|

: 8
: 3

, 1/36 1

6/36 6

6

(Bayesian theorem)

(posterior probability)
(likelihood)
(posterior probability)
(evidence)



,
:

(likelihood of sufficiency)

(likelihood of necessity)


(prior probability)

7


:

(prior odds)

(posterior odds)

8.3

(word)

(crisp set, classical set) X


x X (x X), X (x X)
,
1, 0 (membership)

8

()
vs

(degree)
(fuzzy set)


(Fuzzy Set)
(collection)
(
)
(membership degree) [0,1]

image : Michael Negnevitsky


(membership function)

9

(linguistic term)
. (short), (average), (tall)

image : Michael Negnevitsky



(fuzzy rule)
,

IF wind is strong
THEN sailing is good
low high
IF project_duration is long
THEN completion_risk is high

IF speed is slow
THEN stopping_distance is short

10



(fuzzy inference)

: x = x1, y=y1

image : Michael Negnevitsky

11

(defuzzification)

image : Michael Negnevitsky

(defuzzification)

image : Michael Negnevitsky

12

.
IF service is poor OR food is rancid THEN tip is low
IF service is good THEN tip is average
IF service is excellent OR food is delicious THEN tip is generous

poor good excellent rancid delicious cheap average generous

service food tip


.
IF service is poor OR food is rancid THEN tip is low
IF service is good THEN tip is average
IF service is excellent OR food is delicious THEN tip is generous

13

Part IV

1
9.
(probabilistic graph model)
(probability distribution)
,
()


(probabilistic graph model)
.


(random variable)
(A; alarm)
(B; burglary)
(E; earthquake)
(N; neighbor call)

Image : www.thefreedictionary.com

2


(E), (B), (A), (N)


?
?


?
?

Image : www.thefreedictionary.com


(factorization)
(independence)
,

(conditional independence)
, |

(factorization)
,
, , , , , ,

3

E B
, , , , , , )
A
, ,
N
, )

, , ,
,
0.8 0.9 0.9 0.3
0.1944


(Bayesian network)
(directed
graph)
:
:
, , , , , , ) , )

E B

4

(Markov network)
(undirected graph)
(Markov random field)
(factor)

10.

1
1 . . . .

(regression analysis)

(neural network)

SVM(support vector machine)

(deep learning)

5
11.
(rule-based system)


(knowledge-based system)
(expert system)

6
11.1


(forward chaining, )

(backward chaining, )


R1: IF ?x THEN ?x .
R2: IF ?x THEN ?x .
R3: IF ?x THEN ?x .
R4: IF ?x AND ?x THEN ?x .
R5: IF ?x AND ?x THEN ?x .
R6: IF ?x AND ?x THEN ?x .
R7: IF ?x AND ?x AND ?x THEN ?x .
R8: IF ?x AND ?x AND ?x AND ?x
THEN ?x .
R9: IF ?x AND ?x AND ?x AND ?x
THEN ?x .

F1: .
F2: .
F3: .
F4: .
F5: .
F6:

R1: IF ?x THEN ?x .
R2: IF ?x THEN ?x .
R3: IF ?x THEN ?x .
R4: IF ?x AND ?x THEN ?x .
R5: IF ?x AND ?x THEN ?x .
R6: IF ?x AND ?x THEN ?x .
R7: IF ?x AND ?x AND ?x THEN ?x .
R8: IF ?x AND ?x AND ?x AND ?x
THEN ?x .
R9: IF ?x AND ?x AND ?x AND ?x
THEN ?x .

F1: .
F2: .
F3: .
F4: .
F5: .
F6: .

11.2



(rule) :
(fact) :

(rule base)

(production memory)

(working memory)

,


(inference engine)
,
- -

9

(inference engine)

(pattern matching)


(conflict set)
,
(conflict resolution)

(user interface)

(external interface)


(inference engine)


(rule priority)


(recency, depth)

(first match, breath)

(specificity)

10

cont.
(rule priority)
1: 1 ( 100)
IF
AND
THEN Number_1
AND (ampicillin)
AND (gentamicin)
AND 1

2: 2( 90)
IF
AND
THEN Number_2
AND (penicillin)
AND 2


cont.
(specificity)

1
IF
AND
AND
THEN

2
IF
THEN

11

cont.
(recency, depth)

(data most recently entered)


1
IF [03/25 08:16 PM]
THEN

2
IF [03/26 10:18 AM]
THEN




(fact)
(object) (frame)
.
(monkey (name ) (age 3) (room ))


Jess

(defrule ruleBirthday
?c <- (monkey (name cheetah) (age ?old) (room ?where) (birthdate ?day))
(calendar (date ?day))
=>
(bind ?newAge (+ ?old 1))
(retract ?c)
(assert (monkey cheetah ?newAge ?where)))

12

JESS (Java Expert System Shell)

,
Rete (lightweight)
Jess Java API
Java Jess

Eclipse


JESS cont.
Java Jess engine
import jess.*;

public class PricingEngine {


private Rete engine;
private WorkingMemoryMarker marker;
private Database database;

public PricingEngine(Database aDatabase) throws JessException {


// Create a Jess rule engine
engine = new Rete();
engine.reset();

// Load the pricing rules


engine.batch("pricing.clp");

// Load the catalog data into working memory


database = aDatabase;
engine.addAll(database.getCatalogItems());

// Mark end of catalog data for later


marker = engine.mark();
}
.
}

13


NPC (non-player character)

IF enemy visible and my health is < very-low-health-value (20%)


OR
his weapon is much better than mine
THEN propose retreat

image : Quake 2



(business logic) (Business
Rule)
,
,


14
15
2016-08-04

1
2016-08-04

Part I

2
2016-08-04

1.
(, machine learning)
(task)
(To improve the
performance of a system with experience or example data at some task, to
adjust the structure and/or parameters of system. Tom Mitchell, 1997)

(To design algorithms for inferring unknowns from knowns)

()
, ()


PlayTennis

(training data)

?
?

3
2016-08-04


PlayTennis cont.

Outlook

Sunny Rain
Overcast

Humidity Yes Wind

High Mild Weak Strong

No Yes Yes No

Outlook Temperature Humidity Wind PlayTennis



Sunny Hot Mild Weak ?
Rain Hot High Weak ?

(heuristics)

Image : MNIST data

4
2016-08-04


(deductive learning)
(deductive inference)

(inductive learning)
(examples) (generalization) (pattern)
(model)


(Occams razor)

(97,16)
(1,2) -> 3
(4,8) -> 12
(10,13) -> 24
(23,52) -> 75
(43,101) ->144
(14,31) -> 45
(123,15) -> 138 113


(Occams razor)

5
2016-08-04

2.
(supervised learning)
()-()

(unsupervised learning, )

(semisupervised learning)

(reinforcement learning)
, (reward)
(action)

2.1

6
2016-08-04


(classification)
(class)


(decision boundary)

(classifier)



(decision tree)

K- (K-nearest neighbor, KNN)

(deep learning)

(Support Vector Machine, SVM)

(AdaBoost)

(random forest)

(probabilistic graphical model)

7
2016-08-04




(generalization)


(training data)
(classifier)

(test data)

(validation data)


(overfitting) (underfitting)


,

(underfitting) (good fitting) (overfitting)

8
2016-08-04






(validation data)



(accuracy)

= ( )/( )

9
2016-08-04

K- (k-fold cross-validation)
k
,


(imbalanced data)



. A 99% ,
A 99% .



(re-sampling)

10
2016-08-04


(regression analysis)


(regression analysis) cont.

:
( )2

( )

11
2016-08-04


(overfitting) (underfitting)

()

()

(underfitting) (good fitting) (overfitting)


(overfitting)
(model complexity)

= + ()*( )

(penalty)

(underfitting) (good fitting) (overfitting)

12
2016-08-04

2.2 (unsupervised learning)


(unsupervised learning)

(structure), (hierarchy)
(hidden user group)

(log) (usage pattern)

http://www.youtube.com/watch?v=rhallml-
(clustering) juk

(density estimation)
(dimensionality reduction)


(clustering)

(segmentation)
image : Pedro Felzenswalb

13
2016-08-04


cont.
(hard clustering)

. k-means
(fuzzy clustering)

1
. k-means


(underlying structure)

, (anomaly, outlier)
:
(preprocessing)


(density estimation)
(class)

-1

-2

-2 -1 0 1 2 3 4 5

14
2016-08-04


cont.
(parametric)


: (Gaussian)
(Mixture of Gaussian)

(nonparametric)
,

: (histogram)

http://i.stack.imgur.com/pE0Xu.gif


(dimension reduction)


2, 3
(curse of dimensionality)

15
2016-08-04


cont.
(curse of dimensionality)

2 4

20 50


cont.
(Principle Component Analysis, PCA)
(projection)

(covariance matrix) (eigenvalue)
(eigenvector)

16
2016-08-04


(outlier)



(noise)
,

(novelty detection)


(outlier) cont.
(point outlier)

(contextual outlier)

) 25 , 25

(collective outlier)

17
2016-08-04


(outlier) cont.
(fraud detection system, FDS)

(intrusion detection system, IDS)


2.3
(reinforcement learning)
(environment)
(reward)
(state) (action)
(trial and error)

()
,

... ...

18
2016-08-04


cont.
(policy)
(state) (action)
.


(policy)

Image source : RMI MUNOS


RAPPORT ANNUEL INRIA 2008


- cont.




(logistics)
(robotics)

19
2016-08-04

2.4
(semi-supervised learning)
(unlabeled data)

(labeled data) ,





(smoothness, )

(cluster)

(manifold)

Image: ludovicarnold.altervista.org/

20
2016-08-04

21

Part II

1
3. (decision tree)
(decision tree)

(internal node) :
(edge) :
(terminal node) : (class),

Outlook

Sunny Rain
Overcast

Humidity Yes Wind

High Mild Weak Strong

No Yes Yes No

IF Outlook = Sunny AND Humidity = High THEN Answer = No


Outlook Temperature Humidity Wind PlayTennis

Sunny Hot Mild Weak ?
Rain Hot High Weak ?

(decision tree)
(decision tree)


1. (spliting attribute)
2. (subtree)
3.

A A

v1 v2 vn A

...
T1 T2 Tn

2
(decision tree)
(decision tree)

Outlook

Sunny Rain
Overcast

Humidity Yes Wind

High Mild Weak Strong

No Yes Yes No

(decision tree)
(decision tree)

Temperature

Cold Hot
moderate

Outlook Outlook Wind

Sunny Rain Sunny Rain Strong Weak


Overcast Overcast

Yes Yes Wind Wind Yes Humidity No Humidity

Strong Weak Strong Weak High Normal High Normal

No Yes Yes No Wind Yes Outlook Yes

Strong Weak Sunny Rain


Overcast

No Yes No Yes null

3
(decision tree)

(decision tree)

4
(decision tree)

(decision tree)

(class)


Pattern Outline Dot Shape
1 vertical dashed no triangle
2 vertical dashed yes triangle
3 diagonal dashed no square
4 horizontal dashed no square
5 horizontal solid no square
6 horizontal solid yes triangle
7 vertical solid no square
8 vertical dashed no triangle
9 diagonal solid yes square
10 horizontal solid no square
11 vertical solid yes square
12 diagonal dashed yes square
13 diagonal solid no square
14 horizontal dashed yes triangle

5
(decision tree)

9 (square)
5 (triangle)

(class probability)

(entropy)

(decision tree)

horizontal Pattern vertical


diagonal

6
(decision tree)

solid
dashed Outline

(decision tree)

no yes
Dot

7
(decision tree)

horizontal Pattern vertical


diagonal

(decision tree)

horizontal Pattern vertical


diagonal

no Dot yes dashed solid


Outline

8
(decision tree)

Pattern

horizontal vertical
diagonal

Dot square Outline

no yes dashed solid

square triangle triangle square

(decision tree)
(information gain)


. ,


(information gain ratio)
(Gini index)

9
(decision tree)

(decision tree)

horizontal Pattern vertical


diagonal

10
(decision tree)
vs

A |v(A)| IG(A) GainRatio(A)


Pattern 3 0.247 0.156
Outline 2 0.152 0.152
Dot 2 0.048 0.049

(decision tree)

11
(decision tree)
Gini

horizontal Pattern vertical


diagonal

(decision tree)

A Gain(A) GainRatio(A) GiniGain(A)


Pattern 0.247 0.156 0.058
Outline 0.152 0.152 0.046
Dot 0.048 0.049 0.015

12
(decision tree)

ID3
(categorical)
. PlayTennis, /

C4.5

ID3

C5.0
C4.5

CART

(decision tree)
(regression analysis)


Pattern Outline Dot Area
1 vertical dashed no 26
2 vertical dashed yes 30
3 diagonal dashed no 48
4 horizontal dashed no 46
5 horizontal solid no 62
6 horizontal solid yes 23
7 vertical solid no 43
8 vertical dashed no 36
9 diagonal solid yes 38
10 horizontal solid no 48
11 vertical solid yes 48
12 diagonal dashed yes 62
13 diagonal solid no 44
14 horizontal dashed yes 30

13
(decision tree)
(regression analysis)

Pattern

horizontal vertical
diagonal

Dot 45.0 Outline

no yes dashed solid

47.7 26.5 30.0 45.5

(decision tree)

14
(decision tree)
(regression analysis)
Area
26
30
48
46
62
23 Area
43
36 horizontal 12.15 5
38
vertical 9.36 5
48
48 diagonal 5.77 4
62
14
44
30

4.
(ensemble classifier)

, (voting method)
(weighted voting method)
(bootstrap)
(resampling with
replacement)

(bagging, bootstrap aggregating)


(boosting)

15

(bagging, bootstrap aggregating)
,
,


1 1


2 2


3 3

(random forest)


(boosting)
k


( )



( )
3

(AdaBoost)

16
5. k-
k- (k-nearest neighbor, KNN)
(, ) ,

k

(query)

k

k-
k-nearest neighbor (KNN) cont.



(Euclidian distance)

17
k-
k-nearest neighbor (KNN) cont.



(indexing)
R-, k-d

k-
k-nearest neighbor (KNN) cont.

k


(majority voting) :


: k
(weighted sum) :

18
k-
k-nearest neighbor (KNN) cont.



(lazy learning)

6.
(clustering)

(similarity) ,

k-means


1.
2.
3.
4.
5. 2-4

19
: K-means 1

k1


k2
3

k3

: K-means 2

k1

k2

k3

20
: K-means 3

k1 k1

k2


k3
k2

k3

: K-means 4

k1




k3
k2

21
: K-means 5

k1

k3
k2

: K-means 6

k1

k3
k2

22
: K-means 7

k1

k2

k3

: K-means

23
: K-means

https://sites.google.com/site/myecodriving/k-means-ju-lei-fen-xi

7.

24

cont.

Pattern Outline Dot Shape
1 vertical dashed no triangle
2 vertical dashed yes triangle
3 diagonal dashed no square
4 horizontal dashed no square
5 horizontal solid no square
6 horizontal solid yes triangle
7 vertical solid no square
8 vertical dashed no triangle
9 diagonal solid yes square
10 horizontal solid no square
11 vertical solid yes square
12 diagonal dashed yes square
13 diagonal solid no square
14 horizontal dashed yes triangle

25

Part III

1
8.
(neural network, artificial neural network)

(neuron)

(, dendrite) :

(, axon) :
.
(, synapse) :

McClulloch & Pitts, 1943


(Perceptron)
(Rosenblatt, 1957)
f(s)

1
y
f(s) 1

2

(Perceptron)
OR

f(s)


(Perceptron)
(linearly separable problem)
x2

x1
(linearly inseparable problem)
XOR(exclusive OR)

Minsky & Papert 1969

3

(multilayer Perceptron, MLP)

f2(x)

f1(x)

+ +

1 f(s)
1
f1(x)
1 0.5 1 y
1 1
f3(x)
1 1
x1
1 1
x2 1
f2(x)

f(s)

(step) (sigmoid)

4

MLP

Image source : Pascal Vincent


MLP


(hidden layer)


MLP
(Error back propagation algorithm, Backprop algorithm)

6

MLP
cont.

1 0 1
-1.0 -1.0
-2.0 -0.009 -0.044
-0.004 0.119
z1 0.758
-3.0 -0.009 2.0
1.0 x1 1 o = f(x) y = 1.0
1.0 -0.005
-0.018
-0.004
2.0
1.0 0.953
z2 -0.042
2.0 x2 2.0
2
-0.008

9.
(deep learning, , , )

( , deep neural network)


: googLeNet (google)

8


(vanishing gradient problem)
,
,

http://neuralnetworksanddeeplearning.com/chap6.html



(pre-training)

(layer)


(gradient) 0
(sigmoid) (linear function)

http://neuralnetworksanddeeplearning.com/chap6.html

9



(original data) (handcrafted feature)
(feature vector)



()



(Deep Neural Network)


(deep learning, , , )


DBN(Deep Belief Network, DBN)
(autoencoder)
(Convolutional Neural Network, CNN)
LSTM RNN(Long short-term memory RNN)

10
9.1 Deep Belief Network

h1 h2 h3
1
bi
W =(wij)4x3
bj

() 1
v1 v2 v3 v4

Deep Belief Network

h1 h2 h3
1
bi
W =(wij)4x3
bj

() 1
v1 v2 v3 v4

11
Deep Belief Network

h1 h2 h3
1
bi
W =(wij)4x3
bj

() 1
v1 v2 v3 v4

Deep Belief Network


DBN cont.
DBN
(layer-wise
learning)

RBM

RBM

RBM

12
9.2
(authoencoder)



cont.

V1 W1 V1 V1 V1

V2 V2
V2 V2
W2
V3 V3

Vi


Vi
Wm

Vn Vn Vn Vn
1 2 3 4 5

W1 V1
W1

V2
W2 W2

Vi

Wm Wm

Vn

3 (feature extraction)

13
9.3 CNN
(Convolutional Neural Network, CNN)
:
:
,

CNN

11 10
1 110 00
1 01 1 0 1 4 3 4
01
0 10
1 00 10
11 1 01
0 0 1 0 2 4 3
00
1 01
0 10 1
11 10 10
1 1 0 1 2 3 4
01
0 00
1 0 10
11 1 01
0
01 11
0 10
1 01
0 01

1 1 2 3
4 6 6 8 6 8
3 1 1 0 3 4
1 2 2 4

14
CNN
CNN
3

red

green

blue

image : cs231n.stanford.edu

CNN
CNN
(local connection)

(shared weight)

(pooling)

images: www.kdnuggets.com

15
CNN
CNN

images: www.kdnuggets.com http://parse.ele.tue.nl/cluster/2/CNNArchitecture.jpg

CNN
CNN

Image : Nature

16
CNN

9.4 LSTM-RNN
RNN(Recurrent Neural Network, )

RNN

(vanishing gradient problem)

Image : Nature

17
LSTM-RNN
LSTM-RNN (Long Short-Term Memory Recurrent Neural Network)
LSTM(Long Short-term memory) cell

(input), (output), (forget)
(gate)

(language model), ,

image: Alex Graves



, .
, .
,
.
, .
, .
, ,
.

18



Caffe
Torch
Theano
RNNLIB
Cuda-ConvNet
Pylarn
DL4J
TensorFlow


CUDA
Apache Spark

19

Part IV. (SVM)

1
10.1 SVM
Support Vector Machine (SVM)
Vladimir Vapnik
(decision
boundary) (binary classifier)
x2 h2
h3 h1

h3 h2

x1

(margin)

(support vector)

SVM

(hyperplane)
4

2
10.2 SVM
SVM

x2

x1

10.3 SVM

3
SVM
SVM

KKT(Karush-Kuhn-Tucker)

(complementary slackness)

(dual function)

SVM
SVM

(dual function)

4
SVM
SVM

SVM
SVM

(primal problem)

w b (dual problem)

5
SVM
SVM
(dual problem)

(quadratic programming)

SVM
(quadratic programming)

quadratic problem solver


MatLab/Octave quadprog( )
Python solvers.qp( )

6
SVM
(quadratic programming) cont.
MatLab/Octave quadprog( )
(canonical form)

= quadprog(H, f, A, a, B, b)

SVM

SVM
(quadratic programming) cont.
MatLab/Octave quadprog( )

= quadprog(H, f, A, a, B, b)

SVM

7
SVM
12

11

10

1
0 2 4 6 8 10

SVM
MatLab/Octave cont.

f = -ones(6,1)
A = -eye(6)
a = zeros(6,1)
B = t'
b = [0]


= quadprog(H+eye(6)*0.001, f, A, a, B, b)
12

10

0
0 1 2 3 4 5 6 7 8 9 10

8
SVM

12 12

10 10

8 8

6
6

4
4

2
2

0
0 1 2 3 4 5 6 7 8 9 10
0
0 1 2 3 4 5 6 7 8 9 10

10.4 SVM

9
SVM
SVM

SVM
SVM
- cont.

(dual problem)

(upper bound)

10
10.5 SVM
SVM (linear SVM)

(high-dimensional mapping)

10

x2
2

-2

-5 -4 -3 -2 -1 0 1 2 3 4 5
x1

SVM
cont.
XOR

y3
x2
1

1
y1
1
x1
1 y2


(curse of dimensionality)
(generalization)
(margin)

(kernel trick)

11
SVM
SVM
SVM

SVM

SVM

12
SVM
(kernel function)

(polynomial kernel)

RBF(radial basis function)

(hyperbolic tangent)

SVM

13
SVM

SVM
SVM

14
15

Part V.

1
11.1
(reinforcement learning)
,
(state) (reward)
(action) (policy)


sk rk ak
rk+1
sk+1

... ...


(MDP)

image : Richard S. Sutton

11.2

4
11.3

a
r

5

(value function)

s s,a
r
a
r

image : Richard S. Sutton

6
11.4

a
r

11.5

a
r


...

image : Richard S. Sutton

Q-learning
,
MDP
MDP

Q-learning

9
Q-learning



(Monte Carlo method)

(temporal difference learning, TD-learning)

(policy gradient algorithm)

10
13.

Public libraries in C, C++, Java, etc.
WEKA
R package
Python
MatLab or Octave

11
Weka
Weka
Waikato Environment for Knowledge Analysis
Waikato Data Mining/Machine Learning

SAS, E-Miner
, , , , ,

ARFF, CSV, XRFF, binary
URL, JDBC SQL import

Java import

Weka
ARFF(Attribute-Relation File Format)
(iris)

12
Weka
J48

Weka

13
Java Weka

14

1
1. (planning)
(planning)

c
c pickup(x) b
a b putdown(x,y) a

/
(initial state) (operator) (goal state)

(plan) : pickup(c) putdown(c, floor) pickup(b)


putdown(b, a) pickup(c) putdown(c,b)



(initial state) (description)

(goal state)

(action)

(agent)
(autonomous) (intelligent)

, (robot)
(how) , (goal, what)

(planning)

2
2.
- (means-ends analysis)
.

Source: udacity

Image : spir.al, gamma.cs.unc.edu

3

(state space graph)
-

:
:

image : Gillian Mosley


8-
2 8 3 1 2 3
1 6 4 8 4
7 5 7 6 5

2 8 3 2 8 3
1 6 4 1 4
7 5 7 6 5

2 8 3 2 8 3 2 3
6 4 1 4 1 8 4
1 7 5 7 6 5 7 6 5

8 3 2 8 3 8 3 2 8 3 2 3
2 6 4 6 4 2 1 4 7 1 4 1 8 4
1 7 5 1 7 5 7 6 5 6 5 7 6 5

8 3 2 3 2 8 3 2 8 3 8 3 2 8 3 1 2 3
2 6 4 6 8 4 6 4 6 7 4 2 1 4 7 1 4 8 4
1 7 5 1 7 5 1 7 5 1 5 7 6 5 6 5 7 6 5

8 3 8 6 3 2 3 2 3 2 8 2 8 3 2 8 3 2 8 3 8 3 8 1 3 2 8 3 2 8 3 1 2 3
2 6 4 2 4 6 8 4 6 8 4 6 4 3 6 4 5 6 7 4 6 7 4 2 1 4 2 4 7 4 7 1 4 8 4
1 7 5 1 7 5 1 7 5 1 7 5 1 7 5 1 7 1 5 1 5 7 6 5 7 6 5 6 1 5 6 5 7 6 5

O O O
X X X X O X X X O X
O O O

X X
X X ... X X
O O O

5


(policy)



(steel sheet blending)
, A*

image : S. K. Gupta, et al. 1998

6

(bridge game)
4
Bridge Baron
Us:East declarer, West dummy
Finesse(P1; S) Opponents:defenders, South & North
Contract:East 3NT
On lead:West at trick 3 East:KJ74
West: A2
LeadLow(P1; S) FinesseTwo(P ; S) Out: QT98653
2

PlayCard(P1; S, R1) EasyFinesse(P2; S) StandardFinesse(P2; S) BustedFinesse(P2; S)


West 2
(North Q) (North 3)

StandardFinesseTwo(P2; S) StandardFinesseThree(P3; S) FinesseFour(P4; S)

PlayCard(P2; S, R2) PlayCard(P3; S, R3) PlayCard(P4; S, R4) PlayCard(P4; S, R4)


image: S. Smith et al.
North 3 East J South 5 South Q 1998



(Mars Exploration Rover: MER)

image : NASA

7

(scheduling)

(project management)

(military operations planning)

(information gathering)

(resource control)

3.

(action) (deterministic)
(nondeterministic)

(state variable) (discrete) (continuous)



(current state)

(initial state)

(action) (duration)

8

cont.
,

,
(reward function)
(, )

(cooperative) (selfish)
,

4.

(classical planning)

(Markov Decision Process, MDP)

(Partially Observable Markov Decision


Process, POMDP)

(multi-agent)

9

(classical planning problem)


.
, ,
.
.

(world)


(Markov Decision Process, MDP)
(nondeterministic),

(Discrete-time Markov decision


processes, discrete-time MDP)

.
.
(reward function) .
.

10

(Markov Decision Process, MDP) cont.

image : Dana Nau



(partially observable Markov decision process, POMDP)

()

, :

, :

image : Dana Nau

11

(multi-agent planning)




http://gamma.cs.unc.edu/research/crowds/

5.
(planner)


(domain-specific planner)

(domain-independent planner)

(configurable planner)

12

(domain-specific planner)


image : Dana Nau


(domain-independent planner)



(classical planning)


(state-space planning)
(plan-space planning)

13

(configurable planner)

(hierarchical task network, HTN)

6.


STRIPS, PDDL
(state variable)
(world)

(action)

(state space)

14

STRIPS(STanford Research Institute Problem Solver)
SRI International Richard Fikes Nils Nilsson (1971)
(planner)

(first-order predicate logic)

(state)
(positive literal)


STRIPS cont.
(goal)

X :

15

STRIPS cont.
(action)
, , precondition(), effect()




precondition effect
precondition ()


effect ()




add-list , ()
delete-list


STRIPS cont.
: ClimbUp
Precondition:

Effect:

16

PDDL(Planning Domain Definition Language)


Drew McDermott (1998)

(International Planning Competition, IPC; ipc.icaps-


conference.org) ,

(object),
(predicate), , ,


domain : ,
problem : , ,


PDDL cont.
domain BNF
<domain> ::= (define (domain <name>) [<require-def>] [<types-def>]:typing

[<constants-def>] [<predicates-def>] [<functions-def>]:fluents

[<constraints>] <structure-def>*)

Problem BNF

<problem> ::= (define (problem <name>) (:domain <name>) [<require-def>]

[<object declaration>] <init> <goal>

[<constraints>]:constraints [<metric-spec>]:numeric-fluents

[<length-spec>])

17

PDDL cont.
. strips-gripper4
gripper-strips
objects
init
goal

(define (problem strips-gripper4)


(:domain gripper-strips)
(:objects rooma roomb ball1 ball2 ball3 ball4 left right)
(:init (room rooma) (room roomb)
(ball ball1) (ball ball2) (ball ball3) (ball ball4)
(gripper left) (gripper right)
(at-robby rooma)
(free left) (free right)
(at ball1 rooma) (at ball2 rooma) (at ball3 rooma) (at ball4 rooma))
(:goal (and (at ball1 roomb) (at ball2 roomb) (at ball3 roomb))))


PDD cont.
. Pick-up
effect not STRIPS delete-list
add-list
?

(define (domain gripper-strips)


(:action pick-up :parameters (?x ?y ?z)
:precondition
(and (BALL ?x) (ROOM ?y) (GRIPPER ?z)
(at-ball ?x ?y) (at-robby ?y) (free ?z))
:effect
(and (carry ?z ?x)
(not (at-ball ?x ?y)) (not (free ?z)))))

18
6.

(state-space planning)


STRIPS

(plan-space planning)

(planning graph method)


GraphPlan

(hierarchical planning)
HTN

6.1
(state-space planning)

(state space)
(node) : (world)
(edge) : (transition) (action)

(primitive action)
(operator) =

19

s1 s0
put

take

location 1 location 2 location 1 location 2

move2 move1 move2 move1

s3 s2
put

take

location 1 location 2 location 1 location 2

unload load

s4 s5
move2

move1

location 1 location 2 location 1 location 2 image : Dana Nau


(Forward Search)



(Breadth-first search)
(Depth-first search)
: A*

a1 s1
a4 s4

s0 s2 s
a2 s5
a5 g
a3
s3

20

(Backward Search)

g1 a1
g4 a4
g2 g0
a2
s0 a5
g5
a3
g3


STRIPS

,
effect

precondition
precondition ,
effect
precondition

g3 a3 g11
a1
g6 a6 g4 g1
a4 g2
g21 a2
g7 a7 g5 a5 g22

21

STRIPS
(world)
2 : R1, R2
: D
: I. R1
: B. R2

(goal)
I B R2

(predicate)
InRoom(x, r) : x r .
NextTo(x, t) : x t .
Status(d, s) : d s (Open Closed) .
Connects(d, rx, ry) : d rx ry


STRIPS


InRoom(I, R1) InRoom(I, R2)
InRoom(B, R2) InRoom(B, R2)
Connects(D, R1, R2) Connects(D, R1, R2)
Connects(D, R2, R1) Connects(D, R2, R1)
Status(D, Open) Status(D, Open)

22

STRIPS
(operator)

Operator: GoToDoor(I, dr)


Precondition:
InRoom(I, ra), Connects(dr, ra, rb)
Effect:
add-list: NextTo(I, dr)
delete-list:
Operator: GoThruDoor(I, dr)
Precondition:
Connects(dr, ra, rb), NextTo(I,dr), Status(d, Open)
Effect:
add-list: InRoom(I, rb)
delete-list: InRoom(I, ra)


STRIPS

InRoom(I, R1) InRoom(I, R2)
InRoom(B, R2) InRoom(B, R2)
Connects(D, R1, R2) Connects(D, R1, R2)
Connects(D, R2, R1) Connects(D, R2, R1)
Status(D, Open) Status(D, Open)


InRoom(I, R2)
Operator: GoThruDoor(I, dr) rb = R2
Precondition:
Connects(dr, ra, rb), NextTo(I,dr), Status(d, Open) Connects(dr, ra, R2), NextTo(I, dr), Status(dr, Open)
Effect:
add-list: InRoom(I, rb) Connects(D, R1, R2)
delete-list: InRoom(I, ra)
dr = D, ra = R1
NextTo(I, D)

Operator: GoToDoor(I, dr) dr = D


Precondition:
InRoom(I, ra), Connects(dr, ra, rb) InRoom(I, ra), Connects(D, ra, rb)
Effect: ra = R1, rb = R2
add-list: NextTo(I, dr)
delete-list: InRoom(I, R1), Connects(D, R1, R2)

GoToDoor(I, D) GoThruDoor(I, D)

23

Sussman (Sussman Anomaly)

a
c b
a b c

STRIPS
STRIPS

6.2
(state-space planning)
(partial plan)
(partially instantiated actions)
(constraints)
(precedence) :
(binding) bar(y)
v1 v2 or v c Precond: p(y)
xy
v1 = v2 or v = c Effects:
(substitution) foo(x)
(causal link) Precond:
Effects: p(x) p(z) baz(z)


x=z Precond: p(z)
Effects:

(solution plan) (refinement)

24

(threat)
(deleted-condition interaction)
(causal link)
Effects

clobber(y)
Precond:
Effects: p(y)

p(x)
foo(x) baz(x)
Precond: Precond: p(x)
Effects: p(x) Effects:




(HWS) (Drill), (SM) (Milk)
(Banana)

()
Start
Precond: none
Effects: At(Home), sells(HWS,Drill), Sells(SM,Milk), Sells(SM,Banana)

Finish
Precond: Have(Drill), Have(Milk), Have(Banana), At(Home)

Go( , )
Precond: At(
Effects: At( ), At( )

Buy( , )
Precond: At( ), Sells( , )
Effects: Have( )

Start Finish

25

(initial plan): Start, Finish,

Start

Effects: At(Home), Sells(HWS,Drill), Sells(SM,Milk), Sells(SM,Bananas)

Precond: Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
51
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/


Have 3

Start

At(s1) Sells(s1, Drill) At(s2) Sells(s2,Milk) At(s3) Sells(s3,Bananas)

Buy(Drill, ss11))
Buy(Drill, Buy(Milk, SM) Buy(Bananas, SM)

Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
52
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

26

Sells

Start

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)

Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
53
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/


At(HWS) At(SM) :

Start At(l2)

At(l1) Go(l2, SM)

Go(l1,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)

Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
54
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

27

At(s1) : Buy(Drill) Go(l2, SM)

Start At(l2)

At(l1) Go(l2, SM)

Go(l1,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)

Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
55
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/


At(l1) : Start l1=Home

Start At(l2)

At(Home) Go(l2, SM)


Go(Home,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)

Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
56
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

28

At(l2) : Go(Home,HWS) l2= HWS

Start At(HWS)

At(Home) Go(HWS, SM)

Go(Home,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)

Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
57
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/


Finish At(Home) : Go(l3, Home)

Start At(HWS)

At(Home) Go(HWS, SM)

Go(Home,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)
At(l3)
Go(l3, Home)
Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
58
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

29

At(SM), At(HWS) : Go(l3,Home)

Start At(HWS)

At(Home) Go(HWS, SM)

Go(Home,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)
At(l3)
Go(l3, Home)
Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
59
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/


: At(l3) l3=SM

Start At(HWS)

At(Home) Go(HWS, SM)

Go(Home,HWS)

At(HWS) Sells(HWS,Drill) At(SM) Sells(SM,Milk) At(SM) Sells(SM,Bananas)

Buy(Drill,HWS)
Buy(Drill, s1 ) Buy(Milk, SM) Buy(Bananas, SM)
At(SM)
Go(SM, Home)
Have(Drill) Have(Milk) Have(Bananas) At(Home)

Finish
Dana Nau: Lecture slides for Automated Planning
60
Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/

30
6.3
(planning graph method)
(planning graph)
(branching factor)
:

g1 a1
g4 a4
g2 g0
s0 a2
g5 a5
a3
g3


GraphPlan
(plan-space planning)
GraphPlan

STRIPS



. On(x,y) 2 : 4
:
:

31
GraphPlan
(planning graph)
(proposition level) (action level)


(maintenance)

0
(literal)

GraphPlan
(planning graph)

1
0
0 Precondition
1 Effects

32
GraphPlan
(planning graph)

1
1 Effects
0
0 1

GraphPlan
(planning graph)

2 2

33
GraphPlan
(planning graph)
(mutual exclusion, mutex)
,


(inconsistent effect)
effect effect
(interference)
precondition
(competing needs preconditions)

precondition


(inconsistent effect) (interference) (competing
needs preconditions)

GraphPlan
(planning graph)

(inconsistent support)

(inconsistent support)

34
GraphPlan

procedure Graphplan:
for = 0, 1, 2,
Graph expansion( ) :
create a planning graph that contains levels
Check whether the planning graph satisfies a necessary
(but insufficient) condition for plan existence
if it does, then
do solution extraction ( ) :
backward search,

modified to consider
only the actions in
the planning graph
if we find a solution,
then return it

GraphPlan




,


garb :
dinner :
present :
clean :
quiet :

35
GraphPlan
cont.



garb clean quiet


,
garb dinner present

GraphPlan
cont.

(cook), (wrap), (carry),
(dolly)

Action : cook
Precondition : clean
Effect : dinner

Action : wrap
Precondition : quiet
Effect : present

Action : carry
Precondition : garb
Effect : garb clean

Action : dolly
Precondition : garb
Effect : garb quiet

36
GraphPlan
cont.

GraphPlan
cont.
1 : garb dinner present

: cook, carry : wrap, dolly

37
GraphPlan
cont.

2 2

GraphPlan
cont.

cook {wrap, carry}

38
6.4

(hierarchical task network, HTN)


(task) ,


(primitive task) : ()
(non-primitive task)
(method) (subtask)


(constraint)

HTN
HTN

travel(x, y) (method)

method : taxi-travel(x,y)
task : travel(x,y)
precondition : short-distance(x,y)
subtasks : get-taxi, ride(x,y), pay-driver
constraints : {get-taxi < ride(x,y), ride(x,y) < pay-driver}

method : air-travel(x,y)
task : travel(x,y)
precondition : long-distance(x,y)
subtasks : buy-ticket(a(x),a(y)), travel(x,a(x)), fly(a(x),a(y)),travel(a(y),y)
constraints : { buy-ticket(a(x),a(y)) < fly(a(x),a(y)),
travel(x,a(x)) < fly(a(x),a(y)),
fly(a(x),a(y)) < travel(a(y),y) }

39
HTN
HTN cont.

task travel(x, y)

method : taxi-travel(x, y) method : air-travel(x, y)

buy-ticket(a(x), a(y))
get-taxi ride(x, y) pay-driver fly(a(x),a(y)) travel(a(y),y)
travel(x, a(x))

HTN
HTN cont.

travel(x, y)
travel(x, y)
taxi-travel
air-travel
short-distance(x, y)
long-distance(x, y)

get-taxi ride(x, y) pay-driver buy-ticket(a(x), a(y)) travel(x, a(x)) fly(a(x),a(y)) travel(a(y),y)

40
HTN
HTN

,

HTN
HTN cont.

precondition

S0 Precond. Effect S1 Precond. Effect S2

41
HTN
HTN
UMD(University of Maryland) MIT

travel(x, y) travel(UMD, MIT)


buy-ticket(BWI, Logan)
travel(UMD,BWI)
air-travel taxi-travel get-taxi
ride(UMD,BWI)
buy-ticket(a(x), a(y)) pay-driver
get-taxi
travel(x, a(x))
ride(x, y) fly(BWI, Logan)
fly(a(x),a(y)) travel(Logal, MIT)
pay-driver
travel(a(y),y)
get-taxi
long distance short distance ride(Logan, MIT)
pay-taxi

HTN
HTN
Bridge Baron
Us:East declarer, West dummy
Finesse(P1; S) Opponents:defenders, South & North
Contract:East 3NT
On lead:West at trick 3 East:KJ74
West: A2
LeadLow(P1; S) FinesseTwo(P ; S) Out: QT98653
2

PlayCard(P1; S, R1) EasyFinesse(P2; S) StandardFinesse(P2; S) BustedFinesse(P2; S)


West 2
(North Q) (North 3)

StandardFinesseTwo(P2; S) StandardFinesseThree(P3; S) FinesseFour(P4; S)

PlayCard(P2; S, R2) PlayCard(P3; S, R3) PlayCard(P4; S, R4) PlayCard(P4; S, R4)


North 3 East J South 5 South Q
image: S. Smith et al.
1998

42
43

You might also like