agent-centered search

45
Agent-Centered Search Mitja Luštrek Department of Intelligent Systems, Jožef Stefan Institute

Upload: robert

Post on 17-Jan-2016

35 views

Category:

Documents


0 download

DESCRIPTION

Agent-Centered Search. Mitja Luštrek Department of Intelligent Systems, Jožef Stefan Institute. Introduction. Setting: mobile agent (robot) in an known/unknown environment (labyrinth with/without map). Objective: to reach the goal from the starting position in as short time as possible. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Agent-Centered Search

Agent-Centered Search

Mitja Luštrek

Department of Intelligent Systems,Jožef Stefan Institute

Page 2: Agent-Centered Search

Introduction Setting: mobile agent (robot) in an known/unknown

environment (labyrinth with/without map). Objective: to reach the goal from the starting position in as

short time as possible. Two phases:

planning of the path, execution of the plan.

Traditional search: first planning of the whole path, then execution of the plan.

Agent-centered search: planning of the beginning of the path from the starting position, execution of the partial plan, planning from the new starting position...

Page 3: Agent-Centered Search

Why Agent-Centered Search Planning long in comparison to execution:

environment very large, environment not wholly known, environment changing.

Agent must act in real time.

Results: shorter

planning, longer

execution(path notoptimal),

shortersum.

Page 4: Agent-Centered Search

Traditional Search – A* Multiple paths from the starting position. Agent keeps expanding the most promising path until the

goal is reached. Evaluation function for path ending in position n:

f (n) = g (n) + h (n) g (n) ... the length of the shortest path found so far from

the starting position to n; h (n) ... heuristic evaluation of the length of the shortest

path from n to the goal. If h (n) is admissible (optimistic – always smaller or equal to

the length of the shortest path from n to the goal), A* finds the shortest path.

Page 5: Agent-Centered Search

A* – Example The agent’s environment is divided into squares, some of

them impassable. The agent can move up, down, left and right. The distance between adjacent squares is 1. h (n) is the Manhattan distance from n to the goal.

Page 6: Agent-Centered Search

A* – Example4 3 2 1 0

GOAL

5START

4 3 2 1

6 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 7: Agent-Centered Search

A* – Example4+1 3 2 1 0

GOAL

5START

4 3 2 1

6+1 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 8: Agent-Centered Search

A* – Example4+1 3+2 2 1 0

GOAL

5START

4 3 2 1

6+1 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 9: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3 2 1

6+1 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 10: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1

6+1 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 11: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1

6+1 5 4+5 3 2

7 6 5 4 3

8 7 6 5 4

Page 12: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1

6+1 5 4+5 3 2

7+2 6 5 4 3

8 7 6 5 4

Page 13: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1

6+1 5 4+5 3 2

7+2 6 5 4 3

8+3 7 6 5 4

Page 14: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1

6+1 5 4+5 3+6 2

7+2 6 5+6 4 3

8+3 7 6 5 4

Page 15: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1

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

7+2 6 5+6 4+7 3

8+3 7 6 5 4

Page 16: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0

GOAL

5START

4 3+4 2 1+8

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

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

8+3 7 6 5 4

Page 17: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0+9

GOAL

5START

4 3+4 2 1+8

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

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

8+3 7 6 5 4

Page 18: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0+9

GOAL

5START

4 3+4 2 1+8

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

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

8+3 7 6 5 4

Page 19: Agent-Centered Search

A* – Example4+1 3+2 2+3 1 0+9

GOAL

5START

4 3+4 2 1+8

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

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

8+3 7 6 5 4

Page 20: Agent-Centered Search

Agent-Centered Search Agent searches local search space, which is a part of the

whole space centered on the agent. Makes some steps in the most promising direction. Repeats until it reaches the goal.

In game playing (chess), the search is performed around the current position: the whole game tree is too large (environment very

large), it is not known in which part of the space the game will

head (environment not wholly known). This is an example of two-agent search, I focus on single-

agent search.

Page 21: Agent-Centered Search

LRTA* Learning real-time A*

Agent updates h (l) for every point l in the local search space:h (l) = min (d (l, n) + h (n)) d (l, n) ... the length of the shortest path from l to a point

n just outside the local search space, h (n) ... heuristic evaluation of the length of the shortest

path from n to the goal. Moves to the adjacent position l with the lowest h (l). Repeats until the goal is reached.

Updated h (l) can be used in later searches.

Page 22: Agent-Centered Search

LRTA* – Example Same setting as for A*. The local search space is 3 x 3 squares centered on the

agent.

Page 23: Agent-Centered Search

LRTA* – Example4START

3 2 1 0GOAL

5 4 3 2 1

6 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 24: Agent-Centered Search

LRTA* – Example4START

3 2 1 0GOAL

5 4 3 2 1

6 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 25: Agent-Centered Search

LRTA* – Example8START

7 6 1 0GOAL

7 6 5 2 1

6 5 4 3 2

7 6 5 4 3

8 7 6 5 4

Page 26: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

9 10 11 2 1

8 9 10 3 2

7 6 5 4 3

8 7 6 5 4

Page 27: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

9 10 11 2 1

8 9 10 3 2

7 6 5 4 3

8 7 6 5 4

Page 28: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 29: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 30: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 31: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 32: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 33: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 34: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 35: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 36: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 37: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 38: Agent-Centered Search

LRTA* – Example10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 39: Agent-Centered Search

LRTA* – Example, search restarted

10START

11 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 40: Agent-Centered Search

LRTA* – Example, search restarted

10START

13 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 41: Agent-Centered Search

LRTA* – Example, search restarted

10START

13 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 42: Agent-Centered Search

LRTA* – Example, search restarted

10START

13 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 43: Agent-Centered Search

LRTA* – Example, search restarted

10START

13 12 1 0GOAL

11 12 11 2 1

10 11 10 3 2

9 6 5 4 3

8 7 6 5 4

Page 44: Agent-Centered Search

LRTA* – Extensions Unknown environment, agent’s sensory range very limited:

minimal local search space (only the agent’s position). Unknown environment, the task is exploration:

maximal local search space (all known positions), agent moves towards the closest unvisited position;

node counting – agent moves towards the least frequently visited adjacent position.

Unknown starting position: minimize the worst-case execution time; min-max LRTA*:

a minimax tree is built around the agent’s position; the agent’s actions minimize the length of the path to

the goal; possible configurations of the environment maximize

the length of the path to the goal.

Page 45: Agent-Centered Search

Search Pathology Minimax [Nau, 1979; Beal, 1980; Bratko & Gams, 1982; etc.]:

in practice, the more moves ahead one searches, the better he plays;

in theory, under apparently reasonable conditions, the more moves ahead one searches, the worse he plays;

this is caused by minimax amplifying the heuristic evaluation used in the leaves of the game tree.

Agent-centered search [Bulitko et al., 2003]: one would expect that the larger the local search space,

the more likely an agent is to choose the optimal path; in some cases, the larger the local search space, the less

likely an agent is to choose the optimal path.