1 Introduction

This work has been inspired by previous researches in two different directions: quantum-mechanical frameworks (specifically, their application to cognitive, social and financial sciences) and BDI modeling of decision-making processes. The effort will be here to merge them in a single structure.

The application of quantum models, and related mathematical tools, is nowadays considered a standard in physical sciences for the explanation of a whole series of different phenomena. However, only recently this quantum-apparatus, and the concepts underlying it, is being applied as an operational formalism to interpret phenomena, clearly not belonging to those scales and/or conditions, where quantum processes occur. This has led to the formulation of the so called quantum-like [1] and quantum structure paradigms [2], implemented in a few successful studies related mainly to cognitive sciences. Early examples are attempts of explaining observations in the fields of human decision making (violations of the sure thing principle [3], paradoxes emerging from expected utility theories [4], experiments about classification and decision [5]) and probability judgement (conjunction and disjunction fallacies [6, 7], order effects [8], the liar paradox [9], ...). Further investigations have also extended the quantum formalism approach to other cognitive phenomena, such as knowledge representation (invoking different principles of Quantum Mechanics, ranging from superposition [6] to contextuality and interference [10]), information retrieval [11], semantic analysis (with envisaged applications also in Artificial Intelligence [12]) and human perception [13, 14]. Consequences of quantum cognition aspects have also been claimed to play a role in the behavior of market agents, and thus in the market psychology [15, 16].

The scope of this paper is the attempt to extend this Quantum Cognition point of view to more complex decision processes, as performed by human agents. Most of the references above, in fact, deal with single decisions under controlled conditions. A decision-maker in the real world, instead, requires processes involving sub-processes, which are themselves interdependent: its modeling as an agent must cope with this architecture. Intuitively, the success in introducing quantum formalism - so to explain paradoxes deriving from simple cognitive processes - points in the direction of applying the same paradigms also to combinations of these basic reasoning processes. The ultimate reason may be interpreted as a strict consequence of physiological quantum effects, or merely as the intrinsic contextual nature of the reasoning process, where the agent can be thought as an open quantum system, influenced by the environment.

The notion itself of an agent-based system has spread in contexts other than Artificial Intelligence, its area of direct interest, becoming a significant computing technology along the last ten years [17]. An agent is intended as a computational system situated in an environment: it is capable of autonomous actions, aiming to achieve specific goals. The agent does not have complete knowledge of the environment, neither complete control over it, and the environment can dynamically evolve independently from the agent [18]. The main problem for an agent is to decide which action fits best its goals, among those actions it can choose. Such decision-making skills are linked to a mental state of the agent, reflecting its perceptions, representations, beliefs, desires, trends, etc. Furthermore, the environment may include interaction with additional agents, and those must be taken into account, when the reasoning agent designs its plans.

Among the cognitive frameworks introduced to model this problem, in this paper we will make use of the BDI (‘Beliefs-Desires-Intentions’) paradigmFootnote 1, given its successful adoption for the design of those complex systems, requiring a robust implementation, resilient to interactions with the surrounding environment [19]. However, the classical BDI paradigm is known to have some limitations, specifically: i) it is based on a deterministic first order logic, which means decision under uncertainty can not be processed; ii) there is no intrinsic ‘automatic learning/training’ structureFootnote 2, which must be explicated only when designing the agent’s reasoning.

Several preliminary studies have tried to overcome these obstacles, by integrating the BDI agent with a learning framework, or with logic modules, able to explicitly deal with uncertainty (e.g. fuzzy logics) [2022]. This necessity for the introduction of probabilistic reasoning is derived from the intrinsically incomplete information, that an agent has about the environment. The adoption of probabilistic cognitive algorithms has its own weaknesses, though. A trade-off must be found, between the reasoning efficiency and the complexity of the algorithm. Moreover, an environment is always, by definition, a dynamic environment, where the decision process must be taken on a time-scale, which is small compared to the time-scales for the environment variations. Intuitively, whatever action has been planned, it could be turned ineffective by a modified environment where it is then being operated. On the other side, the agent can not be too impulsive, but must premeditate about the optimal action according to circumstances [23].

The work presented here copes with these limitations, proposing a quantum BDI agent-programming framework, which:

  1. 1.

    Embeds the reasoning under uncertainty (probabilistic logic);

  2. 2.

    Enables the straightforward adoption of learning algorithms;

  3. 3.

    Enhances the agent reasoning performances, and thus its adaptation to the environment.

Notice that we are replacing the classical Boolean algebra with an orthomodular associative algebra (i.e. the structure of quantum logics), which, in a BDI formulation, acts on events and propositions [38]. The interested reader can find additional details in [39] and [40] for quantum computing applications; while in [41] and [42]) is a focus about a few axiomatic definitions of the logics. The paper is structured as follows: the first section introduces the research methods and principles, that have led to the development of the model proposed. The last sections describe our quantum BDI agent’s model. Conclusions and future lines of research are given at the end of the paper.

2 Methods and Framework: The Classical BDI Paradigm

As stated in the Introduction, the BDI paradigm is focused on the reasoning of an agent, who has limited resources [19], where ‘resources’ refer to computational power and/or memory. Thus, the agent has a finite amount of time to improve the results of its reasoning, and this timing must be adapted to the conditions imposed by the dynamic environment, in which the agent operates. There can be two extreme approaches in dealing with the timing problem. A first possibility is an ‘ever-adapting’ solution: the agent reacts changing his plans to whatever small change in the surrounding environment. On the opposite side, a ‘static’ approach may suggest to keep the plans fixed, and react to whatever stimulus without further reasoning.

Both cases are intuitively inefficient. In the first one, the agent’s resources would be focused in the reasoning process: in a fast-changing environment, this approach could even lead to an agent far too reactive, who in practice is unable to act. The second case, instead, designs an agent unable to adapt to changes in the operative scenario, and whenever these changes alter significantly the reasoning input, the actions chosen by the agent may become counterproductive.

In a nutshell, the BDI paradigm attempts to mediate between these two extremes, introducing the concepts of belief, desire and intention.

Beliefs :

are facts an agent believes about the world, i.e. the world representation an agent has. The agent obtains these beliefs through its own personal perception of the surrounding, and they are thus true only for the agentFootnote 3: beliefs are no ‘objective truth’.

Desires :

are the goals of the agent, i.e. a final state the agent desires to reach. An agent may have more desires at once, and they may even be conflicting.

Intentions :

are referred to the agent’s commitment to its plans, in achieving its goals. Intentions can not be conflicting: once the agent has programmed its actions, it can only intend a subset of his desires.

Commitments are the basis for the intentions: the agent is committed to an intention as far as the agent believes that the commitment to this intention is a way of achieving his goals. Given that, the agent is ‘allowed’ to think about those plans only, that are linked to this intention. Notice that, in general, intention is considered a synonymous of commitment, and the subtle difference outlined is neglected. For our purposes, this same simplified definition is going to be adopted in the rest of this document.

Commitment is a key-point in the BDI agent’s formulation, as it balances the two extreme ‘timing situations’ described above. In fact, once the agent has acquired its beliefs, and it is committed to a specific goal, some kind of filtering occurs in the reasoning, so that the agent selects only plans compatible with the final goal, and excludes all incompatible plans. In this way, the computational cost of the reasoning can be greatly reduced, leaving space for the action. However, in order to design a flexible agent, a conditional revision of the commitment is required.

In almost every realistic situation, an agent has no exact idea in which state the environment is. Its knowledge is imperfect, due to a lack of information. In this case, the agent is only able to assign a likelihood to its beliefs [24]. The problem of decision-making under these uncertain conditions has been afforded in probability theory and decision making theory.

Moreover, the definition of probability implicitly adopted is another delicate issue. The standard definition is in fact a so-called frequentist probability: the ratio between cases where the proposition is found true, by the total number of cases considered. In the field of agent programming, it is better to refer to subjective probability, where ‘subjective’ refers to the quantitative uncertainty that each agent has about the actual state of the world, and not to the arbitrariness of the state itself. In fact, different agents may have different knowledge about the same event, and therefore assign different likelihoods to it.

2.1 Bayesian Agent Modeling

A rather successful framework for implementing the reasoning of the agent in BDI models is given by the adoption of Bayesian networks. A Bayesian network(also called a conditional probability network), is a directed acyclic graph (DAG), where the nodes are random variables X i , each having a set of parent variables \(\mathcal {P}(X_{i})\) associated with them. From each element in \(\mathcal {P}(X_{i})\) there is an edge pointing to each node of the set {X i }.

The parents of a random variable X i are the elements of the minimal set of predecessors of X i . That is, X i is conditionally independent from all other variables \(X_{j< i} \notin \mathcal {P}(X_{i})\) preceding it in the graph order:

$$ P(X_{1},X_{2},...,X_{n})=\prod\limits_{i=1}^{n} P(X_{i}|\mathcal{P}(X_{i})) $$
(1)

Such a network underlies an ensemble of conditional probabilities, including also the aprioristic probabilities of variables, which have no parent variables. In the literature, several works have tried to integrate the Bayesian framework with the BDI modeling: starting with conceptual proposals void of a rigorous implementation [23], up to recent works, dealing in depth with technical details [25]. The main idea of these proposals was to treat the main features of the BDI model, as outlined in Section 2, as variables in a conditional probability network, with aprioristic probabilities being bound to the agent’s uncertainty about its knowledge of the environment. Such an integration allows the agent to manage uncertain events and propositions [25], in a probabilistic formulation (which includes, as a special case, the deterministic Boolean logic).

However, in our opinion, the tools of quantum mechanics offer a unique, proper formulation of probabilistic aspects in logical reasoning. The modeling possibilities offered in a quantum framework are, in fact, not reproducible by deterministic approaches, and the quantum formalism offers a sound and elegant implementation of contextual reasoning, which may be required by a probabilistic BDI paradigm. In particular, for those decision processes where a background noise leads to non-linear probabilistic phenomena for the reasoning under uncertainty. This possibility is investigated in the following sections, through a concise logical and mathematical formalization.

3 The Quantum BDI Agent’s Model

Among the various possibilities to model non-linear probabilities [26], we choose here the Heisenberg matrix formulation of the quantum-mechanical formalism. In the following, the concepts of finite-dimensional Hilbert spaces will be used, leading to discrete random variablesFootnote 4: for all the details in the notation and axioms, the interested reader may refer to [1, 27]. No discussion will be made about the dynamic implications of the theory: time-dependent variables and related concepts will be left apart for future analyses.

As the first, let us introduce some formal definitions which are the base of the framework under development.

Definition 1

An atomic state is identified by a ‘ket’, belonging to an orthonormal basis of a Hilbert space of finite dimension N.

Definition 2

An elementary state is a linear combination of atomic states, normalized to unity.

That is, an elementary state can be whatever ket belonging to the Hilbert space, spanned by the orthonormal basis of finite dimension N. From the quantum-mechanical point of view, such a state is a pure state of a system of dimension N. Therefore, the density matrix of this pure state is the diagonal representation of an observable, and the values on its main diagonal can be interpreted as the probabilities of outcomes, of measures performed on the observable.

Introducing in particular the atomic state of belief, and adopting the bra-ket notation |b i > for the i-th belief state, we can define the Hilbert space:

$$ H_{\mathcal{B}_{(l)}}=span\{|b_{p}>\}_{p=1,...,P} $$
(2)

and to allow the description of the agent mental state via composite quantum systems [34], we combine the (sub-)spaces \(H_{\mathcal {B}_{(l)}}\) into:

Definition 3

The global belief space of an agent, that is the space \(H_{\mathcal {B}}\), defined via the tensor product of spaces \(H_{\mathcal {B}_{l}}\) (l=1,...,L)

$$ H_{\mathcal{B}}=H_{\mathcal{B}_{1}}\otimes H_{\mathcal{B}_{2}}\otimes .... \otimes H_{\mathcal{B}_{L}} =\bigotimes_{l=1}^{L} H_{\mathcal{B}_{l}} $$
(3)

Therefore, a belief state |ψ B > of an agentFootnote 5 may be whatever ket belonging to the global space \(H_{\mathcal {B}}\). Consider now the states constructed as superpositions of atomic states:

$$\begin{array}{@{}rcl@{}} |\psi_{\mathcal{B}_{1}}>&=&\frac{1}{\sqrt{P_{1}}}\sum\limits_{l_{1}=1}^{P_{1}}|b_{l_{1}}>\\ |\psi_{\mathcal{B}_{2}}>&=&\frac{1}{\sqrt{P_{2}}}\sum\limits_{l_{2}=1}^{P_{2}}|b_{l_{2}}>\\ ... \ ... & ...\ ... &...\ ...\\ |\psi_{\mathcal{B}_{L}}>&=&\frac{1}{\sqrt{P_{L}}}\sum\limits_{l_{L}=1}^{P_{L}}|b_{l_{L}}>\end{array} $$
(4)

where the kets \(b_{l_{1,...,N}}\) are respectively in each subspace \(\mathcal {B}_{l=1,...,L}\).

Definition 4

The default belief state of an agent is the state:

$$ |\overline{\psi}_{\mathcal{B}}>=\bigotimes\limits_{l=1}^{L}|\psi_{\mathcal{B}_{l}}> $$
(5)

that is, a pure state of the global space \(\mathcal {B}\). It can be noticed that the following fundamental properties hold:

Theorem 1

\(|\overline {\psi }_{\mathcal {B}}>\) is normalized (to unity).

Theorem 2

All the probabilities of outcomes of measures, performed for the observables of each subspace \(H_{\mathcal {B}_{i}}\) (i=1,...,L), are (classically) conditionally independent from each other.

Analogously to the definitions outlined for the belief space, we can introduce corresponding definitions for the intentions and desires spaces for the agent’s mental state. In particular, representing as |i q > the q-th atomic state of intention:

$$ H_{\mathcal{I}_{(m)}}=span\{|i_{q}>\}_{q=1,...,Q} $$
(6)

is a subspace which concurs to define:

Definition 5

The global intention space is the tensor product \(H_{\mathcal {I}}\)

$$ H_{\mathcal{I}}=H_{\mathcal{I}_{1}}\otimes H_{\mathcal{I}_{2}}\otimes .... \otimes H_{\mathcal{I}_{M}} =\bigotimes\limits_{m=1}^{M} H_{\mathcal{I}_{m}} $$
(7)

Finally, calling |d r > the r-th atomic state of desire, and \(H_{\mathcal {D}_{(n)}}\) the space spanned by these atomic states:

Definition 6

The global desire space of an agent is the tensor product \(H_{\mathcal {D}}\):

$$ H_{\mathcal{D}}=H_{\mathcal{D}_{1}}\otimes H_{\mathcal{D}_{2}}\otimes .... \otimes H_{\mathcal{D}_{N}} =\bigotimes\limits_{n=1}^{N} H_{\mathcal{D}_{n}}. $$
(8)

For each subspace \(\mathcal {I}_{m}\) (m=1,...,M) and \(\mathcal {D}_{n}\) (n=1,...,N) it is possible to define, respectively, intention states |ψ I > and desire states |ψ D >, as already done for belief states.

Correspondingly to (5), a default intention state \(|\overline {\psi }_{\mathcal {I}}>\) and a default desire state \(|\overline {\psi }_{\mathcal {D}}>\) can also be defined, and in these cases hold again Theorems 1 and 2.

It may be observed that Theorem 2 intuitively derives from the tensor product construction of the global space: an observable \(\hat {A}\) acting on the subspace H k alone can be written for the global space H as: \(\hat {A}= \hat {I}_{1} \otimes ...\otimes \hat {A}_{k} \otimes ... \otimes \hat {I}_{K} \), with \(\hat {I}\) the identity operator. This brings us to the conclusion that measurements performed on observables of a certain subspace do not affect observables of all the others, as expected from the theory of composite quantum systems: there is no interference among different subspaces of the global space. Formally, those observables, which are diagonal in the chosen basis representation, are mutually commuting observables.

An agent in a default state for both the belief and desire spaces can be understood as in neutral behaviour, or without ”personality”: the default state is, in fact, a superposition of all possible beliefs and desires - for each subspace - which are mutually exclusiveFootnote 6 and have equal probabilities to occur. Notice also the absence of entanglement among the subspace states \(|{\psi }_{\mathcal {B},\mathcal {D},\mathcal {I}}>\), introduced to construct the default state, which is a pure separable state for the global space H by construction (it is a tensor product of pure subspace states).

The mental state of an agent is a state belonging to the tensor product space of the three spaces of beliefs, intentions and desires: the global space \(H=H_{\mathcal {B}}\otimes H_{\mathcal {D}} \otimes H_{\mathcal {I}}\). An operator \( \hat {\mathcal {C}} \) on this space can be intended as an agent characterization. When \( \hat {\mathcal {C}} \) acts on the default state, the final state may need to be normalized again (this is strictly necessary, given the probabilistic framework). Successive application of operators, and normalization of resulting states, produces a density operator, which can be put in form of a Bayesian quantum network (see Section 4). We make this statement clearer with some examples, dealing for simplicity with only the beliefs and the intentions of the agent.

Take in consideration a bi-dimensional belief space H B and a bi-dimensional space H I : the global mental space for the agent will then be a four-dimensional Hilbert space, which is the tensor product of the two subspaces. Denoting with |b p > and |i q > (p,q∈{1,2}) the basis kets of H B and H I , respectively, then |b p >⊗ |i q >:=|b p i q > is a state of an orthonormal basis for the space H B H I , which we do consider the eigenbasis of some observable \(\hat {A}\), that in our scheme will therefore deal with observation of the desire and intention of the agent. In the Heisenberg matrix formalism, the basis for this case is composed by four-dimensional column vectors, e.g. :

$$\begin{array}{@{}rcl@{}} |b_{1}i_{1}>&=& \left (\begin{array}{rcl} 1\\ 0\\ 0\\ 0 \end{array} \right ) \end{array} $$
(9)

and equivalently for |b 1 i 2>,|b 2 i 1> and |b 2 i 2>. It is well known how a pure state |Ψ> for the global system can be always written as a linear combination of the basis states:

$$ |{\Psi}>=\sum\limits_{p,q}\pi_{pq}|b_{p} i_{q}> $$
(10)

and leads to a pure state density projector:

$$ \hat{\rho}_{P} = |{\Psi}><{\Psi}| $$
(11)

with specific properties [36]. A global mixed state, instead, can be described as a non-coherent convex sum of pure state density matrices:

$$ \hat{\rho}_{M}= \sum\limits_{i} \lambda_{i}\hat{\rho}_{P,i} $$
(12)

which retains some (but not all) of the properties of \(\hat {\rho }_{P}\), and in particular the trace-normalization \(tr(\hat {\rho }_{P,M})=1\), which follows from the probabilistic interpretation of the density operator (see also (17) in the following).

Example 1

As a first case, we will suppose a mixed global state, which is represented by a diagonal density operator in the basis chosenFootnote 7:

$$ \hat{\rho}_{MS}= \sum\limits_{p,q} |\pi_{pq}|^{2}|b_{p} i_{q}><b_{p} i_{q}| $$
(13)

We can re-formulate \(\hat {\rho }\) in (13) as a density matrix:

$$\begin{array}{@{}rcl@{}} {\rho}_{MS} &=& \left (\begin{array}{llll} |\pi_{11}|^{2} & 0 & 0 &0 \\ 0 & |\pi_{12}|^{2} & 0 & 0\\ 0 & 0 & |\pi_{21}|^{2} & 0 \\ 0 & 0 & 0 & |\pi_{22}|^{2} \end{array} \right ) \end{array} $$
(14)

where \(tr({\rho }_{MS})={\sum }_{pq} |\pi _{pq}|^{2}=1\). It is important to notice how, in this case, \(\hat {\rho }_{MS}\) represents no entangled state. In fact, it is easy to see the separability of \(\hat {\rho }_{MS}\) as a product state of two sub-system density matrices:

$$ {\rho}_{MS}={\rho}_{(B)} \otimes {\rho}_{(I)} $$
(15)

which are both diagonal:

$$\begin{array}{@{}rcl@{}} {\rho}_{(B)} = \left (\begin{array}{rcl} |\mu_{11}|^{2} & 0 \\ 0 & |\mu_{22}|^{2} \end{array} \right ) ; \;\;\;\; && \;\;\;\; {\rho}_{(I)} = \left (\begin{array}{rcl} |\nu_{11}|^{2} & 0 \\ 0 & |\nu_{22}|^{2} \end{array} \right ) \end{array} $$
(16)

Drawing on the theory of composite systems, a state as described by \(\hat {\rho }_{MS}\) does not exhibit correlations among the subsystems introducedFootnote 8. The state of each subsystem, in fact, can be described by a well defined state such as (16), independently from the state, the global system is in [36].

To better explain what this means in terms of probability calculus and the agent’s reasoning, using the relations above and interpreting the diagonal elements of the density matrix as populations, we can calculate the probabilities for the system to be in one of the basis eigenstates:

$$\begin{array}{@{}rcl@{}} P(b_{p} i_{q})&=& \left (\begin{array}{llll} \delta_{(11)(pq)}\\ \delta_{(12)(pq)}\\ \delta_{(21)(pq)}\\ \delta_{(22)(pq)} \end{array} \right ) \left (\begin{array}{llll} |\pi_{11}|^{2} & 0 & 0 &0 \\ 0 & |\pi_{12}|^{2} & 0 & 0\\ 0 & 0 & |\pi_{21}|^{2} & 0 \\ 0 & 0 & 0 & |\pi_{22}|^{2} \end{array} \right ) \left (\begin{array}{llll} \delta_{(11)(pq)}& \delta_{(12)(pq)}& \delta_{(21)(pq)}& \delta_{(22)(pq)} \end{array} \right ) \\ &=& |\pi_{pq}|^{2} \end{array} $$
(17)

In terms of the BDI scheme, (17) can be interpreted as the probability for the agent to intend the action i q , when it has the belief b p . Now, tracing out the diagonal reduced density matrixFootnote 9 ρ (I), its diagonal elements can be interpreted as populations (i.e. probabilities) of the possible states, the “intention” subsystem can occupy. Then, it is possible to derive:

$$ P(i_{q})=P(b_{1} i_{q})+P(b_{2} i_{q}) \ \ \ \ q=1,2 $$
(18)

that is the classical total probability law, for the agent to undertake intention i q . Therefore, for the case of a separable density matrix, the system can be reduced to the classical one: there are no quantum interference effects.

Example 2

Consider now a pure global state |Ψ> that is entangled, whose density matrix representation in the basis chosen is not diagonal, for example the superposition |Ψ>=π 11|b 1 i 1>+π 21|b 2 i 1>, which reads in density matrix form:

$$\begin{array}{@{}rcl@{}} {\rho}_{} &=& \left (\begin{array}{llll} |\pi_{11}|^{2} & 0 & \pi_{11}^{*}\pi_{21} &0 \\ 0 & 0 & 0 & 0\\ \pi_{11}\pi_{21}^{*} & 0 & |\pi_{21}|^{2} & 0 \\ 0 & 0 & 0 & 0 \end{array} \right ) \end{array} $$
(19)

It is well known that (19) describes a non-separable state [36]. That is, \(\hat {\rho }_{}\) can not be described in terms of a decomposition as in (12). Nevertheless, it is still useful to adopt a reduced density matrix formalism. In fact, within the brief notation where \(\rho _{jk}^{lk}\) indicates the coefficient corresponding to the element |b j i k ><b l i k | of \(\hat {\rho }\):

$$ {\rho}_{(B)}=Tr_{H_{I}}(\rho_{})=\sum\limits_{j,l} \sum\limits_{k} \rho_{jk}^{lk} |b_{j}><b_{l}| $$
(20)

is the reduced density matrix for the belief subsystem, in matrix form:

$$\begin{array}{@{}rcl@{}} {\rho}_{(B)} = \left (\begin{array}{rcl} |\pi_{11}|^{2} & \pi_{11}^{*}\pi_{21} \\ \pi_{11}\pi_{21}^{*} & |\pi_{21}|^{2} \end{array} \right ) . \end{array} $$
(21)

Using (19) and recalling

$$ tr(\rho_{})=|\pi_{11}|^{2} +|\pi_{21}|^{2} = 1 $$
(22)

it is easy to see that \(\hat {\rho }_{(B)}\) represents a mixed state \((tr(\rho _{(B)}^{2}) < 1)\). This was expected, given that we started with an entangled state. \(\hat {\rho }_{(B)}\) embeds all the (partial) information about |Ψ>, which is accessible through local operations, acting on the (B) subsystem alone. In particular, it is possible to use \(\hat {\rho }_{(B)}\) for investigation of the correlations between the belief and intention subspaces. Suppose, in particular, that the task is to infer the outcome of measurements in the intention subspace, given the belief stateFootnote 10 the agent is in.

As the first, suppose |b i > basis vectors can be given in terms of the basis |i 1>,|i 2> as:

$$ |b_{i}>=\sum\limits_{j} c_{ij}|i_{j}> \ \ \ \ j=1,2 \ \ c_{ij} \in \mathbb{C} $$
(23)

with \({\sum }_{j} |c_{ij}|^{2} =1\), under the condition of orthonormal bases. In order to infer the probability that the agent will assume e.g. the state |i 1>, we can use the expectation value of the projector on such a state, that is:

$$ tr(\hat{\rho}_{(B)} |i_{1}><i_{1}|) $$
(24)

Using (23) to rewriteFootnote 11 (20) in terms of {|i i >}, it is possible to calculate the result of (24), that is explicitly:

$$ c_{11}^{2} |\pi_{11}|^{2} + c_{21}^{2} |\pi_{21}|^{2} + 2 Re \left (c_{11}^{*}\pi_{11}^{*} c_{21}\pi_{21} \right) $$
(25)

In order to interpret the result in (25), we can observe how in terms of probabilities P(.):

$$\begin{array}{@{}rcl@{}} |\pi_{ij}|^{2} &: & P(b_{i}) \end{array} $$
(26)
$$\begin{array}{@{}rcl@{}} |c_{ij}|^{2}&:& P(b_{j}|a_{i}) \end{array} $$
(27)

where (26) descends directly from (21), expressing the probability that the agent has the belief state |b i >, while interpreting the coefficients c i j as “conditional probabilities” depends on (23).

Generalizing this result, we have found that:

$$\begin{array}{@{}rcl@{}} P(i_{j}) = P(i_{j}|b_{1})P(b_{1})+P(i_{j}|b_{2})P(b_{2}) +2Re\left[A^{*}(i_{j}|b_{1})A^{*}(b_{1})A(i_{j}|b_{2})A(b_{2})\right] \end{array} $$
(28)

where A(.) and A(.|.) are amplitudes of (conditional) probability. Now, if the first row of (28) is still the classical law of total probability, the third additional term, called the ‘interference’ term, introduces an effect that is typical of quantum probability [1, 29].

Finally, to satisfy the normalization for the probabilities of observables defined on the space spanned by {|i 1>,|i 2>}, one must impose \({\sum }_{j} P(i_{j})=1\), which leads to the conclusion that the sum of the interference terms is null. This phenomenon is known in physics as interference patterns [28].

4 The Quantum Probability Network

The examples discussed above outline the main peculiarities of a scheme inspired by quantum mechanics, and the differences, compared with the usage of a classical probability scheme. In this section we will use the same approach as in the previous paragraph, but focusing on possible computational implementations. Thus, it will be introduced the concept of quantum probability networks, or Bayesian quantum networks [3032], which are used as framework for the agent’s decision tree in a quantum-BDI approach.

Consider the same bi-dimensional Hilbert subspaces as in the Examples of Section 3, and the corresponding 4-dimensional ‘tensor product space’ H (B)H (I), with its orthonormal basis {|b 1 i 1>,|b 1 i 2>,|b 2 i 1>,|b 2 i 2>}. This time, we will consider a fully general global state, in density matrix notation:

$$\begin{array}{@{}rcl@{}} {\rho}_{\Psi}=|{\Psi}><{\Psi}|&=&\left( \begin{array}{llll} C_{11}^{*}C_{11}&C_{11}^{*}C_{12}&C_{11}^{*}C_{21}&C_{11}^{*}C_{22}\\ C_{12}^{*}C_{11}&C_{12}^{*}C_{12}&C_{12}^{*}C_{21}&C_{12}^{*}C_{22}\\ C_{21}^{*}C_{11}&C_{21}^{*}C_{12}&C_{21}^{*}C_{21}&C_{21}^{*}C_{22}\\ C_{22}^{*}C_{11}&C_{22}^{*}C_{12}&C_{22}^{*}C_{21}&C_{22}^{*}C_{22}\\ \end{array}\right) \end{array} $$
(29)

Generalizing the considerations that led to (28) in Example (2), it is possible to intuitively interpret:

$$ C_{ij}= A(i_{j}|b_{i})A(b_{i}) $$
(30)

and recalling (26) and (27), it is easy to prove that the following conditions hold: \({\sum }_{j} |A(i_{j})|^{2}=1\) and \({\sum }_{j} |A(i_{j}|b_{i})|^{2}=1\). Finally, it may be also noticed how:

$$ A(j)=\prod\limits_{i} A(j|i) $$
(31)

where the product is performed for all those variables i, from which the j th variable depends.

As a straightforward generalization of the scheme outlined for the sample global space introduced, whatever density matrix \(\hat \rho \) of a global system leads to a structure which can be graphically represented as a Bayesian quantum network. That is, a graph where each node is associated with a em probability amplitude (instead of a probability, like in a Bayesian classical network), but the same rules for the calculus of marginal probabilities are still valid [30].

Following previous work [32], a formal definition of a Bayesian quantum networks, suitable for a computational approach, is the following.

Definition 7

A Bayesian quantum network is a directed acyclic graph D A G(V,E), where V={v 1,v 2,...,v n } and E={e 1,e 2,...,e m } are respectively the sets of nodes and edges. Each node is associated with a complex number \(A(v_{i}|\mathcal {P}_{v_{i}})\), which - in the most general case - is a function of the node v i and its ‘parent’ nodes \(\mathcal {P}_{v_{i}}\). The amplitude A indicates the ‘conditional amplitude’, a concept which is analogous to the conditional probability of classical Bayesian networks.

Conditional amplitudes must satisfy:

$$\begin{array}{@{}rcl@{}} \sum\limits_{i} |A(v_{i}|\mathcal{P}_{v_{i}})|^{2}&=&1 \end{array} $$
(32)
$$\begin{array}{@{}rcl@{}} \sum\limits_{i} |A(v_{i})|^{2}&=&1 \end{array} $$
(33)
$$\begin{array}{@{}rcl@{}} A(v_{i})&=&\prod\limits_{\mathcal{P}_{v_{i}}} A(v_{i}|\mathcal{P}_{v_{i}}) \end{array} $$
(34)

Equation (34) may be also written as: \(A(v.)={\prod }_{v_{i}} A(v_{i}|\mathcal {P}_{v_{i}})\), where it is introduced a vector v., which includes as components all the random variables which are described by the net, therefore: \({\sum }_{v.}(A(v.))^{2}=1\).

From the graphical point of view, this conditional inter-dependence among the nodes is described as a (directed) arc, starting from the parent node, and ending on the child nodeFootnote 12. As in the classical case, each node represents a random variable, but here it is indeed a quantum variable, whose state can be described by a density matrix. Diagonal elements of the density matrix can be interpreted as the probabilities for a possible outcome, when measuring the variable. In general, the graph representing the Bayesian network may have some loops: this relaxes the assumption of an acyclic graph, without losing the main properties of this approach [32].

We stress that, once a correspondence has been established between a density matrix (which is positive-definite), and a Bayesian network, still lack some rules concerning the operations allowed with the density matrix. In particular, consider the application of a hermitian unitary matrix (i.e. an operator), defined in all of the Hilbert space where the possible states of the agent are defined. After the evolution induced by the application of the operator, the final matrix must still satisfy the requirements for a Bayesian network: for its elements the equations (32), (33), (34) must still be valid (see Section 2).

5 The Reasoning of a Quantum BDI Agent

In order to make here a clearer description of how to apply the Bayesian quantum framework to the BDI reasoning, we will focus on the process of ‘attribution of a goal’, where an agent:

  • analyses the main features of its environment, to establish which goals are feasible;

  • understands how they can be produced, and if some of them conflict with others;

  • for each achievable goal, elaborates some intended actions, which fit best the accomplishment of the goal.

In other words, an agent intends an action because of its will to achieve a goal, and it desires goals, which in turn are influenced by the environment he lives in. By ‘intend’ we mean here a possible future behavior of the agent; rather than, the intentions of an agent are declarations about what he will actually do, and up to a certain extent, they are an indication of its real future actions. In principle, an intention does not necessarily need to be accomplished as an action: the attribution of goals and intentions is a process under uncertainty. In fact, a goal may need several actions, which are ruled by multiple pre- and post-conditions.

As pre-conditions one may include, for example: prejudice, competences, work-loads, ... of the agent. They may be directly observed, or indirectly deduced by the actions performed by the agent and its interaction with the environment. These conditions force the agent to follow a plan instead of another, once he believes that it will have the most favourable outcome. Within a Bayesian network nomenclature, factors which can not be directly observed are called latent factors and they are very important in the field of machine learning [33]. However, further discussing their role in the model is far beyond the scope of this work, which restricts the attention to those factors only, which can be trivially deduced a-posteriori with the generalized Bayes’ rule.

For representing the quantum case of the reasoning scheme outlined above, we will refer again to the use of a directed acyclic graph. In Fig. 1 it is shown a Bayesian network of nodes (i.e. random variables), related to beliefs, desires and intentions. The whole graph represents the interdependence of these nodes: conditional relationships embedded in the density matrix. The total pr obability space for the graph is the tensor product of the spaces for the variables:

$$ H_{tot} = H_{\mathbf{b}_{1}} \otimes H_{\mathbf{b}_{2}} \otimes H_{\mathbf{b}_{3}} \otimes H_{\mathbf{b}_{4}} \otimes H_{\mathbf{d}_{1}} \otimes H_{\mathbf{d}_{2}} \otimes H_{\mathbf{i}_{1}} \otimes H_{\mathbf{i}_{2}} \otimes H_{\mathbf{i}_{3}} \otimes H_{\mathbf{i}_{4}} $$
(35)

Tables 1, 2 and 3 are exemplifications of the connections for each node, referred explicitly to the logic spaces of beliefs, desires and intentions. The transition amplitudes among nodes can be used to calculate the global density matrix for the system, and enable the computation of all the conditional distributions. In particular, like in a Bayesian classical network, one may pin some of the variable values, as given by evidences or a-priori probabilities, and then derive all the other probabilities a-posteriori, from the density matrix.

Fig. 1
figure 1

An example of the reasoning scheme for a quantum BDI agent

Table 1 Partial nodes and relative amplitudes of transitions, in the belief space, for the example given in Fig. 1
Table 2 Partial nodes and relative amplitudes of transitions, in the desire space, for the example given in Fig. 1
Table 3 Partial nodes and relative amplitudes of transitions, in the intention space, for the example given in Fig. 1

Theoretically, this derivation is exact, but the number of computational loops - needed for the calculation of the density matrix - increases exponentially with the variables, thus producing an infeasible computational time whenever the number of nodes is huge. This problem can be overcome for applicative purposesFootnote 13 by the adoption of approximate algorithms estimating the density matrix elements with reduced complexity [30].

6 Conclusions and Future Developments

We have proposed a novel framework for the modeling of complex agent-based systems, according to the BDI paradigm. The formalism provides a unified description of the agent reasoning, which includes both deterministic as well as uncertain situations. We envisage that this formalism is also able to cope with noisy environments, which can be a major advantage in the modeling of communication and decision-making systems.

The basis of the formalism proposed is the Heisenberg representation of quantum mechanics, for the particular case of finite-dimensional systems. This formalism has been combined with a Bayesian structure. Such a merge enables a quantum mechanical description of decision processes, and may be easily implemented in future quantum computing tools, profiting of the so-called quantum parallelism to increase the efficiency and implementability of this ‘quantum-BDI’ scheme in decision-making.

An important future development of our scheme may be the description of dynamic systems (i.e. networks dealing with changing beliefs and other pre-conditions): this specific case has been cited several times in this work, but not yet discussed in detail. One of the key problems to solve is how to formulate the logics, so to take into account the additional time-variable, and to adopt consistent time-operators acting on the states of the system, to preserve the basic features of the formulation exposed. Another interesting direction for further investigation is the treatise of continuous variables, thus extending the discrete approach developed here. Such an extension may be invoked in stochastic Petri networks, and therefore in all practical problems underlying this formalism.