artificial intelligence (ai)_9

Download Artificial Intelligence (AI)_9

Post on 06-Oct-2015

215 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Artificial Intelligence (AI)

TRANSCRIPT

  • 9 A* with Terrain cost and evolutionary algorithms

    .

  • A* with Terrain cost

    Evolutionary

    Genetic algorithm

    Ant colony optimization

    Introduction to database system

  • - Local Optimum Fitness Function

    f(n) = g(n)+h(n)

  • 1

    2

  • Wall (1,5) (7,5)

    7

    6

    5

    4

    3

    2

    1

    1 2 3 4 5 6 7

  • Wall

    f = 7.1 g = 1 h =6.1

    f = 6.5 g = 1.4 h =5.1

    (1,5) f = 6 g = 1 h =5

    (7,5)

    f = 7.1 g = 1 h =6.1

    f = 6.5 g = 1.4 h =5.1

    7

    6

    5

    4

    3

    2

    1 1 2 3 4 5 6 7

  • Wall

    f = 7.1 g = 1 h =6.1

    f = 6.5 g = 1.4 h =5.1

    f = 6.5 g = 2.4 h = 4.1

    (1,5) f = 6 g = 1 h =5

    f = 6 g = 2 h = 4

    (7,5)

    f = 7.1 g = 1 h =6.1

    f = 6.5 g = 1.4 h =5.1

    f = 6.5 g = 2.4 h = 4.1

    1 2 3 4 5 6 7

    7

    6

    5

    4

    3

    2

    1

  • f = 9.2 g = 3.4 h =5.4

    f = 7.9 g = 2.8 h =5.1

    Wall

    f = 7.1 g = 1 h =6.1

    f = 6.5 g = 1.4 h =5.1

    f = 6.5 g = 2.4 h = 4.1

    (1,5) f = 6 g = 1 h =5

    f = 6 g = 2 h = 4

    f = 11 g = 9 h =2

    f = 9.6 g = 8.6 h = 1

    (7,5)

    f = 7.1 g = 1 h =6.1

    f = 6.5 g = 1.4 h =5.1

    f = 6.5 g = 2.4 h = 4.1

    f = 9.4 g = 7.2 h = 2.2

    f = 9 g = 7.6 h = 1.4

    f = 9.6 g = 8.6 h = 1

    f = 9.2 g = 3.8 h =5.4

    f = 7.9 g = 3.4 h =4.5

    f = 9 g = 6.2 h = 2.8

    f = 9.9 g = 7.2 h = 2.2

    f = 1 g =9 h =2

    f = 10.6 g = 4.8 h =5.8

    f = 9.4 g = 4.4 h =5

    f = 9 g = 4.8 h = 4.2

    f = 9.4 g = 5.8 h = 3.6

    f = 10.8 g = 7.6 h = 3.2

    f = 10.9 g = 5.2 h = 5.7

    f = 10.8 g = 5.8 h = 5

    f = 10.7 g = 6.2 h = 4.5

    1 2 3 4 5 6 7

    7

    6

    5

    4

    3

    2

    1

  • A*: f = g + h

    g total cost from start

    h heuristic

    A* with terrain cost: f = g + h

    g total cost from start + terrain cost

    h heuristic

    terrain

  • A* f = g + h

    g = total cost from start

    h = heuristic

  • A* f = g + h

    g = total cost from start

    h = heuristic

    g = 1 h = 3 f = 4

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 1 h = 4 f = 5

    g = 1

    h = 4

    f = 5

  • A* f = g + h

    g = total cost from start

    h = heuristic

    g = 2 h = 4 f = 6

    g = 2

    h = 4

    f = 6

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 2

    h = 3

    f = 5

    g = 2

    h = 4

    f = 6

    g = 1 h = 4 f = 5

    g = 1 h = 4 f = 5

    g = 2

    h = 3

    f = 5

  • A* f = g + h

    g = total cost from start

    h = heuristic

    g = 3

    h = 5

    f = 8

    g = 3

    h = 4

    f = 7

    g = 3

    h = 3

    f = 6

    g = 3

    h = 5

    f = 8

    g = 2 h = 4 f = 6

    g = 3

    h = 5

    f = 8

    g = 2 h = 4 f = 6

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 2

    h = 3

    f = 5

    g = 3 h = 5 f = 8

    g = 2 h = 4 f = 6

    g = 1

    h = 4

    f = 5

    g = 1

    h = 4

    f = 5

    g = 2

    h = 3

    f = 5

  • A* f = g + h

    g = total cost from start

    h = heuristic

    g = 4 h = 4 f = 8

    g = 4

    h = 3

    f = 7

    g = 4

    h = 2

    f = 6

    g = 3

    h = 5

    f = 8

    g = 3

    h = 4

    f = 7

    g = 3

    h = 3

    f = 6

    g = 4

    h = 2

    f = 6

    g = 3 h = 5 f = 8

    g = 2

    h = 4

    f = 6

    g = 3 h = 5 f = 8

    g = 2

    h = 4

    f = 6

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 2

    h = 3

    f = 5

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 1

    h = 4

    f = 5

    g = 1

    h = 4

    f = 5

    g = 2

    h = 3

    f = 5

  • A* f = g + h

    g = total cost from start

    h = heuristic

    g = 5

    h = 3

    f = 8

    g = 5

    h = 2

    f = 7

    g = 5

    h = 1

    f = 6

    g = 4

    h = 4

    f = 8

    g = 4

    h = 3

    f = 7

    g = 4

    h = 2

    f = 6

    g = 5

    h = 1

    f = 6

    g = 3

    h = 5

    f = 8

    g = 3

    h = 4

    f = 7

    g = 3

    h = 3

    f = 6

    g = 4

    h = 2

    f = 6

    g = 5

    h = 1

    f = 6

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 2

    h = 3

    f = 5

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 1

    h = 4

    f = 5

    g = 1 h = 4 f = 5

    g = 2

    h = 3

    f = 5

  • A* f = g + h

    g = total cost from start

    h = heuristic

    g = 5

    h = 3

    f = 8

    g = 5

    h = 2

    f = 7

    g = 5

    h = 1

    f = 6

    g = 4

    h = 4

    f = 8

    g = 4

    h = 3

    f = 7

    g = 4

    h = 2

    f = 6

    g = 5

    h = 1

    f = 6

    g = 3

    h = 5

    f = 8

    g = 3

    h = 4

    f = 7

    g = 3

    h = 3

    f = 6

    g = 4

    h = 2

    f = 6

    g = 5

    h = 1

    f = 6

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 1

    h = 3

    f = 4

    g = 2

    h = 3

    f = 5

    g = 3

    h = 5

    f = 8

    g = 2

    h = 4

    f = 6

    g = 1

    h = 4

    f = 5

    g = 1

    h = 4

    f = 5

    g = 2

    h = 3

    f = 5

  • A*: f = g + h

    g total cost from start

    h heuristic

    ??

  • A* f = g + h

    g = total cost from start + terrain cost

    h = heuristic

    3

    1 3 1 1 5

    1 1 5 1 1 1

    1

    1 1 3 1 1 1 3

    1

    1 5

    5

    1 3 3 1 3 1

    1

    5 1 1 1 1

  • A* f = g + h

    g = total cost from start + terrain cost

    h = heuristic

    3

    1 3 1 1 5

    1 1 5 1 1 1

    1

    1 1 3 1 1 1 3

    1

    1 5

    5

    1 3 3 g =

    h =

    f =

    1 g =

    h =

    f =

    3 g =

    h =

    f =

    1

    1

    5 1 1 g =

    h =

    f =

    1 g =

    h =

    f =

    1

  • A* f = g + h

    g = total cost from start + terrain cost

    h = heuristic

    3

    1 3 1 1 5

    1 1 5 1 1 1

    1

    1 1 3 1 1 1 3

    1

    1 5

    5

    1 3 3 g = 3

    h = 3

    f = 6

    1 g = 1

    h = 3

    f = 4

    3 g = 3

    h = 3

    f = 6

    1

    1

    5 1 1 g = 1

    h = 4

    f = 5

    1 g = 1

    h = 4

    f = 5

    1

  • A* f = g + h

    g = total cost from start + terrain cost

    h = heuristic

    3

    1 3 1 1 5

    1 1 5 1 1 1

    1

    1 1 3 1 1 1 3

    1

    1 5 g = 8

    h = 4

    f = 12

    5

    1 3 g = 4

    h = 4

    f = 8

    3 g = 3

    h = 3

    f = 6

    1 g = 1

    h = 3

    f = 4

    3 g = 3

    h = 3

    f = 6

    1 g = 2

    h = 3

    f = 5

    1

    5 1 g = 2

    h = 4

    f = 6

    1 g = 1

    h = 4

    f = 5

    1 g = 1

    h = 4

    f = 5

    1 g = 2

    h = 4

    f = 6

  • A* f = g + h

    g = total cost from start + terrain cost

    h = heuristic

    3

    1 3 1 1 5

    1 1 5 1 1 1

    1

    1 1 3 1 1 1 3

    1

    1

    5 g = 8

    h = 4

    f = 12

    5

    1 g = 3

    h = 5

    f = 8

    3 g = 4

    h = 4

    f = 8

    3 g = 3

    h = 3

    f = 6

    1 g = 1

    h = 3

    f = 4

    3 g = 3

    h = 3

    f = 6

    1 g = 2

    h = 3

    f = 5

    1

    5 g = 7

    h = 5

    f = 12

    1 g = 2

    h = 4

    f = 6

    1 g = 1

    h = 4

    f = 5

    1 g = 1

    h = 4

    f = 5

    1 g = 2

    h = 4

    f = 6

  • A* f = g + h

    g = total cost from start + terrain cost

    h = heuristic

    3

    1 3 1 1 5

    1 1 5 1 1 1

    1

    1 1 3 1 1 1 3

    1 g = 4

    h = 6

    f = 10

    1 g = 4

    h = 5

    f = 9

    5 g = 8

    h = 4

    f = 12

    5 g = 8

    h = 6

    f = 14

    1 g = 3

    h = 5

    f = 8

    3 g = 4

    h = 4

    f = 8

    3 g = 3

    h = 3

    f = 6

    1 g = 1

    h = 3

    f = 4

    3 g = 3

    h = 3

    f = 6

    1 g = 2

    h = 3

    f = 5

    1 g = 4

    h = 6

    f = 10

    5 g = 7

    h = 5

    f = 12

    1 g = 2

    h = 4

    f = 6

    1 g = 1

    h = 4

    f = 5

    1 g = 1

    h = 4

    f = 5

    1 g = 2

    h = 4

    f = 6