[BS ISO 16311-1] -- Maintenance and repair of concrete structures. Part 1. General principles.pdf
Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... ·...
Transcript of Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... ·...
![Page 1: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/1.jpg)
Midterm Review 26 Feb 2020
Hannah Lyness
![Page 2: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/2.jpg)
Logistics
• Midterm Time: Monday 10:30AM
• Midterm Location: Normal Classroom
• You may use 2 sides of 1 8.5x11” paper written in your own hand
• Final value: 14% of final grade
![Page 3: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/3.jpg)
Logistics (cont.)
• Test Coverage: Vision, Neural Nets, Controls, Learning for Controls, Reinforcement Learning, System engineering, Motion Planning, Graph Search, Localization, (blue indicates guest lecture)
• Test Non-Coverage: Syntax, style, proofs
![Page 4: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/4.jpg)
Vision
![Page 5: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/5.jpg)
VisionWe can store images as arrays of values
It is difficult for a computer program to identify objects (Where’s Waldo)
![Page 6: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/6.jpg)
Stereo Vision
One perpendicular distance
Two separate pictures
Corresponding triangles
![Page 7: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/7.jpg)
Example Problem
Object is 20 pixels to the right center in left image, 10 pixels from center in the right image, we are at the exact same height as the objects.
Cameras are 4 in apart with distance between lens and image plane of 2 in.
Resolution is 20 ppi.
![Page 8: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/8.jpg)
ConvolutionConvolution is like repeated elementwise multiplication and summation
Choosing the filter or kernel determines what the convolution does to the image
![Page 9: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/9.jpg)
Convolution
https://aishack.in/tutorials/image-convolution-examples/
![Page 10: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/10.jpg)
Convolution
https://aishack.in/tutorials/image-convolution-examples/
![Page 11: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/11.jpg)
Convolution
https://aishack.in/tutorials/image-convolution-examples/
![Page 12: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/12.jpg)
Neural Nets
![Page 13: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/13.jpg)
Neural Nets
![Page 14: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/14.jpg)
Neural Nets
A neural net is just a series of weights that we can tune
w2
w1
w3
w4
x1
x2
w5
w6
b2
b1
What happens here?
What happens here?
b3
What happens here?
Input
HiddenOutput
![Page 15: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/15.jpg)
Neural Nets
We start with random weights and calculate the difference between what we got and what we want.
w2
w1
w3
w4
x1
x2
w5
w6
b2
b1
What happens here?
What happens here?
b3
What happens here?
Input
HiddenOutput
![Page 16: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/16.jpg)
Neural NetsWe use backpropagation to calculate the gradient of each weight and then change each weight based on the average of the negative gradients.
w2
w1
w3
w4
x1
x2
w5
w6
b2
b1
What happens here?
What happens here?
b3
What happens here?
Input
HiddenOutput
![Page 17: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/17.jpg)
Neural Nets
There are many prebuilt neural net tools.
We used a neural net to classify hedgehogs and porcupines
We used a neural net to learn desirable actions for a cartpole
Usual set up: training data, testing data. Train then validate.
![Page 18: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/18.jpg)
Neural Nets - Caveats
Black box
Requires a lot of data, time
Can overfit
![Page 19: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/19.jpg)
Other Machine Learning Techniques
![Page 20: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/20.jpg)
Machine Learning
• Parametric vs. Non-parametric Learning
• Supervised vs. Unsupervised Learning
• Reinforcement Learning: train an agent to map observations to actions
• Imitation Learning: train an agent to copy an expert
![Page 21: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/21.jpg)
Controls
![Page 22: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/22.jpg)
Controls
PID pros
PID cons
![Page 23: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/23.jpg)
Controls
PID is great
Kp is like spring constant
Kd is like damping coefficient
Ki is like a friend that gently pulls you towards the correct path when you are converging on a different one
![Page 24: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/24.jpg)
Controls Examples
https://youtu.be/lZPtFDXYQRU?t=1m
https://youtu.be/sP1DzhT8Vzo?t=59
https://www.cs.cmu.edu/~16311/current/schedule/ppp/pid.xls
![Page 25: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/25.jpg)
Controls Review
Kp = 1Kd = 0Ki = 0
![Page 26: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/26.jpg)
Controls Review
Kp = 3Kd = 0Ki = 0
![Page 27: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/27.jpg)
Controls Review
Kp = 6Kd = 0Ki = 0
![Page 28: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/28.jpg)
Controls Review
Kp = 3Kd = 0.1
Ki = 0
![Page 29: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/29.jpg)
Controls Review
Kp = 3Kd = 0.2
Ki = 0
![Page 30: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/30.jpg)
Controls Review
Kp = 3Kd = 0.4
Ki = 0
![Page 31: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/31.jpg)
Controls Review
Kp = 3Kd = 0.4
Ki = 1
![Page 32: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/32.jpg)
Path Planning
![Page 33: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/33.jpg)
Path Planning
We can represent the world as a grid or with waypoints (roadmap)
![Page 34: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/34.jpg)
Path Planning
Free Space = Work space-Obstacles
Configuration Space = Balloon world
![Page 35: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/35.jpg)
Motion PlanningL1 is Manhattan Distance (Taxi Cab)
L2 is Euclidean Distance (Crow)
If our world is a grid, L1 is 4 point connectivity, L2 is 8
https://www.good.is/articles/bird-s-eye-view-the-most-comprehensive-aerial-shot-of-new-york-city
![Page 36: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/36.jpg)
Wavefront Example
We have an omnidirectional robot. We are looking to find the shortest path with respect to the L2 metric. Draw wavefronts on the image:
Start
Goal
![Page 37: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/37.jpg)
Wavefront Planner
• Start from the goal
• When you are about to wrap around an obstacle, imagine a robot on the end of the previous wavefront
![Page 38: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/38.jpg)
Roadmap Approaches
• Veronoi gives you max distance from obstacles https://www.youtube.com/watch?v=YBq_fzAOpVI
• Visibility gives you shortest path
![Page 39: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/39.jpg)
Voronoi Example
For fun, also look up Delaunay Triangulation
![Page 40: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/40.jpg)
Voronoi Example
For fun, also look up Delaunay Triangularion
![Page 41: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/41.jpg)
Graph Search
Complete vs. not complete
Informed vs. uninformed
Images from https://www.cs.cmu.edu/afs/cs/Web/People/15780/slides/780s17-2.pdf
![Page 42: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/42.jpg)
Graph Search
DFS: Waterslides
BFS: Spilled coffee
http://www.how2examples.com/artificial-intelligence/tree-search
![Page 43: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/43.jpg)
Graph Search
Greedy chooses lowest locally
A* uses heuristics, which are approximations of future cost
![Page 44: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/44.jpg)
Heuristics
A* graph search uses consistent heuristics (consistent is a stronger flavor of admissible) which you can think of as an optimistic lookout
“Yeah, our goal is definitely like 5 minutes away!!!”
![Page 45: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/45.jpg)
Example
Image from https://www.cs.cmu.edu/afs/cs/Web/People/15780/slides/780s17-2.pdf
Closed list:A(0)
Open list:C (2+2)D(3+2)
![Page 46: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/46.jpg)
Localization
Without it, you are stuck on Lab 3
Everything adds noise
![Page 47: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/47.jpg)
2D Example
Say we have some array of belief that we are building up.
How does our prediction change if we move 2 units left and 2 units up?
How does our prediction change if we detect a flower 1 unit left?
Area of medium-high probabilityArea of medium-low probability
![Page 48: Midterm Review 26 Feb 2020 - Carnegie Mellon School of ...16311/current/schedule/ppp/... · Logistics •Midterm Time: Monday 10:30AM •Midterm Location: Normal Classroom •You](https://reader034.fdocuments.in/reader034/viewer/2022050201/5f555f2125ef97316a64c442/html5/thumbnails/48.jpg)
Questions Posed By Students
List 3 functional and 3 non-functional components of a robot
Bug 1 is more breadth first and Bug 2 is more...
Draw the path that a robot would take using Bug 1, Draw the path that a robot would take using Bug 2