# Towards a Hybrid Approach to Context Reasoning for Underwater Robots
## 4 The Hybrid Context Reasoning Mechanism
### Principles of the Different Reasoning Methods
#### 4.1.3 Multi-Entity Bayesian Network (MEBN) Reasoning  
MEBN, first proposed by [PERSON] et al. [18], combines the expressivity of First-Order Logic (FOL) with the inferential power of BN. With this incorporation, the MEBN is able to provide a consistent treatment of uncertainty, such as representing uncertainty about the type of an entity, refining type-specific probability distributions through Bayesian Learning, and reasoning under uncertainty. Beyond the capability of traditional BN in reasoning about a fixed number of attributes, MEBN could deal with a varying number of entities with their number, type, and relationships undetermined. MEBN provides a means of defining probability distributions over an unbounded and varying number of interrelated hypotheses with the aid of syntax, a set of model construction and inference processes, and semantics.  
MEBN interprets the world as a set of entities that have attributes and have causal relationships with other entities. Knowledge about the attributes of the entities and their relationships to each other is represented as a MEBN model. MEBN logic consists of a collection of MEBN fragments (MFrag) organized into an MEBN Theory (MTheory). An MTheory could represent a particular domain of discourse. Each MFrag, as a modular component, represents knowledge about specific subjects within the domain of discourse and models probability information about a group of related random variables. Similar to BN, each MFrag is a Directed Acyclic Graph (DAG) with parameterized nodes that represent attributes of entity and edges that represent dependencies among them. Three types of nodes, resident nodes, context nodes, and input nodes, are defined in the MTheory.  
* Resident nodes. In an MFrag graph, resident nodes represent variables that have local probability distributions dependent on the values of their parents. Exactly one home MFrag is assigned to contain the complete expression of a resident node.
* Context nodes. Context nodes are Boolean nodes, including value _True_, _False_, and _Absurd_. The MFrag must satisfy the conditions expressed by context nodes in order to be valid.
* Input nodes. Input nodes have their distributions defined in other MFrags and they are important inputs for the definition of resident nodes.  
The MTheory could be instantiated with specific information about the individual entity instances to reason about specific situations. The instantiated MEBN, named Situation-Specific Bayesian Network (SSBN) [18], could make inferences under uncertainties based on standard BN reasoning. In order to enable MEBN reasoning compatible with ontologies, an upper ontology PR-OWL [39] is used to provide a set of ontology constructs to express the probability distribution information associated with ontology elements. PR-OWL is based on MEBN theories. By incorporating with PR-OWL, traditional ontologies could annotate uncertainties of ontology elements based on MEBN theories. The PR-OWL ontology could provide support to reasoning over uncertainty using FOL and probability and the reasoning process in PR-OWL ontology is an automatic generation of SSBN to determine the probabilities of a query.  
The UnBBayes [48] tool provides both Graphical User Interface (GUI) and Java Application Programming Interfaces (APIs) to build MEBN models, generate probability-annotated ontology to represent the MEBN models, and make uncertainty reasoning.  
By integrating the ontological, rule-based, and MEBN reasoning methods, it is able to provide multiple reasoning capabilities that can cover all needs from the SWARMs project. When dealing with different inference needs, specific reasoning mechanisms can be invoked. The specific reasoning workflow is presented in the next section.