-- Sep 20 In-Class Exercise
Algorithm to assign probability for a state:
For any state, take the values of the adjacent nodes and add them. Set this sum to total. The probability to move to an adjacent node is that node's value divided by total. Then the state will move to the node with the highest probability.
P(n) is the probability of n for the current state.
For State 1:
Total = 6 = 2 + 4
P(4) = 4/6
P(2) = 2/6
4/6 > 2/6 so @ will move from State 1 to State 4.
For State 4:
Total = 13 = 1 + 5 + 7
P(1) = 1/13
P(5) = 5/13
P(7) = 7/13
7/13 > 5/13 > 1/13 so @ will move from State 4 to State 7.
For State 7:
Total = 12 = 8 + 4
P(4) = 4/12
P(8) = 8/12
8/12 > 4/12 so @ will move from State 7 to State 8.
For State 8:
Total = 14 = 9 + 5
P(5) = 5/14
P(9) = 9/14
9/14 > 5/14 so @ will move from State 8 to State 9.
Student:Zahra Amin
(
Edited: 2017-09-20)
Algorithm to assign probability for a state:
For any state, take the values of the adjacent nodes and add them. Set this sum to total. The probability to move to an adjacent node is that node's value divided by total. Then the state will move to the node with the highest probability.
P(n) is the probability of n for the current state.
For State 1:
Total = 6 = 2 + 4
P(4) = 4/6
P(2) = 2/6
4/6 > 2/6 so @ will move from State 1 to State 4.
For State 4:
Total = 13 = 1 + 5 + 7
P(1) = 1/13
P(5) = 5/13
P(7) = 7/13
7/13 > 5/13 > 1/13 so @ will move from State 4 to State 7.
For State 7:
Total = 12 = 8 + 4
P(4) = 4/12
P(8) = 8/12
8/12 > 4/12 so @ will move from State 7 to State 8.
For State 8:
Total = 14 = 9 + 5
P(5) = 5/14
P(9) = 9/14
9/14 > 5/14 so @ will move from State 8 to State 9.
Student:Zahra Amin