程序代写代做代考 AI algorithm Question 1: Knowledge Representation

Question 1: Knowledge Representation
1.
subclass
fuel-type subclass
car
weight
medium m
vehicle
subclass
petrol
bicycle
weight
light
weight
heavy
lorry
fuel-type
diesel
fuel-type
human
Lorry, car, bicycle are 3 kinds of vehicle. Lorry is heavy and use diesel, car has medium Weight and use petrol, because it has default fuel-type, so the fuel-type is not drawn for car. Bicycle is light and ride by human.
2.
Semantic networks is a kind of hierarchical representation and there is psychological evidence that humans also organize their knowledge hierarchically.
There is evidence about the response time from empirical experiments
There is evidence about the correct association of concepts from empirical experiments
Brain surgery suggests a hierarchical decomposition of knowledge into concepts 3.
The main difference is that Frame has a set of slots and slots have values.
Question 2: Probabilistic Reasoning
1. P(¬S)=1-P(S)=1–0.7=0.3
P(¬T|¬S) = 1 – P(T|¬S) = 1 – 0.01 = 0.99 P(T) = P(T|S) + P(T|¬S) = 0.1 + 0.01 = 0.11

2. P(S|T) = P(S) P(T|S)/P(T) From Bayes Theorem = 0.7*0.1 / 0.11
= 7/11 = 0.64 (rounded to 2 decimal) Question 3: Planning
1.
1:[2] 2:[1] 3:[]
1:[2,1] 2:[] 3:[]
1:[2] 2:[] 3:[1]
1:[2,1] 2:[] 3:[]
1:[] 2:[1] 3:[2]
1:[1] 2:[] 3:[2]
1:[2] 2:[1] 3:[]
1:[2] 2:[] 3:[1]
1:[2] 2:[1] 3:[]
1:[] 2:[2] 3:[1]
1:[]
2:[] 3:[2,1]
1:[2] 2:[1] 3:[]
2.
The correct goal state can be reached within two actions. The path is indicated by 2 arrows in the above graph.
The actions are: move(2, 3) move(1, 3)
Depth-First search: Start from the root, visit the first child node and recursively search the subtree rooted at first child, then search other child and its subtree. It
continues to search until find a solution or have visited every node in the tree. Question 4: Logic Programming
1. Yes,w is a unifier of the two atoms. Because
t1 = w(p(A, q(Y, a))) = p(q(a, a), q(a,a)) t2 = w(p(q(a, Y), A)) = p(q(a, a), q(a,a))
2.
p
q
(p->q)^( ¬p^q)

T
T
F
T
F
F
F
T
T
F
F
F
Because the result truth value can be true or false, so it is neither a tautology nor a contradiction.
Question 5: Search
1. The difference is that depth-first search first search the child and its subtree and
then other child. Breadth-first search first visit level 1 nodes, then level 2 nodes until the last level.
Depth first: A B D E G C F
Breath first: A B C D E F G
2. Cost means the distance from source node to this node.
3. Update the cost of its neighbouring nodes.
4. A* algorithm not only considers the distance from source like Dijksta’s algorithm , but also consider the node’s distance to the goal, it choose nodes that have the minimum sum of the two kinds of cost, thus favours the node that is close to the goal which is better than Dijksta’s algorithm.
Question 6: Games AI
1. Because video games are interactive, users need immediate feedback from computer, thus computational speed is very important.
2. Some previous existing edges may be removed, if there is removed edge on

the path calculated by A*, then the path is invalidated. So the A* need to recomputed all over again, which could result in unacceptable computational overhead.
3. I suggest to keep several best paths, thus if there is one invalidated, there is other path that is still valid.