Th Bayes' rule specifies how an agent should update its belief in a proposition based on a new piece of evidence. Suppose an agent has a current belief in proposition $h$ based on evidence $k$ already observed, given by $P(h \mid k)$, and subsequently observes $e$.

In artificial intelligence, where can we use the Bayes' rule? I am unable to understand this concept.


A toy example:

Suppose an agent has information about the reliability of fire alarms. It may know how likely it is that an alarm will work if there is a fire i.e. $P(alarm | fire)$. But, if the problem is tweaked a bit and if the agent must know the probability that there is a fire, given that there is an alarm, it can use Bayes' rule:

$P(fire | alarm) = [P(alarm | fire) ×P(fire )] / P(alarm )$


$P(alarm | fire)$ is the probability that the alarm worked, assuming that there was a fire. It is a measure of the alarm's reliability.

The expression $P(fire)$ is the probability of a fire given no other information. It is a measure of how fire-prone the building is. 

$P(alarm)$ is the probability of the alarm sounding, given no other information.

  • $\begingroup$ In the example, the probability of the fire-alarm is connected to the subjective policy of the agent. Agent1 interprets the world with a certain bias. Perhaps the idea is, that the agent should plan the actions in direct response to the outcome? The more elaborated modeling technique is to describe the game mechanics by itself. Even if the agent doesn't attend to the emergency exercise, the fire is there. Here, the Bayes rules are part of the physics engine which are working independent from the agent. The connection between the agent and the forward model are weaker. $\endgroup$ – Manuel Rodriguez Apr 20 '19 at 17:03

Bayes rules and decision trees are a powerful technique for storing knowledge in a machine readable format. Before the decision tree can be generated, the table with the raw data needs to be generated. On top of the table the features are given. The features are used for modeling the predictive model for the agent.

Let me give an example. The problem is a lane change maneuver. The features which are recognized are the speed of the own car, the speed of the other car, if the other side is free (boolean value, which means only true or false is allowed but nothing else), the distance from the own car to the other car and if the maneuver was successful or not. These features are the column of the decision tree table. Now, the data from real lane changing situation are stored in the table. Some cases have a successful outcome and other result into a near-by crash situation.

The raw data stored in the table can be transformed into a decision tree. This is realized with the Bayes rules which are implemented in machine learning frameworks like WEKA. The resulting model estimates the probability if a lane change maneuver is successful or not.

  1. Hou, Yi, Praveen Edara, and Carlos Sun. "Modeling mandatory lane changing using Bayes classifier and decision trees." IEEE Transactions on Intelligent Transportation Systems 15.2 (2014): 647-655.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.