artificial intelligence programming paradigms · figure 1.9: (a) bi-directional memory required...

39
Artificial Intelligence Programming Paradigms Pieter Wellens 2013-2014

Upload: others

Post on 31-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Artificial Intelligence Programming Paradigms

Pieter Wellens2013-2014

Page 2: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

What has been done

• Lisp

• Language games

• Naming Game

• Babel framework

Page 3: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

"form1"

"form2"

"form3"

"form4"

m1

m2

m3

m4

Forms Meanings

m1

m2

m3

m4

Forms Meanings

Initial State End State

Page 4: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

• No real speech

• Atomicity of objects and (consequently) meanings

• Only single name uttered per game

• Perfect feedback (topic is known at end of game)

• All agents are identical

• Always two agents per game

Page 5: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

• No real speech

• Atomicity of objects and (consequently) meanings

• Only single name uttered per game

• Perfect feedback (topic is known at end of game)

• All agents are identical

• Always two agents per game

Page 6: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

• No real speech

• Atomicity of objects and (consequently) meanings

• Only single name uttered per game

• Perfect feedback (topic is known at end of game)

• All agents are identical

• Always two agents per game

Page 7: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

• No real speech

• Atomicity of objects and (consequently) meanings

• Only single name uttered per game

• Perfect feedback (topic is known at end of game)

• All agents are identical

• Always two agents per game

Page 8: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

• No real speech

• Atomicity of objects and (consequently) meanings

• Only single name uttered per game

• Perfect feedback (topic is known at end of game)

• All agents are identical

• Always two agents per game

Page 9: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Time for a new language game

• What are the main “scaffolds” of the Naming Game?

• No real speech

• Atomicity of objects and (consequently) meanings

• Only single name uttered per game

• Perfect feedback (topic is known at end of game)

• All agents are identical

• Always two agents per game

Page 10: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Removing perfect feedback

• What happens when perfect feedback is removed from a Naming Game?

Speaker Hearer

pick topic

wordlook-up and

utter

interpreted topic

world

joint attentional scene

look-up

intended topic

objects objects

alignmentalignment

perceive perceive

Page 11: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Removing perfect feedback

• What happens when perfect feedback is removed from a Naming Game?

!

!

!

!

!

• ==> Minimal Guessing Game

Speaker Hearer

pick topic

wordlook-up and

utter

interpreted topic

world

joint attentional scene

look-up

intended topic

objects objects

alignmentalignment

perceive perceive

Page 12: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

1. Uncertainty

"form1"

"form2"

"form3"

"form4"

m1

m2

m3

m4

Forms Meanings

m1

m2

m3

m4

Forms Meanings

Initial State End State

"form1"

"form2"

"form3"

"form4"

m1

m2

m3

m4

Forms Meanings

Mapping uncertainty

"form1"

"form2"

"form3"

"form4"

m1

m2

m3

m4

Forms Meanings

Word form competition

Page 13: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

2. No notion of communicative success

• Important measures:

• form alignment: Do both agents prefer the same word for the object?

Page 14: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

2. No notion of communicative success

• Important measures:

• form alignment: Do both agents prefer the same word for the topic object?

• meaning alignment: Do both agents prefer the same meaning for the spoken word?

Page 15: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

2. No notion of communicative success

• Important measures:

• form alignment: Do both agents prefer the same word for the topic object?

• meaning alignment: Do both agents prefer the same meaning for the spoken word?

• mapping alignment: Do both agents reach both form and meaning alignment?

Page 16: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

2. No notion of communicative success

• Important measures:

• form alignment: Do both agents prefer the same word for the topic object?

• meaning alignment: Do both agents prefer the same meaning for the spoken word?

• mapping alignment: Do both agents reach both form and meaning alignment?

• ==> local measures can measure global emergence

Page 17: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Other way to evoke the problem of mapping uncertainty?

• Can you think of another way to alter the Naming Game to introduce the problem of mapping uncertainty?

Page 18: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

A toy example about chairs

Page 19: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Naming Game

obj-1 obj-2 obj-3 obj-4 obj-5

obj-6 obj-7 obj-8 obj-9 obj-10

Page 20: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

IKEA Game

morits stefan gilbert verksamförby

julius alexander bonny förby bertil

Page 21: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Guessing Game

color-yellow material-metalhas-back-yes has-wheels-no

color-whitematerial-metalhas-back-nohas-wheels-no

color-redmaterial-woodhas-back-yeshas-wheels-no

color-blackmaterial-metalhas-back-yeshas-wheels-no

color-redmaterial-metalhas-back-yeshas-wheels-yes

color-blackmaterial-metalhas-back-nohas-wheels-no

color-redmaterial-metalhas-back-yeshas-wheels-no

color-blackmaterial-metalhas-back-yeshas-wheels-yes

color-yellowmaterial-metalhas-back-nohas-wheels-no

color-blackmaterial-woodhas-back-yeshas-wheels-no

Page 22: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Example

Page 23: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Uncertainty in lexical learning

Quine, W. (1960). Word and Object. MIT Press, Cambridge, MA.

Part II chapter 3 p. 65-99

"Gavagai"

...

rabbit

look!

catch

cute

bad luck

dinner

?

?

?

?

??

?

Page 24: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Strategies for the Minimal Guessing Game

Page 25: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Strategies for the Minimal Guessing Game

• A baseline strategy

context: A B C and topic A

(w,A) (w,E)

(w,A) (w,A)Success

Speaker Hearer

(w,A)

(w,A) (w,A)

Speaker Hearer

(w,A)Adoption (w,A) (w,A) or (w,B) or (w,C)

Failure (w,A) or (w,B) or (w,C)

(w,A) (w,C)"Success" (w,A) (w,C)

Page 26: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

A baseline strategy

0

0.2

0.4

0.6

0.8

1

0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000

Map

ping

alig

nmen

t

Total number of language games played

population size: 510

20

Scaling in the Baseline GG Strategy in combination with the Minimal NG Strategy (left) and the LI Strategy (right). Only in the most limiting scenario’s can agents reach mapping alignment and even still at a very slow pace. Total number of objects: 50, context size: 4, total games: 200000, error: min/max, number of simulations: 12, population sizes: 5, 10 and 20.

0

0.2

0.4

0.6

0.8

1

0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000

Map

ping

alig

nmen

t

Total number of language games played

population size: 510

20

Page 27: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

A baseline strategy

0

0.2

0.4

0.6

0.8

1

0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000

Map

ping

alig

nmen

t

Total nr of language games played

context size: 25

1020

Scaling in the Baseline GG Strategy in combination with the Minimal NG Strategy (left) and the LI Strategy (right). Only in the most limiting scenario’s can agents reach mapping alignment and even still at a very slow pace. Total number of objects: 50, population size: 5, total games: 200000, error: min/max, number of simulations: 12, context sizes: 2, 5, 10 and 20.

0

0.2

0.4

0.6

0.8

1

0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000

Map

ping

alig

nmen

tTotal nr of language games played

context size: 25

1020

Page 28: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Understanding poor results

• Acquisition robustness

• Only two agents, one teacher one learner.

• The teacher is always the speaker and always speaks the same word “w” for which he (the teacher) has a fixed (intended) meaning (e.g. A).

• The context varies but should (if consistent) contain A.

• Hearer applies the strategy

• With a certain chance a context might be inconsistent, which means that it does NOT contain A.

• Measure: at end of each game, does learner have association (“w”, A). (Boolean)

Page 29: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Acquisition Robustness

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

error: 0.0 0.01 0.05 0.1 0.25 0.5 0.75 0.9

Acqu

isiti

on ro

bust

ness

Input error

Acquisition robustness for the Baseline GG strategy with different errorinput values. Every bar represents a series of 500 exposures to the same word. Acquisition robustness represents the percentage of these in which the agent at the end associates the “correct” target meaning to the word. Number of simulations: 100, error: 5 to 95 percentile, context size: 10, total number of objects: 50.

Page 30: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Cross-situational strategies

• Where lies the weakness of the Baseline Strategy?

Page 31: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Cross-situational strategies

• Where lies the weakness of the Baseline Strategy?

• Instead of representing uncertainty, a random possibility is chosen.

• Cross-situational strategies aim to improve that by keeping track of multiple hypothesized meanings/referents.

Page 32: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

Cross-situational strategies

• Where lies the weakness of the Baseline Strategy?

• Instead of representing uncertainty, a random possibility is chosen.

• Cross-situational strategies aim to improve that by keeping track of multiple hypothesized meanings/referents.

• Example:

• game 1: context A,B,C word “w” -> (“w”, (A,B,C))

• game 2: context A,B,E word “w” -> (“w”, (A,B))

Page 33: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Set Strategy1.4. Cross-situational strategies

"name 1"

"name 2"

"name 3"

...

object 5

object 3

object 7

...

object 3"name 4"

s1

s2

s3

s4

(a) Naming Game memory

"word 1"

"word 2"

"word 3"

...

m5

m1

...

s1

s2

s3

m4

m10

m1

m5 m9

(b) Cross-situational Guessing Game memory

Figure 1.9: (a) Bi-directional memory required for a Naming Game (or theBaseline GG Strategy). Mappings are scored and di↵erent names/wordscan refer to the same object. (b) Bi-directional memory required for theCross-situational Set strategy for the Minimal Guessing Game. Multiplecompeting meanings can be associated with a word. The association betweenword and hypothesized meanings are scored in the same way as it was inmore advanced Naming Game strategies.

fmeaning(w) which returns a random element from fmeanings(w). The produc-tion function fproduce(o, a) looks up all words w for which o = fmeaning(w).Note that if o 2 fmeanings(w) there is only a 1

|fmeanings(w)| chance that o =

fmeaning(w). When there is no such word finvent(o, a) creates a new wordwnew and associates it with singleton {o} since o is the only possible meaningfor the speaker.

Given a word w and context C the listener a tries to interpret usingfinterpret(w, C, a) by looking up w. In case he does not find w in his lexiconfadopt(w, C, a) associates w with all the elements in C such that fmeanings(w) =C.

At the end of the game falign(w, C, alistener) updates the meanings associ-ated with w as follows:

fmeanings(w) =

(C if fmeanings(w) \ C = ;,

fmeanings(w) \ C otherwise.(1.1)

The agent takes the intersection of the possible meanings still associated withthe word and the current context, as such reducing the associated meanings.When none of the associated meanings is compatible with the context, theagent starts over by associating all objects in the context. This updatemechanism is related to simple candidate elimination algorithms known fromconcept learning (Mitchell, 1977). De Vylder (2007) also introduced a likewise

18

Page 34: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Set Strategy

context: A B C and topic A

(w, {A,F}) (w, {E})

(w, {A,F}) (w, {A,C,D})Success

Speaker Hearer

(w, {A,F})

(w, {A,F}) (w, {A,C})

Speaker Hearer

(w, {A,F})Adoption (w, {A,F}) (w, {A,B,C})

Failure

(w, {A,F}) (w, {C,G})"Success" (w, {A,F}) (w, {C})

(w, {A,B,C})

Page 35: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Set Strategy

0

0.2

0.4

0.6

0.8

1

0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000

Map

ping

alig

nmen

t

Total number of language games played

population size: 510

20

0

0.2

0.4

0.6

0.8

1

0 20000 40000 60000 80000 100000 120000 140000 160000 180000 200000

Map

ping

alig

nmen

tTotal nr of language games played

context size: 25

1020

Page 36: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Set Strategy

0

0.2

0.4

0.6

0.8

1

error: 0.0 0.01 0.05 0.1 0.25 0.5 0.75 0.9

Acqu

isiti

on ro

bust

ness

Input error

Baseline GG CS Set

Acquisition robustness for the Baseline GG strategy and the CS Set Strategy with different errorinput values. Every bar represents a series of 500 exposures to the same word. Acquisition robustness represents the percentage of these in which the agent at the end associates the “correct” target meaning to the word. Number of simulations: 100, error: 5 to 95 percentile, context size: 10, total number of objects: 50.

Page 37: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Frequency Strategy

"word 1"

"word 2"

"word 3"

...

m5, f1

m1, f1

...

s1

s2

s3

m4, f2

m10, f2

m1, f3

m5, f1 m9, f2

Page 38: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Frequency Strategy

0

0.2

0.4

0.6

0.8

1

0 5000 10000 15000 20000 25000 30000 35000 40000 45000 50000

Map

ping

alig

nmen

t

Total nr of language games played

context size: 25

1020

0

0.2

0.4

0.6

0.8

1

0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000

Map

ping

alig

nmen

t

Total number of language games played

population size: 510

20

Scaling of the Frequency Strategy in combination with the interpolated Lateral Inhibition Strategy. Scaling is again improved dramatically both in terms of population size and context size. (a+b) total number of objects: 50, error: min/max, number of simulations: 12, inh = dec = 0.3 and initial = 1.0. (a) context size: 4, population sizes: 5, 10 and 20. (b) population size: 5, context sizes: 2, 5, 10 and 20.

Page 39: Artificial Intelligence Programming Paradigms · Figure 1.9: (a) Bi-directional memory required for a Naming Game (or the Baseline GG Strategy). Mappings are scored and di↵erent

CS Frequency Strategy

0

0.2

0.4

0.6

0.8

1

error: 0.0 0.01 0.05 0.1 0.25 0.5 0.75 0.9

Acqu

isiti

on ro

bust

ness

Input error

Baseline GG CS Set CS Frequency

Acquisition robustness for the Baseline GG strategy, the CS Set Strategy and the CS Frequency Strategy with different errorinput values. Every bar represents a series of 500 exposures to the same word. Acquisition robustness represents the percentage of these in which the agent at the end associates the “correct” target meaning to the word. Number of simulations: 100, error: 5 to 95 percentile, context size: 10, total number of objects: 50.