Q&A – CW and Clustering
-Trenn 6CCS3AIN
c -Trenn, King’s College London
1
CW
1. Pacman is in danger
2. Help him win!
3. Deadline: Friday, 3rd December 2021 at 11pm UK time.
c -Trenn, King’s College London 2
Your turn
1. Get the new API
2. Use an MDP-solver to escape from the ghosts
3. The only MDP solvers we will allow are the ones presented in the lecture, i.e., Value iteration, Policy iteration and Modified policy iteration. In particular, Q-Learning is unacceptable.
4. Your code must be in Python 2.7.
5. Code using libraries that are not in the standard Python 2.7 distribution will not run (in particular, NumPy is not allowed). If you choose to use such libraries and your code does not run as a result, you will lose marks.
c -Trenn, King’s College London 3
K-means2 –
.
Who – Moll?z=OtF
I
•
“÷
”
i – É ” :* •I•!••
=
̈ ̨o
points:x0 “ ̋1‚x1 “ ̋1‚x2 “ ̋2‚x3 “ ̋ 1 ‚x4 “ ̋1‚x5 “ ̋2‚
to
̈ ̨ ̈ ̨ ̈ ̨ ̈ ̨ ̈ ̨
•
2 1 0 ́2 0 3
0 ̈1 ̨1 ̈2 ̨
centers
“ ̋ As
Up
As
‚μ“ ̋ ‚ 1 0.5
lko-M.lk?- 12+1.52 11,9>0
✗2242 ⇒IF> →
:μ
Up
c -Trenn, King’s College London
4
1 , 3 , 4F i t
E-E3,I, 4,5,7)→
w e a r I L ) = 3+1%+5+72 =
4
medin117= 3
0
LES
I
5
6
→
I
EJ, 6,5, 5,5, 6,5]
11000
5
105
363
+
✗
6
All
(2
Hei – pH 11 li.p l/z
500
214 t.IR/– 1000
4
500
2
–
K-means
Huo – 914^-02+32 points: x0 “ ̈ ̋1 ̨‚x1 “ ̈ ̋1 ̨‚x2 “ ̈ ̋2 ̨‚x3 “ ̈ ̋ 1 ̨‚x4 “ ̈ ̋1 ̨‚x5 “ ̈ ̋2 ̨‚
2 1 0 ́2 0 3
centers: μ0 “ ̈ ̋1 ̨‚μ1 “ ̈ ̋ 2 ̨‚ 1 0.5
yiz-z.sk? =p -12
c -Trenn, King’s College London
4
Your turn
Let’s say our data is a triangle consisting of the points
p1 “ ̈ ̋1 ̨‚, p2 “ ̈ ̋12 ̨‚, p3 “ ̈ ̋31 ̨‚ If we multiply it with ̈ ̋0 ́1 ̨‚, what do we get?
10
c -Trenn, King’s College London
5
Your turn
Let’s say our data is a triangle consisting of the points
p1 “ ̈ ̋1 ̨‚, p2 “ ̈ ̋12 ̨‚, p3 “ ̈ ̋21 ̨‚ How can reflect the points across the x-axis?
c -Trenn, King’s College London 6
Your turn
Consider the following matrix.
A “ ̈ ̋ 4 4 ̨‚ 10 ́2
v “ ̈ ̋1 ̨‚is an eigenvector. Whats the corresponding eigenvalue?
c -Trenn, King’s College London 7
Your turn
Consider the following matrix.
A “ ̈ ̋ 4 4 ̨‚ 10 ́2
Are v2 “ ̈ ̋2 ̨‚and v3 “ ̈ ̋3 ̨‚also eigenvector? How can reflect the points across the x-axis?
c -Trenn, King’s College London
8
Your turn
Consider the following matrix.
A “ ̈ ̋ 4 4 ̨‚ 10 ́2
How do you calculate Ak fast for large k?
c -Trenn, King’s College London
9