…and quokkas! 🙂
Copyright By PowCoder代写 加微信 powcoder
B2 C1 D1 14
E5 F3 G5 H3 21761
I5 J4 K L9 M4 10
Tip: when doing this on paper, you can add up the total cost to each node from the root first (orange numbers). Then, the solution will be the nodes in order of increasing cost
Quokka Quote:
With quokkas, there¡¯s no need to kanga-rue your AI practice! 😀
H(4)I(5) J(0)K(1)
E (1) F (1)
H(4)I(5) J(0)K(1)
E (1) F (1)
H(4)I(5) J(0)K(1)
E (1) F (1)
H(4)I(5) J(0)K(1)
E (1) F (1)
(1)1E3 F(0)G(2) H I(2)
(3) B (2)C D (0) (2)1 7 4
(1)1E3 F(0)G(2) H I(2)
(3) B (2)C D (0) (2)1 7 4
E (0)F G H(8) I
(3) (12) (1)
BCD1 17(4)41 (2)
(0) J K (0)
E (0)F G H(8) I
(3) (12) (1)
BCD1 17(4)41 (2)
(0) J K (0)
(to find a minimum)
A (20) (1)
E (0) F (1)
H(4)I(5) J(0)K(1)
(to find a minimum)
A (20) (1)
E (0) F (1)
H(4)I(5) J(0)K(1)
(to find a minimum, with k=2)
A (20) (1)
E (0) F (1)
H(4)I(5) J(2)K(3)
(to find a minimum, with k=2)
A (20) (1)
E (0) F (1)
H(4)I(5) J(2)K(3)
(3) B (2)E
(2)C D (10)
F (0) G(2) (2)
(3) B (2)E
(2)C D (10)
F (0) G(2) (2)
(0) J K (0)
(4) (8) (2)
(0) J K (0)
(4) (8) (2)
OO OO OOOO
Fitness function: the number of pairs of non-attacking queens
Selection: select for crossover a) the fittest and second most fit individual and b) the fittest and third most fit individual
Crossover: cross the first two columns of each individual with the last two columns of the other Mutation: Move the queen in the third column down by one
OO OO OOOO
Short Answer:
OOOOO OOO O
Explanation:
The fitness levels of the original individuals are: 5, 4, 2 and 3. We cross the fittest individual (1) with the second most fit (2) and perform the mutation step:
Fitness function: the number of pairs of non-attacking O
queens O O OO
Selection: select for crossover a) the fittest and second most fit individual and b) the fittest and third most fit individual
Crossover: cross the first two columns of each individual with the last two columns of the other Mutation: Move the queen in the third column down by one
We do the same for the fittest individual (1) and the third most fit (4) and end up with the new population above
0.78 0.32 0.26 0.67 0.49 0.72 0.95 0.02 0.51 0.28 0.81 0.39 0.32
To choose a random successor of a node
1. List all the successors of that node (Order them alphabetically) eg. A B C D
2. Take the next random number from the list eg. 0.22
3. Multiply that number by the number of successors eg. 0.22
4. round the result down to the nearest integer eg. 0
5. choose the successor corresponding to that number eg. A
To decide whether to accept a ¡°bad¡± successor
1. calculate p using the formula to the left
2. take the next random number from the list
3. if that random number is less than p, accept the successor
(10)S C (14)
(9) B D(20)
(10)S C (14)
(9) B D(20)
(10) E(0) F(0) D
(10) E(0) F(0) G(0) D¡Þ 0 ¡Þ 0
(1000) E(0) D
F(13) G(0)
(1000) E(0) F(13) G(0) D¡Þ 0 ¡Þ 0
(0) E(0) D
F(13) G(0)
(0) E(0) F(13) G(0) D¡Þ 0 ¡Þ 0
Quokka Quote:
I HOP you¡¯re enjoying these questions!
0 A 3 (100) B (0) B
(1000) E(0) D
(1000) E(0) F(4) G(0) D1019 6 11 23
(12) E(0) D
F(20) G(0)
(12) E(0) F(20) G(0) D31 6 27 23
(5) (18) (15) BC
(0) G(0) DEF
(10) (10) (0) (0) (4) (4)
(5) (18) (15) BC
(0) G(0) DEF
(10) (10) (0) (0) (4) (4)
(5) (14) (8) BC
(0) G(0) DEF
(8) (70) (0) (0) (4) (4)
(5) (14) (8) BC
(0) G(0) DEF
(8) (70) (0) (0) (4) (4)
(5) f(S) = 0 + 5 = 5
Here, the heuristic is consistent because the f-values are non-decreasing, but it¡¯s not admissible because the heuristic overestimates the cost to the goal nodes.
NOTE: the slides aren¡¯t actually wrong! But why? What¡¯s wrong with this argument?
f(A) = 1 + 5 = 6 f(B) = 2 + 5 = 7
f(G) = 3 + 5 = 8
(5) f(S) = 0 + 5 = 5
Here, the heuristic is consistent because the f-values are non-decreasing, but it¡¯s not admissible because the heuristic overestimates the cost to the goal nodes.
NOTE: the slides aren¡¯t actually wrong! But why? What¡¯s wrong with this argument?
f(A) = 1 + 5 = 6 f(B) = 2 + 5 = 7
f(G) = 3 + 5 = 8
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com