Prisoner's Dilemma (PD) is an interesting game that explains how two rational individuals may make decisions that seem irrational.
The game has lots of examples and applications in real life!
Thread ๐
There are different examples of PD, but this is the one I like most.
You want to buy something from another person. You exchange closed bags one containing the money and one the goods.
Both you and the other person can choose to honor the deal โ or to give an empty bag โ.
If you both honor the deal โ โ (cooperate), you both gain something.
If you both exchange empty bags โ โ (defect), at least nobody loses.
If you leave the bag empty, but get a full bag โ โ, you gain a lot, while the other person is screwed.
Image source: Wikipedia
The optimal move? ๐ฏ
If you play only ones, than the only rational move is to defect:
โช๏ธ If the other side cooperates โ , it is better to defect โ, get the goods and keep the money.
โช๏ธ If the other side defects โ, it is better to also give an empty bag โ to not lose money.
The dilemma ๐ค
But wait, if both people think in this way, the deal will never happen, right? This is obviously suboptimal, because you both actually want to do the dael!
Both sides individuallt act rationally, but the final result seems irrational - this is the dilemma!
Playing multiple times 1๏ธโฃ, 2๏ธโฃ, 3๏ธโฃ...
This changes if the game is played multiple times (Iterated Prisoner's Dilemma). Now, people actually start to cooperate more, even if the Nash euqilibrium of the system is still to always defect! People start acting superrationaly!
Both sides always cooperating is the optimal strategy, but it is not a stable state. One side will always have the incentive to screw the other side by defecting and increasing its gain in the short term.
IPD is a very interesting psyhological problem! ๐
Real world example - climate change โ๏ธ
All contries agree that they have to cut CO2 emissions, because they need a stable climate. However, every country is hesitant to invest in measures to actually reduce CO2. It is better if everybody else reduces CO2 except you...
Real world example - doping ๐
If all atheltes are clean than they stay healthy an dcompete on a level playing field. When somebody starts doping they get an advantage. However, if everybody is doping, the advantage disappears, but everybody incurs the negative side effects.
Real world example - advertising ๐ฐ
If one of two competing companies starts advertizing, it will make some of the customers of the other company switch and gain an advantage. However, if both companies advertise a lot, they will both have high expenses without any gain.
Look around you and I'm sure you will find examples of Prisoner's Dilemma all around you. The question now is how to make the other person always wanting to cooperate? ๐
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh
What are Convolutional Neural Networks? ๐๏ธ โญ๏ธ โฐ๏ธ
CNNs are an important class of deep artificial neural networks that are particularly well suited for images.
If you want to learn the important concepts of CNNs and understand why they work so well, this thread is for you!
๐งต๐
What is a CNN? ๐ค
A CNN is a deep neural network that contains at least one convolutional layer. A typical CNN has a structure like this:
โช๏ธ Image as input
โช๏ธ Several convolutional layers
โช๏ธ Several interleaved pooling layers
โช๏ธ One/more fully connected layers
Example: AlexNet
A good example - AlexNet
Throughout the thread I will be giving examples based on AlexNet - this is the net architecture that arguably started the whole deep learning revolution in computer vision!
This is the formula for Mean Squared Error (MSE) as defined in WikiPedia. It represents a very simple concept, but may not be easy to read if you are just starting with ML.
Read below and it will be a piece of cake! ๐ฐ
Thread ๐
The core โซ
Let's unpack from the inside out. MSE calculates how close are your model's predictions ลถ to the ground truth labels Y. You want the error to go to 0.
If you are predicting house prices, the error could be the difference between the predicted and the actual price.
Why squared? 2๏ธโฃ
Subtracting the prediction from the label won't work. The error may be negative or positive, which is a problem when summing up samples.
You can take the absolute value or the square of the error. The square has the property that it punished bigger errors more.