Probability: a pathway to robotics and ai
Probability is the most crucial topic when it comes to Ai and Robotics, before we go into how probability plays a vital role in the development of robotics as well as ai applications let's look into the history a bit.
In the 1970s computers started booming for commercial uses and at that point, engineers were mainly focused on making algorithms efficient such as the P vs NP problem.
In the 1980s realization came that sensors and the world around us are noisy for us to process information, hence leading to the development of a control system, the control system would calibrate machines or sensors using feedback. Control systems were reliable then, as the environments in which it was implemented were controlled and uncertainty in the environment didn't affect the functionality of the control system.
As time progressed realization was made that environment around cannot be controlled in many cases and will involve uncertainty in a way that cannot be neglected, hence the idea to play around with this uncertainty gives rise to implementing probability.
Some examples
Probability forged the way for many applications of ai as well as robotics such as NLP(natural language processing), RL(reinforcement learning), SLAM(simultaneous localization and mapping), CNN(convolution neural network), and many more.
Here are some examples
- NLP(Natural Language Processing) relates to words used in sentences or an Article. For example,
Here NLP should detect that “it” referred to “coffee” not “I”.
NLP is used in applications such as translators or autocomplete and many in text-to-speech converters and many such applications.
- CNN(convolution neural networks) are used for image recognition. You give them an image as input it outputs what it perceives from that image. If you provide them with an image of a cat, its output will be that the image has an object which looks like a cat. Again here, the algorithm should not be 100% sure as there are images that may resemble a cat, then it should suggest that there is a chance that the image has a cat.
And there are many more cases of uncertainties that AI and robotics have to face, which might not be possible if not for probability.
Bayes and Markov
Most AI and robotics are governed by Bayes theorem and Markov properties. It is so because both the Markov property and Bayes theorem provides a way to link the probability distribution of two or more samples with each other.
For example, the probability of having “He” assigned to “a boy” in the example used above for NLP, depends on the verb acting upon the noun, which can vary and hence has the probability of the pronoun depending on any noun used in the sentence before.
This is called conditional probability, which is defined as the likelihood of an event happening(in this case use of the pronoun “it”), based on the occurrence of a previous event(in this case probability of having the verb acting on the noun “a boy”).
Bayes theorem provides a formula that interlinks the conditional probabilities of 2 events
$P\left(A\text{|}B\,\right)\,=\,\frac{P\left(B\text{|}A\right).P\left(A\right)}{P\left(B\right)}$
And in most cases of AI and robotics P(B) can further be expanded on the theorem of total probability
$P\left(B\,\right)\,=\,\sum_{A}^{}P\left(A\text{|}B\right).P\left(A\right)$
Substituting P(B) on the equation above
$P\left(A\right)\,=\,\frac{P\left(B\text{|}A\right).P\left(A\right)}{\sum_{A^{\prime}}^{}P\left(B\text{|}A^{\prime}\right)P\left(A^{\prime}\right)}$
Here A’ is not A they are related as they are the probability of the same object but at different timestamps, refer to the image below
Here A is when the robot is 1m away from the cone and A’ is when the robot was 10m away from the cone, in both cases, B is the accuracy of the sensor which tells the robot how far away is any object.
And since P(A’) is independent of P(A) hence are equation can be reduced to
$P\left(A\right)\,=\,\eta P\left(B\text{|}A\right).P\left(A\right)$
Where $\eta$ is called a normalizer and is a constant
The next important property which roboticists and AI developers exploit is Markov’s property.
The Markov property means that the evolution of the Markov process in the future depends only on the present state and does not depend on history.
For example, you are given a choice to open one door out of two and then you proceed to the next room
Where again you are given a similar choice then let's say you want to find the probability that you will be in room no 4 then Markov's property states that you don't need to find the probability of all the past events such as the probability that you have walked through door 1, your probability of going through door 4 will only depend on the probability of being in room 1
This is a most simplistic example but in a complex environment where a lot of states are all interlinked then Markov’s property highly reduced the complexity as well as the computation. Such as the states are shown below. Where arrows are probabilistic representations.
Here if you are got into room 3 somehow then as per Markov’s property going to room 4 will be
$\text{P(being}\;\text{in}\;\text{room3)}\,\times\,\text{P(arrow}\;\text{going}\;\text{to}\;\text{room}\;\text{4)}$
We don't care how we got into room 3 but if we are in room 3 then going to room 4 will be the equation above.
With Markov’s properties, other processes are also formulated.
- Markov’s chain- represents how states are related to each other stochastically. The above example of rooms interconnected is known as Markov’s chain
- Markov decision process- It is a model which shows how a decision made by the decision maker affects how will it get a “reward”. This is mostly used in reinforcement learning algorithms to formulate a model such that ai or algorithm gets better with the progression of time
- Hidden Markov model - In the hidden Markov model is the same as Markov’s chain but probabilities of transitioning from one state to another are not disclosed. This type of model is mostly used in NLP.
Probability in AI and robotics is still ongoing research which is still being developed to make AI smarter and better. As planes were inspired by birds, This way AI and robotics mimic us, living beings, and implementing probability is a step in the right direction because we use always implement probabilistic decisions every time, for example choosing the longer road giving us a smoother ride than the shorter and bumpy one, but this decision is affected on the base of our urgency if we need to be somewhere urgently then we would prefer shorter path.
0 Comments