آموزش هوش مصنوعی - بخش سوم

  • View
    50

  • Download
    0

Embed Size (px)

Text of آموزش هوش مصنوعی - بخش سوم

  • faradars.org/fvsft102

    :

    :

    1

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    2

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    3

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    :

    goal)1. formulation):

    problem)2. formulation):

    .)(:(search)3.

    .:(execute)4.

    4

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    :

    5

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    : ():Arad():Bucharest::::Arad, Sibiu, Fagaras, Bucharest

    6

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    function SIMPLE-PROBLEM-SOLVING-AGENT(percept) return an action

    static: seq , an action sequence

    state, some description of the current world state

    goal, a goal

    problem, a problem formulation

    state UPDATE-STATE(state, percept)if seq is empty then

    goal FORMULATE-GOAL(state)

    problem FORMULATE-PROBLEM(state , goal)

    seq SEARCH(problem)

    action FIRST(seq)

    seq REST(seq)return action

    7

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    1)2)3)4)5)

    8

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    9

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    10

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    Single): State)(Sensorless/Conformant):(Contingency):(Exploration/Online):

    11

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    5:][

    12

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    {8....21}:][:

    13

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    14

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    15

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    {31}:

    ()

    :

    16

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    17

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    18

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    .initial) state):Aradsuccessor) function):goal) test):(explicit)

    (implicit)path) cost):C(x, a, y)..:(solution)optimal) solution):.

    19

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    : 8::{}:{87}::

    20

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    : ::{}:::

    21

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    8: 1):::8:-:

    22

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    8: 1))):::8:-:100.

    23

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    8: 2):8:::-:

    24

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    : :::::

    25

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    26

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    27

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    =..

    ()

    28

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    function SIMPLE-PROBLEM-SOLVING-AGENT(percept) return an action

    static: seq , an action sequence

    state, some description of the current world state

    goal, a goal

    problem, a problem formulation

    state UPDATE-STATE(state, percept)if seq is empty then

    goal FORMULATE-GOAL(state)

    problem FORMULATE-PROBLEM(state , goal)

    seq SEARCH(problem)

    action FIRST(seq)

    seq REST(seq)return action

    29

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    function SIMPLE-PROBLEM-SOLVING-AGENT(percept) return an action

    static: seq , an action sequence

    state, some description of the current world state

    goal, a goal

    problem, a problem formulation

    state UPDATE-STATE(state, percept)if seq is empty then

    goal FORMULATE-GOAL(state)

    problem FORMULATE-PROBLEM(state , goal)

    seq SEARCH(problem)

    action FIRST(seq)

    seq REST(seq)return action

    30

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    function TREE-SEARCH(problem, strategy) return a solution or failureInitialize search tree to the initial state of the problemdo

    if no candidates for expansion then return failureelse choose leaf node for expansion according to strategyif node contains goal state then return solutionelse expand the node and add resulting nodes to the search tree

    end do

    31

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    :

    32

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    function TREE-SEARCH(problem, strategy) return a solution or failureInitialize search tree to the initial state of the problemdo

    if no candidates for expansion then return failureelse choose leaf node for expansion according to strategyif node contains goal state then return solutionelse expand the node and add resulting nodes to the search tree

    end do

    33

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    34

    function TREE-SEARCH(problem, strategy) return a solution or failure

    Initialize search tree to the initial state of the problem

    do

    if no candidates for expansion then return failure

    else choose leaf node for expansion according to strategy

    if node contains goal state then return solution

    else expand the node and add resulting nodes to the search tree

    enddo

    .

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    35

    function TREE-SEARCH(problem, strategy) return a solution or failure

    Initialize search tree to the initial state of the problem

    do

    if no candidates for expansion then return failure

    else choose leaf node for expansion according to strategy

    if node contains goal state then return solution

    else expand the node and add resulting nodes to the search tree

    enddo

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    function SIMPLE-PROBLEM-SOLVING-AGENT(percept) return an action

    static: seq , an action sequence

    state, some description of the current world state

    goal, a goal

    problem, a problem formulation

    state UPDATE-STATE(state, percept)if seq is empty then

    goal FORMULATE-GOAL(state)

    problem FORMULATE-PROBLEM(state , goal)

    seq SEARCH(problem)

    action FIRST( seq )

    seq REST(seq)return action

    36

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    (2)

    37

    function TREE-SEARCH(problem, fringe) return a solution or failure

    fringe INSERT(MAKE-NODE(INITIAL-STATE[problem]), fringe)

    loop do

    if EMPTY?(fringe) then return failure

    node REMOVE-FIRST(fringe)

    if GOAL-TEST[node] then

    return SOLUTION(node)

    else

    fringe INSERT-ALL(EXPAND(node, problem), fringe)

    Insert_All(Expand( Goal Test( Remove-First(

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    38

    function TREE-SEARCH(problem, strategy) return a solution or failure

    Initialize search tree to the initial state of the problem

    do

    if no candidates for expansion then return failure

    else choose leaf node for expansion according to strategy

    if node contains goal state then return solution

    else expand the node and add resulting nodes to the search tree

    enddo

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102 (

    ...S:Suck:S:

    39

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    (state)

    .

    .(node).

    (FRINGE)().

    40

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    41

    function EXPAND(node,problem) return a set of nodes

    successors the empty set

    for each in SUCCESSOR-FN[problem](STATE[node]) do

    s a new NODE

    STATE[s] result

    PARENT-NODE[s] node

    ACTION[s] action

    PATH-COST[s] PATH-COST[node] + STEP-COST(node, action,s)

    DEPTH[s] DEPTH[node]+1

    add s to successors

    return successors

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    ..()

    :1):2)

    /:3):4)

    42

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    :(b):(d):(m):))

    43

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    .()

    .()

    44

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    Breadth-first)1. search)Uniform-cost)2. search)Depth-first)3. search)Depth-limited)4. search)Iterative)5. deepening search)Bidirectional)6. search)

    45

    FaraDars.org

  • faradars.org/fvsft102

    faradars.org/fvsft102

    ( 1FIFO(

Search related