# Autonomous Agent Navigation Model Based on Artificial Potential Fields Assisted by Heuristics
## 3 Proposed Approach
### Proposed Potential Function  
In order to merge the properties of the abovementioned functions but to avoid the downsides, the Agnesi function (Equation (5)) is proposed as a potential function. It is defined as follows:  
\[f_{p}(x)=\frac{8a^{3}}{x^{2}+4a^{2}} \tag{5}\]  
If necessary, it can be expressed in more dimensions:  
\[f_{p}(q)=\frac{8a^{3}}{q_{1}^{2}+4a^{2}}\hat{\hat{i}}+\frac{8a^{3}}{q_{2}^{2}+ 4a^{2}}\hat{\hat{j}} \tag{6}\]  
where \(\hat{\hat{i}}\) and \(\hat{\hat{j}}\) are unit vectors and \(q\in\mathbb{R}^{2}\) for the two-dimensional case (Equation (6)). There is no limit for the number of dimensions. The operation of these equations in three-dimensional environments was documented in [18]. This function was introduced in _The Treatise on Quadrature_ by [PERSON] in 1659. In 1703, [PERSON] discussed the curve in _Quadrature circuli et hyperbolae_ and named the curve as _versoria_. In 1748, [PERSON] published _Instituzioni analitiche ad uso della gioventi italiana_ and referred to the curve as _versiera_, a word that later would be erroneously translated as _witch_[38; 39]. Geometrically, this curve is constructed with any two given points \(O\) and \(M\). Diameter \(OM\) defines a circle. Given a point \(A\) in the circle, a secant line \(OA\) is drawn and extended up to the tangent line of the circle at point \(M\). If a perpendicular line to \(OM\) that touches point \(A\) and a parallel line to \(OM\) through point \(N\) are drawn, then the intersection of both lines at point \(P\) defines the Agnesi curve. Constant \(a\) is the radius of the \(OM\) circle (see Figure 2). The Agnesi function is continuous and differentiable in the \((-\infty,\infty)\) domain. Constants \(k_{1}\) and \(k_{2}\) (Equation (7)) are added to help control magnitude and width (Figure 3). With these modifications, the behavior of the square hyperbola can be achieved without the asymptote at 0. Figure 2: Geometrical definition of the Agnesi curve. \[f_{p}(x)=\frac{k_{1}8a^{3}}{(k_{2}x)^{2}+4a^{2}} \tag{7}\]  
Let \(\vec{q}\) and \(\vec{q_{d}}\) be position vectors; then, the error vector (Equation (8)) and its magnitude (Equation (9)) are defined as  
\[\vec{e}=\vec{q}-\vec{q_{d}} \tag{8}\]  
\[||\vec{e}||=\sqrt{e_{x}^{2}+e_{y}^{2}} \tag{9}\]  
Rewriting the Agnesi function (Equation (10)), we obtain  
\[f_{p}(e)=\frac{k_{1}8a^{3}}{(k_{2}||\vec{e}||)^{2}+4a^{2}} \tag{10}\]  
Thus, the generated force (Equations (11) and (12)) is given by  
\[F_{x}=\frac{-2c_{1}k_{2}e_{x}}{(k_{2}^{2}(e_{x}^{2}+e_{y}^{2})+c_{2})^{2}} \tag{11}\]  
\[F_{y}=\frac{-2c_{1}k_{2}e_{y}}{(k_{2}^{2}(e_{x}^{2}+e_{y}^{2})+c_{2})^{2}} \tag{12}\]  
where \(c_{1}=k_{1}8a^{3}\) and \(c_{2}=4a^{2}\). Figure 4 shows the difference between the fields produced by a quadratic function and the Agnesi curve. Notice that the influence zone of the field generated by the Agnesi curve is limited and that force decreases with distance, thereby reducing the possibility of creating undesired local minima. The field decreases rapidly to 0 at the target point. This feature is particularly useful for tracking, that is, keeping a distance from a moving object due to a strong field that keeps the agent close to the local minimum. Figure 3: Force generated in \(x\) using the Agnesi curve as a potential function. In contrast, a quadratic function creates a field that decreases gradually when the distance to the target decreases. This has two important consequences: first, if the agent is considerably far, the force will be high enough to produce undesired accelerations. Second, the force close to the target is low; thus, the agent can easily become deviated. With this approach, it is possible to define different types of interactions by changing parameters \(a\), \(k_{1}\) and \(k_{2}\), guaranteeing that the field always exists in the \((-\infty,\infty)\) domain, given that the potential function has no discontinuities. The modified Agnesi curve mentioned above can generate a smooth field leading to the target but avoiding the exponential growth with distance.