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
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
VideoStarring Douglas Adams and Tom Baker, 1990
4
5
6
7
8
9
10
11
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
12
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
13
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
14
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
15
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
16
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
17
18
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
19
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
20
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
21
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
22
While(not home){
If no obstacle, move
forward
If obstacle, move left
If far end of grid, move right}
!
23
24
Goal: get home
Knowledge: {
Home is at C1 I am at C4}
A B C D E
1
2
3
4
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}
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}
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}
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}
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}
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}
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}
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
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
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
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
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
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
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
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
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
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
42
A B C D E
1
2
3
4
43
Can anybody help me?
A B C D E
1
2
3
4
44
Maybe, I’ve got a big
pillow
A B C D E
1
2
3
4
45
Please bring it to E2
A B C D E
1
2
3
4
46
Why should
I?
A B C D E
1
2
3
4
47
I will pay you
£5
A B C D E
1
2
3
4
48
No way will I do it
for less than £7
A B C D E
1
2
3
4
49
I’ll give you £6 and
that’s my final offer
A B C D E
1
2
3
4
50
Ok!
A B C D E
1
2
3
4
51
A B C D E
1
2
3
4
52
A B C D E
1
2
3
4
53
A B C D E
1
2
3
4
I’m in positio
n
54
A B C D E
1
2
3
4
55
A B C D E
1
2
3
4
56
A B C D E
1
2
3
4
57
A B C D E
1
2
3
4
58
A B C D E
1
2
3
4
£6
59
A B C D E
1
2
3
4
£6
60
A B C D E
1
2
3
4
£6
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?
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?
63
Can anybody help me?
When do we need to get help from other agents?
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?
65
I’m in
position
How do we know we can trust another agent?
66
Why should I?
How can we get an agent to do something for us?
67
I’ll give you £6 and that’s my final offer
What’s a good negotiation strategy?
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
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
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
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?
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?
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
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