# A Lookahead Behavior Model for Multi-Agent Hybrid Simulation
## 4 The Lookahead Behavior Model
### Estimate Value-Based Unlock  
The lookahead process described above has realized the prediction of resynchronization time. This sub-section will detail the manner in which the lookahead process solves the problem of cyclic dependency. The goal of CD in the LBM is to break the cycle of dependency for state updates. This paper proposes a method based on state estimation. The method uses the estimated value for the dependent state to perform the initial state transition calculation, and then uses the final state transition value to replace the estimated one. The estimated value of state \(s_{t}^{k}\) for \(agent_{k}\) in this paper is represented as \({s^{\prime}}_{t}^{k}=\delta_{pre}^{k}(t)\), where \(t\) is the moment when the state will occur in future. The estimated state value can solve the CD between the two agents, as shown in the proof of Lemma 1. **Lemma 1**. : _Estimated value can eliminate the cyclic dependency between two agents at time \(t\) in partial resynchronization._  
Proof. : Assume there is cyclic dependency between \(agent_{1}\) and \(agent_{2}\) at a future time \(t\); that is, the states of \(agent_{1}\) and \(agent_{2}\) satisfy \(s_{t}^{1}=\delta_{ext}^{1}(t,s_{t}^{2}),s_{t}^{2}=\delta_{ext}^{2}(t,s_{t}^{1})\). Then:  
\[\exists i,j\in\mathbb{N},\] \[s.t.\quad t_{i},t_{j}<t,a_{i}^{1}(t_{i})\in\,\mathrm{A}^{1},a_{j}^{ 2}(t_{j})\in\mathrm{A}^{2}\] \[t_{i+1}\geq t,t_{j+1}\geq t\]  
namely, the latest actions performed by \(\mathit{agent}_{1}\) and \(\mathit{agent}_{2}\) before time \(t\) can always be found, and:  
\[s^{\prime 1}_{t},s^{\prime 2}_{t}\text{ satisfies }\left\{ \begin{array}{ll}s^{\prime 1}_{t}= \delta^{1}_{\mathit{pre}}(t_{i}),s^{\prime 2}_{t}=\delta^{2}_{\mathit{ext}}(t,s^{ \prime 1}_{t}),&\text{if}\quad t_{i}\geq t_{j}\\ s^{\prime 2}_{t}=\delta^{2}_{\mathit{pre}}(t_{j}),s^{\prime 1}_{t}=\delta^{1}_{ \mathit{ext}}(t,s^{\prime 2}_{t}),&\text{if}\quad t_{i}<t_{j}\end{array} \right.\]  
The following formula can be obtained: \(s^{1}_{t}=\delta^{1}_{\mathit{ext}}(t,s^{\prime 2}_{t}),s^{2}_{t}=\delta^{2}_{ \mathit{ext}}(t,s^{\prime 1}_{t})\); that is, the states of \(\mathit{agent}_{1}\) and \(\mathit{agent}_{2}\) at time \(t\) are only related to the state of the lookahead prediction. According to Lemma 1, the estimated state values can resolve the CD problem between couples of agents (see the proof of Theorem 1). **Theorem 1. **_The estimated value can eliminate the cyclic dependency between agents in partial resynchronization._  
Proof. : If there is cyclic dependency between \(n\) agents at time \(t\), then according to Definition 1, the following can be obtained: \(s^{1}_{t}=\delta^{1}_{\mathit{ext}}(t,s^{2}_{t}),s^{2}_{t}=\delta^{2}_{ \mathit{ext}}(t,s^{3}_{t}),\ldots,s^{n-1}_{t}=\delta^{n-1}_{\mathit{ext}}(t,s^ {n}_{t}),s^{n}_{t}=\delta^{n}_{\mathit{ext}}(t,s^{1}_{t})\). According to the transitivity of the function, we can determine that: \(s^{1}_{t}=\delta^{1}_{\mathit{ext}}(t,s^{2}_{t}),s^{2}_{t}=\delta^{2}_{ \mathit{ext}}\cdots\delta^{n}_{\mathit{ext}}(t,s^{3}_{t},\ldots,s^{n}_{t},s^ {1}_{t})\). That is, there is cyclic dependency between \(\mathit{agent}_{1}\) and \(\mathit{agent}_{2}\) at time \(t\), which could be defined as \(s^{1}_{t}=\delta^{1}_{\mathit{ext}}(t,s^{2}_{t}),s^{2}_{t}=F^{2}_{\mathit{ ext}}(t,s^{1}_{t})\), where \(F^{2}_{\mathit{ext}}=\delta^{2}_{\mathit{ext}}\cdots\delta^{n}_{\mathit{ext}} (t,s^{3}_{t},\ldots,s^{n}_{t},s^{1}_{t})\) represents a compound function of \(t\) and \(s^{1}_{t}\). From Lemma 1, the estimated value can eliminate the cyclic dependency between \(\mathit{agent}_{1}\) and \(\mathit{agent}_{2}\) at time \(t\); that is, \(s^{\prime 1}_{t},s^{\prime 2}_{t}\) can always be found so that \(s^{1}_{t}=\delta^{1}_{\mathit{ext}}(t,s^{\prime 2}_{t}),s^{2}_{t}=F^{2}_{ \mathit{ext}}(t,s^{\prime 1}_{t})\).