15
COMP 4180 UNIVERSITY OF MANITOBA Final Exam Fall 2009 COMPUTER SCIENCE Intelligent Mobile Robotics Paper No.: Date: 9th December Time: 11:00 - 14:00 Room: EITC E2-461, University of Manitoba (Time allowed: 180 Minutes) NOTE: Attempt all questions. This is an open book examination. Use of calculators is permitted. Use of other electronic devices is not permitted. Show your work to receive full marks. SURNAME: FORENAME(S): STUDENT ID: A B C D E Total 20 20 20 20 20 100 CONTINUED

UNIVERSITY OF MANITOBA Final Exam

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

COMP 4180

UNIVERSITY OF MANITOBAFinal Exam

Fall 2009

COMPUTER SCIENCE

Intelligent Mobile Robotics

Paper No.:Date: 9th DecemberTime: 11:00 - 14:00Room: EITC E2-461, University of Manitoba

(Time allowed: 180 Minutes)

NOTE: Attempt all questions.This is an open book examination.Use of calculators is permitted.Use of other electronic devices is not permitted.Show your work to receive full marks.

SURNAME:

FORENAME(S):

STUDENT ID:

A B C D E Total20 20 20 20 20 100

CONTINUED

QUESTION/ANSWER SHEET COMP 41802

Section A: Miscalleneous

1. Translation and rotation of a coordinate system in 2D space can be represented using homogeneouscoordinates and a 3x3 transformation matrix.

Assume that a coordinate system is first rotated by 20o counter clockwise around the origin. Then thecoordinate system is translated by the vector T1 = [−2, 3]. Then the coordinate system is rotated by−30o counter clockwise around the origin resulting in the coordinate system C ′

Assuming that the point P has the coordinates shown in the answer box below in the original coordinatesystem C, calculate the coordinates of the point P in the new coordinate system C ′ as described above.

[7 marks]

PC = (1, 3)PC′ = (3.70, 1.53)

2. The figure below shows a screenshot of the Korean TV program KAIST (a drama series based on thelife of students in the robotics lab). The Korean actress playing Prof. Kim Yong Jwan’s role is currentlydiscussing the kinematic equations for differential drive robots.

Unfortunately, she is blocking part of the whiteboard. Help the audience by completing the missinginformation so that it fits the formulas shown on the whiteboard.

The information from the whiteboard is reproduced in the answerbox.

If it is impossible to complete the missing information or if the information on the whiteboard isincorrect, then say so in your answer and explain why.

CONTINUED

QUESTION/ANSWER SHEET COMP 41803

[8 marks]

VL = r − ωL VR = r + ωL

ω =VR − VL

2L xy

θ

=

cosθ 0sinθ 00 1

[ rω

]

3. What is the physical interpretation of the variable L in the formulas given above.

[5 marks]

L represents the half the width of the robot

Section B: Fuzzy Control

Given are three fuzzy sets Small, Medium, and Large as shown in the figure below.

CONTINUED

QUESTION/ANSWER SHEET COMP 41804

4. Given these fuzzy sets and the rules shown below, complete the table to calculate the α-values for allrules, using Min-Max inferencing.

Rule 1: if x is Small and y is Large then z is LargeRule 2: if x is Medium and y is Medium then z is SmallRule 3: if x is Small and y is Large then z is Large

[5 marks]

x y mS(x) mM(x) mM(y) mL(y) α1 α2 α3

5 3 0.50 0.75 0.25 0.25 0.25 0.25 0.25

2 5 0.80 0.00 0.75 0.45 0.45 0.00 0.45

5 5 0.50 0.75 0.75 0.45 0.45 0.75 0.45

5. For a given input, the alpha values for rules 1 to 3 are: α1 = 0.3,α2 = 0.8,α3 = 0.8. Show the fuzzyset that is assigned to z by composing the results of all three rules. Use Min-Max inferencing.

[5 marks]

CONTINUED

QUESTION/ANSWER SHEET COMP 41805

6. Given your answer to question 5, what is the crisp output value of z using centroid defuzzification.

[5 marks]

c =0 ∗ 0.8 + 1 ∗ 0.8 + 2 ∗ 0.8 + 3 ∗ 0.7 + 4 ∗ 0.6 + 5 ∗ 0.5 + 6 ∗ 0.8 + 7 ∗ 0.8 + 8 ∗ 0.8 + 9 ∗ 0.8 + 10 ∗ 0.8

0.8 + 0.8 + 0.8 + 0.7 + 0.6 + 0.5 + 0.8 + 0.8 + 0.8 + 0.8 + 0.8

=37.1

6.4= 5.04

7. The centroid defuzzification method for the discrete case uses the following formula:

cog0 =

∑+∞−∞ f(x)x∑+∞−∞ f(x)

It is also apparent that we can shift the curve up or down by a constant k, yielding a new centre ofgravity.

cogk =

∑+∞−∞[(f(x) + k)(x)]∑+∞−∞[f(x) + k]

Prove the following relationship between cog0 and cogk

cogk = cog0

If it is impossible to prove this relationship or if this relationship is wrong, then say so in your answerand explain why.

[5 marks]

CONTINUED

QUESTION/ANSWER SHEET COMP 41806

This statement is wrong. A simple counter example will prove it.

Section C: Control Theory

8. Given is the following CMAC controller and associated CMAC table.

CONTINUED

QUESTION/ANSWER SHEET COMP 41807

Label ValueAa 0Ab 1Ac 2Ad -2Ae -5Ba 7Bb 8Bc 4Bd -20Be -5Ca 4Cb 3Cc -8Cd -4Ce -10Da 3Db 2Dc 1Dd 28De 20

Label ValueEa -4Eb 18Ec 0Ed 1Ee -1Fa -2Fb 3Fc -4Fd 5Fe 6Ga 7Gb 8Gc 9Gd 10Ge 11

Calculate the output of the CMAC controller for 1.2m and 55o?

[10 marks]

Output of the controller is 0+-2+4+-4+-4+1=-5

9. A CMAC controller generates the output shown in the figure below. As shown in the figure, the CMACcontroller uses 10 tiles. Unfortunately, the values in the tiles were scrambled. Can you assign thecorrect value to the correct cells in the CMAC table.

If it is impossible to assign values to table entries so that the CMAC generates the output shown below,then say so and explain why in your answer.

CONTINUED

QUESTION/ANSWER SHEET COMP 41808

[10 marks]

CONTINUED

QUESTION/ANSWER SHEET COMP 41809

Section D: Path Planning

10. Bicchi’s path planner uses tangent lines between circles to create feasible paths for the robot. Assumea car-like robot that can drive backwards and forwards. The minimum turn radius of the car-like robotis 1.00m. The steering angle of the car is limited to be full right, straight ahead, or full left.

The initial state (x, y, θ)of the car is given by I = (2.5m, 0.13, 30o). The goal state of the robot isG = (0, 0, 0o).

Calculate the length of the shortest path between the initial state and the goal state for the car-like robot.If it is impossible to calculate the length of the shortest path then say so in your answer and explainwhy.

[10 marks]

CONTINUED

QUESTION/ANSWER SHEET COMP 418010

The length of the shortest path for the car-like robot is: 2.52m

11. You are using the quad-tree decomposition algorithm as described in lectures. You are given an en-vironment and several obstacles shown in the figure below. The obstacles can be rotated by 90o andflipped horizontally or vertically. Obstacles must not overlap.

The free cell 1 to obstacle ratio r is defined as the number of free cells of size 1 square to the numberof squares occupied by obstacles (Note, not the number of obstacles in the world).

You must place at least one obstacle into the world, so that ‖Obs‖ ≥ 1.

r =‖FC1‖‖Obs‖

Given the set of obstacles shown in the figure, what is the maximum free cell 1 to obstacle ratio rthat can be achieved by adding at least one piece into the environement shown below. One obstacle isalready shown in the environment with an associated free cell 1 to obstacle ratio r = 2.

[10 marks]

Section E: Reinforcement Learning

12. The online TD(λ) reinforcement learning algorithm using an ε-greedy policy is shown below.

CONTINUED

QUESTION/ANSWER SHEET COMP 418011

∀s, a Q(s, a) := 0do Repeat for each episode∀s, a e(s, a) := 0s := Start state, a := First actiondo Repeat for each state in the episode

Take action a, observe r, and s’Choose a’ from s’ using e-greedy policyδ := r + γQ(s′, a′)−Q(s, a)e(s, a) := e(s, a) + 1do ∀s, a

Q(s, a) := Q(s, a) + αδe(s, a)e(s, a) := e(s, a) ∗ λγ

ods := s′, a := a′

odod

Below is a trace of the TD(λ) algorithm for a short episode. Show the Q-table and eligibility values for eachstate action pair after the robot reaches the end of the sequence. The TD(λ) algorithm uses the followingparameters: α = 0.8, λ = 0.5, γ = 0.8.

If it is impossible to determine the Q values and elgibilities, then say so in your answer and explain why.

[5 marks]

CONTINUED

QUESTION/ANSWER SHEET COMP 418012

Q-TableQ(s, a) S0 S1 S2Left 0.00 0.00 -45.54Right 1.60 0.00 0.00Up 0.00 0.00 0.00Down 0.00 -12.26 0.00

Eligibilitye(s, a) S0 S1 S2Left 0.00 0.00 0.07Right 0.16 0.00 0.00Up 0.40 0.00 0.00Down 0.00 0.03 0.00

CONTINUED

QUESTION/ANSWER SHEET COMP 418013

13. Given below are the Q-Table and eligibility traces of a reinforcement learner. The reinforcement learner usesthe following parameters: α = 0.8, γ = 0.8, and λ = 0.5.

Q-TableQ(s, a) S0 S1 S2Left 0.00 0.00 0.00Right 6.81 0.00 0.00Up 17.03 97.29 0.00Down 0.00 0.00 0.00

Eligibilitye(s, a) S0 S1 S2Left 0.00 0.00 0.00Right 0.06 0.00 0.00Up 0.16 0.43 0.00Down 0.00 0.00 0.00

The last action of the robot was to move Left in state S2. Is it possible to determine the previous actionsof the robot. Show the previous state - action pairs of the robot as far back as possible. In other words, whatstate was the robot in and what action did it execute in the previous to last step? How far back can you tracethe execution of the robot given the information in the table above.

[10 marks]

The sequence of states and actions was(S1,Up,)(S0,Right),(S0,Up),(S1,Up),(S2,Left)

CONTINUED

QUESTION/ANSWER SHEET COMP 418014

Additional work pages

CONTINUED

QUESTION/ANSWER SHEET COMP 418015

Additional work pages