0% found this document useful (0 votes)
4 views

A2-24S3-test-template

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

A2-24S3-test-template

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

RMIT Classification: Trusted

RMIT Vietnam University


School of Science, Engineering and Technology

COSC – Artificial Intelligence


Type of test: Paper-based, in-class test
Content: Knowledge Representation & Reasoning and Probability
Duration: 75 minutes
This assignment is worth 30% of your overall mark.

Student name:

Student ID:
RMIT Classification: Trusted

Important information
About this document: You must ALWAYS keep your work private and never share it with
anybody in or outside the course, except your teammates (if it is a teamwork project), even
after the course is completed. You are not allowed to make another repository copy outside
the provided Classroom without the written permission of the teaching staff.

Please do not distribute or post solutions to any of the projects.


Corrections: From time to time, students or staff find errors (e.g., typos, unclear instructions,
etc.) in the assignment specification. In that case, a corrected version of this file will be
produced, announced, and distributed to you. Because of that, you are NOT to modify this file
in any way to avoid conflicts.

Late submissions & extensions: Not allowed. Extensions will only be permitted
in exceptional circumstances under the University’s rules.

Academic Dishonesty: This is an advanced course, so we expect full professionalism and


ethical conduct. Plagiarism is a serious offense. We will pursue the strongest consequences
available according to the University Academic Integrity policy. In a nutshell, never look at
a solution done by others, either in (e.g., classmate) or outside (e.g., web, AI tools) the course:
they have already done their learning, this is your opportunity!

Code of Honour
We expect every RMIT student taking this course to adhere to the Code of Honour under
which every learner-student should:

• Submit their own original work.


• Do not share answers with others.
• Report suspected violations.
• Not engage in any other activities that will dishonestly improve their results or dishonestly
improve or damage the results of others.

Submission
Submit solutions for your Assignment 2 in the exam paper provided to you. You must provide
your name is your student number on the first page of this paper.
RMIT Classification: Trusted

Part 1: Propositional Logic


Basic logic: P, Q, R are sentences in propositional logic.

1. The following are true

A. Yes

B. No

2. This sentence is valid or satisfiable?

Solution:

3. Given two sentences α and β, what does this mean: α ⊨ β?

A. α entails β

B. M(α) ⊆ M(β)

C. α is satisfied in all models of β.

D. α may be satisfied in other models (as well).

4. Is it possible that: (KB ⊧ S) and (┐KB ⊧ S)? Explain.

Solution:

5. It is believed that: (0) RUVN students are smart; (1) if you are smart and you study hard, you
will pass the final exam; (2) if you are lucky and are either smart or you study hard you will
pass the final exam.

Construct a KB of propositional sentences using the five propositional variables (RUVN, smart,
study, lucky, pass) and logical connectives (∧,∨,¬,→). Encode each of the three sentences into
one or more sentences in conjunctive normal form (CNF).
RMIT Classification: Trusted

6. (Resolution) Let P, Q, R be propositional symbols. Given

𝐾𝐵 = { 𝑃 ⇒ 𝑄, 𝑄 ⇒ 𝑅, 𝑃 𝑉 𝑄}

Use resolution, tell whether R can be derived from KB or not.


RMIT Classification: Trusted

Part 2: First-order Logic


1. Given atomic propositions (atomic sentences) a, b, c, d. Which of the following are well-formed
formulas (circle the answers)?
A. ¬(a ∨ b)
B. (¬a ↔ c ∨ d)
C. (¬(a ∨ d) ∧ a)
D. cd →

2. Choose a vocabulary of predicates, constants, and functions appropriate for representing the following
information in First-order Logic (FOL), then represent each sentence in FOL.
a) Every student studies Python programming language.
b) Every student except Yankee studies Python programming language.
Solution:

3. Resolution proofs. Given the following sentence:

Rewrite the sentence with the substitution x/A, and put the antecedent into CNF.
Solution:

4. Determine whether the sentence in Question II.3 is valid (i.e., a tautology). Provide explanation or
proof.
Solution:

5. (Unification) Inference with FOL resolution (KB |= α)


Given KB in FOL as following:
RMIT Classification: Trusted

¬P(w) ∨ Q(w)
¬Q( y) ∨ S ( y)
P( x) ∨ R( x)
¬R(z) ∨ S (z)
Prove: S(A).

Part 3: Automated Planning


1. The task of constructing a plan can be formulated as a state space search problem. What is state
space?

Question 2-4. Consider the Blocks World problem. Suppose we use the predicates in logic to
represent states as in Tutorial No. 06 of this course.

Intitial state Goal state

2. Represent the Initial state and the Goal state.


RMIT Classification: Trusted

3. Write logical representation of pickup and putdown actions.

4. Is the goal state correctly defined? Explain.

5. The blocks world is one of the most famous planning domains in artificial intelligence. It is a
NP-hard problem, and we wanted to find an intelligent solution to solve it. Several algorithms can
be used to solve the problem, such as DFS, BFS, and A*. Can you propose one heuristic to solve
the problem using A*? Provide a short description of the proposal.

Part 4: Probability
1. (Prior Probability) Probability distribution on a random variable gives the probabilities for all
the possible values of this random variable.
Given: Weather = <sunny, rainy, cloudy, snow>. Fill in the missing value p:
P(Weather) = <0.74, 0.1, p, 0.1> (normalized, i.e., sums to 1)
Solution: p =

2. Joint probability distribution on a set of random variables gives the probabilities of all
combinations of the values of those variables. P(Weather, Fever) is a 4 × 2 table of probabilities
as following. Fill in the missing value p.
Weather = sunny rainy cloudy snow
Fever = true 0.14 0.02 0.01 0.02
Fever = false 0.57 0.08 p 0.08
RMIT Classification: Trusted

Solution: p =

3. (Conditional Probability) The following statement is true or false. Explain.


If P(a| b, c) = P(a), then P(b | c) = P(b)

4. The probability of arriving on time when taking a taxi is 0.8. The probability of arriving on time
when taking a bus is 0.4. A student would take a taxi more frequently than taking a bus. On average,
for every 10 days, 7 of them are by taxi and 3 of them are by bus. What is the probability that he
will be on time in a given day?

5.

Part 5: MDPs
Consider a room-cleaning robot. It can be either in the room or at its charging station. The room
can be clean or dirty. So there are four states: RD (in the room, dirty), RC (in the room, clean),
CD (at the charger, dirty), and CC (at the charger, clean). The robot can either choose to suck up
dirt or return to its charger. Reward for being in the charging station when the room is clean is 0;
reward for being in the charging station when the room is dirty is -10; reward for other states is -
1. Assume also that after the robot has gotten a -10 penalty for entering the charging station when
the room is still dirty, it will get rewards of 0 thereafter, no matter what it does. Assume that if the
robot decides to suck up dirt while it is in the room, then the probability of going from a dirty to a
clean floor is 0.5. The return action always takes the robot to the charging station, leaving the
dirtiness of the room unchanged. The discount factor is 0.8.
1. What is value V* (CC) (the value of being in the CC state)?
2. Write the Bellman equation for V*(RC). What is value V* (RC)?
3. If V0(RD) = 0 (that is, the initial value assigned to this state is 0), what is V 1(RD), the value
of RD with one step to go (calculated via one iteration of value iteration)?

--- The End. ---

You might also like