First, let’s get an intuitive really feel for what chances imply on this planet of robotic localization.
Think about a house with 4 rooms: a Residing Room, Bed room, Kitchen, and Examine Room. The robotic doesn’t know precisely the place it’s, however it may possibly estimate the probability of being in every room primarily based on previous expertise or preliminary perception.
For instance, it’d estimate:
- Residing Room:
0.4
- Bed room:
0.3
- Kitchen:
0.2
- Examine Room:
0.1
These chances mirror the robotic’s confidence in being in every room. And because it is aware of it have to be someplace, the entire at all times provides as much as 1.
Consider it like a robotic’s inside thought:
“I’m most likely in the lounge… however I is likely to be within the kitchen too.”
Taking a Measurement
“I must do a measurement to seek out out the place I actually am” the robotic thinks, so it scans its environment and sees a mattress.
From previous coaching or programming, it is aware of:
- Beds are very doubtless to seem within the Bed room , for instance given bed room, the possibility of getting a mattress is (Mattress|Bed room) = 0.7
- Hardly ever seem within the Examine Room or Residing Room, for instance given Examine Room or Residing Room, the possibility of getting a mattress is (Mattress|Examine Room) = 0.2, (Mattress|Residing Room)=0.2
- Nearly by no means seem within the Kitchen, for instance (Mattress|Kitchen)=0.05
Replace Possibilities:
Robotic then replace its perception utilizing this new statement. That is the place Bayes’ Rule is available in.
The formulation of Bayes’ theorem is:
P(A | B) = [P(B | A) × P(A)] / P(B)
In our case, we try to determine the chance that the robotic is in a particular room on condition that it noticed a mattress, as P(Room∣Mattress)
As a result of P(B) in our case is the entire chance of observing a mattress, which isn’t particular to any single room. We will calculate it by assuming over all potential rooms:
P(Mattress) = ∑ [P(Bed | Roomᵢ) × P(Roomᵢ)] ,
We will famous 1/P(Mattress) as η, and obtain:
P(Room∣Mattress) = η ⋅ P(Mattress∣Room) ⋅ P(Room)
Intuitively, the up to date perception is “ how doubtless it was to see a mattress in every room” multiply “how doubtless it thought it was in that room earlier than the measurement”.
Instance of tips on how to calculate the chance of P(bed room | mattress):
Step 1: Prior Beliefs P(Room)
P(Residing Room) → 0.4
* P(Bed room) → 0.3
P(Kitchen )→ 0.2
P(Examine Room) → 0.1
Step 2: Likelihoods P(Mattress | Room)
*P(Mattress | Bed room) = 0.7
P(Mattress | Residing Room) = 0.2
P(Mattress | Examine Room) = 0.2
P(Mattress | Kitchen) = 0.05
Step 3: Apply Bayes’ Theorem
P(Room | Mattress) = [P(Bed | Room) × P(Room)] / P(Mattress)
P(Bed room | Mattress) = [0.7 × 0.3] / P(Mattress) = 0.21 / P(Mattress)
Step 4: Compute the Proof P(Mattress)
P(Mattress) = ∑ [P(Bed | Roomᵢ) × P(Roomᵢ)]
P(Mattress) = (0.7 × 0.3) + (0.2 × 0.4) + (0.05 × 0.2) + (0.2 × 0.1)
= 0.21 + 0.08 + 0.01 + 0.02
= 0.32
Step 5: Remaining Calculation
P(Bed room | Mattress) = 0.21 / 0.32 ≈ 0.656
✅ So after seeing a mattress, the robotic turns into 65.6% assured it’s within the Bed room, up from simply 30% earlier than the statement.
Right here is an attention-grabbing video explaining Bayes’ theorem in case you aren’t but aware of it:
Comply with me for extra intuitive explainers on AI and robotics. Be at liberty to depart a remark — I’d love to listen to your ideas or questions! 🙂
🔗 Additionally try my associated article: Entropy in Robotics