agents & intelligent systems dr liz black [email protected]

74
Agents & Intelligent Systems Dr Liz Black [email protected]

Upload: isabel-doyle

Post on 28-Mar-2015

229 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

Agents & Intelligent Systems

Dr Liz [email protected]

Page 2: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

What is an Agent?Software agents or physical agents (robots)

The main point about agents is they are autonomous: capable of deciding for themselves what to do

We want to delegate goals to the agent without having to worry about specifying how exactly those goals should be achieved

Agent should work out for itself what to do in order to try to achieve its goals

2

Page 3: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

Why do we need Agents?Because we’re lazy

Because sometimes the problems we want to solve are so complex or unpredictable that we don’t know how to write a precise program that solves them

3

Page 4: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

VideoStarring Douglas Adams and Tom Baker, 1990

4

Page 5: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

5

Page 6: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

6

Page 7: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

7

Page 8: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

8

Page 9: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

9

Page 10: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

10

Page 11: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

11

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 12: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

12

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 13: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

13

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 14: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

14

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 15: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

15

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 16: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

16

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 17: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

17

Page 18: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

18

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 19: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

19

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 20: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

20

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 21: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

21

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

Page 22: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

22

While(not home){

If no obstacle, move

forward

If obstacle, move left

If far end of grid, move right}

!

Page 23: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

23

Page 24: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

24

Goal: get home

Knowledge: {

Home is at C1 I am at C4}

A B C D E

1

2

3

4

Page 25: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

25

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at C4

Obstacle at D3

No obstacle at B4, C4, D4, B3, C3}

Page 26: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

26

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at C3

Obstacle at D3

No obstacle at B4, C4, D4, B3, C3}

Page 27: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

27

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at C3

Obstacle at D3, B2, C2

No obstacle at B4, C4, D4, B3, C3, D2}

Page 28: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

28

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at B3

Obstacle at D3, B2, C2

No obstacle at B4, C4, D4, B3, C3, D2}

Page 29: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

29

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at B3

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4}

Page 30: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

30

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at C3

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4}

Page 31: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

31

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at C4

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4}

Page 32: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

32

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at D4

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4}

1

2

3

4

Page 33: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

33

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at D4

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4}

1

2

3

4

Page 34: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

34

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at E4

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4}

1

2

3

4

Page 35: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

35

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at E3

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4}

1

2

3

4

Page 36: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

36

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at E3

Obstacle at D3, B2, C2. A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4, E2}

1

2

3

4

Page 37: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

37

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at E2

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4, E2}

1

2

3

4

Page 38: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

38

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at E2

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4, E2, D1, E1}

1

2

3

4

Page 39: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

39

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at E1

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4, E2, D1, E1}

1

2

3

4

Page 40: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

40

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at D1

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4, E2, D1, E1}

1

2

3

4

Page 41: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

41

A B C D E

1

2

3

4

Goal: get home

Knowledge: {

Home is at C1 I am at home

Obstacle at D3, B2, C2, A2

No obstacle at B4, C4, D4, B3, C3, D2, A3,

A4, E3, E4, E2, D1, E1}

1

2

3

4

Page 42: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

42

A B C D E

1

2

3

4

Page 43: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

43

Can anybody help me?

A B C D E

1

2

3

4

Page 44: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

44

Maybe, I’ve got a big

pillow

A B C D E

1

2

3

4

Page 45: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

45

Please bring it to E2

A B C D E

1

2

3

4

Page 46: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

46

Why should

I?

A B C D E

1

2

3

4

Page 47: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

47

I will pay you

£5

A B C D E

1

2

3

4

Page 48: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

48

No way will I do it

for less than £7

A B C D E

1

2

3

4

Page 49: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

49

I’ll give you £6 and

that’s my final offer

A B C D E

1

2

3

4

Page 50: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

50

Ok!

A B C D E

1

2

3

4

Page 51: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

51

A B C D E

1

2

3

4

Page 52: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

52

A B C D E

1

2

3

4

Page 53: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

53

A B C D E

1

2

3

4

I’m in positio

n

Page 54: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

54

A B C D E

1

2

3

4

Page 55: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

55

A B C D E

1

2

3

4

Page 56: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

56

A B C D E

1

2

3

4

Page 57: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

57

A B C D E

1

2

3

4

Page 58: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

58

A B C D E

1

2

3

4

£6

Page 59: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

59

A B C D E

1

2

3

4

£6

Page 60: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

60

A B C D E

1

2

3

4

£6

Page 61: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

61

While(not home){

If no obstacle, move forward

If obstacle, move left

If far end of grid, move right}

!

What should we do when our actions don’t have the effect we expect?

Page 62: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

62

Goal: get home

Knowledge: {

Home is at C1 I am at C3

Obstacle at D3

No obstacle at B4, C4, D4, B3, C3}

How should we represent what we know about our environment?

Page 63: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

63

Can anybody help me?

When do we need to get help from other agents?

Page 64: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

64

Maybe, I’ve got a big

pillow

How can agents communicate?

What language should they use?

How can they be sure they have the same shared meaning of words?

Page 65: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

65

I’m in

position

How do we know we can trust another agent?

Page 66: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

66

Why should I?

How can we get an agent to do something for us?

Page 67: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

67

I’ll give you £6 and that’s my final offer

What’s a good negotiation strategy?

Page 68: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

Making decisionsDeciding what to do becomes much more complicated when we have to take into account what someone else will do

Game theory – used to study strategic decision making, takes into account the possible actions of others

68

Page 69: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

69

Golden balls

womansteals

mansteals

00

1000

0100

5050

mansplits

womansplits

Both split: share the money

One steals and one splits: stealer gets all the money

Both steal: neither gets any money

Page 70: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

70

Golden balls

womansteals

mansteals

00

1000

0100

5050

mansplits

womansplits

Both split: share the money

One steals and one splits: stealer gets all the money

Both steal: neither gets any money

Dominant strategy

A strategy S is dominant if no matter what the other does you can do no better than to play S

Page 71: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

71

Golden balls

womansteals

mansteals

00

1000

0100

5050

mansplits

womansplits

Both split: share the money

One steals and one splits: stealer gets all the money

Both steal: neither gets any moneyAssume the man splits.

What’s the best thing that the woman can do?

Page 72: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

72

Golden balls

womansteals

mansteals

00

1000

010

5050

mansplits

womansplits

Both split: share the money

One steals and one splits: stealer gets all the money

Both steal: neither gets any moneyAssume the man steals.

What’s the best thing that the woman can do?

Page 73: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

73

Golden balls

womansteals

mansteals

00

100

010

55

mansplits

womansplits

Both split: share the money

One steals and one splits: stealer gets all the money

Both steal: neither gets any money

Page 74: Agents & Intelligent Systems Dr Liz Black elizabeth.black@kcl.ac.uk

SummaryAgents are capable of deciding for themselves what to do to achieve their goals

Useful because sometimes we don’t know in advance the best way to achieve a goal, or we don’t want to have to think about how to achieve a goal

Often agents can’t achieve their goals on their own but must cooperate with other agents

74