1 Introduction

Classical methods of geophysical data inversion rely on solving optimization problems in a regularized least-squares setting (Vogel 2002; Tarantola 2005). These formulations use a study domain discretized by rectangular prisms (Plouff 1976), which leads to large-scale computational inverse problems since a physical property must be retrieved on each prism. In other cases, irregular meshes with finite-difference methods are preferred (Jahandari and Bihlo 2021). In these scenarios, the role of both the regularizing scheme and the computational procedure are fundamental for dealing with the non-uniqueness on solutions (Smith 1961) within an achievable time. Moreover, the correct values of regularizing parameters are not known; this leads to methods such as the generalized cross-validation presented in Haber and Oldenburg (2000) to estimate the regularization parameter globally, or methods such as in Utsugi (2019), where the L-curve method is used to balance the effect of a combined L\(_1\)-L\(_2\) norm-based regularizing term. See also Reichel and Rodriguez (2013) for an interesting paper regarding ill-posedness in discrete inverse problems. In the worst cases, manual parameter tuning is used. Applications with different constraints (Grandis and Dahrin 2014; Lu and Qian 2015) or regularizing schemes appear in the literature. In Buccini and de Alba (2021) a variational formulation is used, and Deidda et al. (2020b) propose a sparsity-promoting regularizing term, both in electromagnetic induction in the frequency domain. See for example Deidda et al. (2020a) for a MATLAB implementation of inversion of electromagnetic induction in the frequency domain using a nonlinear least-squares setting with a regularization scheme based on truncated singular value decomposition on the Jacobian matrix.

In another way, some authors adopt a solve-then-discretize approach, formulating the geophysical inversion problem in a theoretical framework and then computing derivatives (as in Chaumont-Frelet et al. 2019 for an inverse geophysical resistivity problem) using the adjoint method. These contributions are engaging from a mathematical point of view, but in some applications, the corresponding adjoint operator may be difficult to compute.

Bayesian formulations of geophysical inverse problems are attracting growing attention. See Sambridge and Mosegaard (2002) for a summary. In this approach, the quantities of interest are treated as random variables, and therefore the inversion results would be described by a probability distribution (i.e., the posterior distribution). The numerical inspection of the posterior distribution is performed using Markov chain Monte Carlo (MCMC) methods, where the governing geophysical model equations should be evaluated a large number of times. MCMC methods can be limited by the high dimensionality and nonlinearity of the models, and by multimodality on the corresponding posterior distributions, as described in Mosegaard and Tarantola (1995) and Oh and Kwon (2001). Thus, MCMC implementations are hardly feasible, in terms of computational cost, unless a low-scale surrogate model representation is proposed, as discussed in Fregoso et al. (2020).

Artificial intelligence and heuristic methods are becoming ubiquitous in scientific applications, and their use in geophysical inversion problems is growing steadily. These methods may be preferable to MCMC or local optimization methods because they do not require linearization assumptions and derivative computations, and they avoid numerical instabilities due to matrix inversion (Gallagher and Sambridge 1994). Within this framework, some contributions rely on specific representations for targeting source bodies and develop a genetic algorithm (GA) to retrieve them (see for example de Vasconcelos Lopes and Assumpção 2011; Chen et al. 2006). This is also the focus of the current work. Namely, a numerical representation for the target source bodies is given, and a GA is used to explore a particular space of solutions.

Geophysical natural field methods (gravity and magnetic fields) have been used in archaeological studies, before or during excavations, because they are helpful in accurately delineating sites in a noninvasive way. See Gaffney et al. (2002) and Gaffney (2008) for reviews of geophysical techniques in archaeology. Archaeological magnetic prospecting has been applied to the three-dimensional modeling and inversion of buried structures, taking into account specific aspects of targeting structures (Piro et al. 2007; Cardarelli et al. 2008). Also, in Schettino et al. (2019) and Lodge and Holme (2009), archaeological anomalies are separated from geological source contributions to improve the identification of archaeological features. Assumptions such as the particular shape of the structures and a constant magnetization value to enclose the domain beyond a certain depth are naturally employed.

In this work, the main concerns are focused on presenting a numerical representation for target structures as a surrogate model, which allows one to propose a low-dimensional magnetic inversion problem, overcoming the misleading boundary problem appearing in the estimates obtained from classical regularization schemes. In addition, a suitable numerical procedure based on an evolution strategy is introduced to handle such a representation within the inversion methodology.

The paper is organized as follows: In Sect. 2, the main aspects of the magnetic field equations are reviewed. The proposed representation, model assumptions, and the resulting statement of problems are described in Sect. 3. The evolution strategy steps corresponding to the numerical procedure designed for the proposed representation are described in Sect. 4. This methodology demonstrates capabilities for the reconstruction of sharp structures, such as walls, in the challenging test cases described in Sect.  5. The results and conclusions are discussed in Sect. 6.

2 Physical Model

The equation describing the local surface magnetic field is given by

$$\begin{aligned} A(r)=C \iiint J(r') \cdot \nabla \left( \frac{1}{|\Delta r|} \right) \text {d}{r'}, \end{aligned}$$
(1)

where r is the radius vector from the origin (fixed on a reference point of coordinates \((x_0, y_0, z_0)\) on the surface) to the point of analysis, \(r'\) is the radius vector from the origin to the differential element \(d{r'}\) of the body, constant \(C= \frac{\mu _0}{4\pi }\) ( \(\mu _0=4\pi \times 10^{-7}\)N/A\(^{2}\)) is the magnetic constant, \(\Delta r\) is the difference vector \(r - r'\), and \(J(r')\) is the magnetization vector of the differential element of the body.

By assuming the volume discretization as a three-dimensional set of rectangular prisms, each with constant magnetization, Eq. (1) is consequently discretized and can be solved analytically for each surface reference point. Then, Eq. (1) leads to a linear system of the form

$$\begin{aligned} {{\textbf{A}}{\textbf{m}} = {\textbf{d}}}, \end{aligned}$$
(2)

where \({\textbf{A}}\) is known as the sensitivity matrix, and its entries are computed from the discretization of A(r). The vector \({\textbf{m}}\) is a column vector (unknown) containing the magnetization value of each single prism of the domain discretization, and \({\textbf{d}}\) is a vector containing the observation data or anomaly measured on the surface. More details regarding the construction of the linear system (2) can be found in Blakely (1995).

Solutions to Eq. (2) are typically obtained by defining a regularized least-squares optimization problem

$$\begin{aligned} {{\textbf{m}}^*} = \arg \min _{{\textbf{m}}} \Vert {{\textbf{d}}} - {{\textbf{A}}}{\textbf{m}} \Vert ^2 + \alpha {\mathscr {R}}({\textbf{m}}), \end{aligned}$$
(3)

where \({\mathscr {R}}({\textbf{m}})\) represents a regularization term, and \(\alpha \) is a regularization parameter.

The regularization term in Eq. (3) is also called prior knowledge in the literature, or prior distribution in the Bayesian approach to inverse problems (see Stuart (2010) for a very complete paper on Bayesian inverse problems). This term models information about the in-volume distribution of magnetization values and is independent of the data, as a guess or an estimate. A twice continuously differentiable operator used as a regularization scheme (which is the case of Laplacian or Tikhonov type schemes) implies that \({\textbf{m}}^*\) should also be twice continuously differentiable, not as a vector but as a three-dimensional magnetization distribution. This translates into a smooth variation of the magnetization values in \({\textbf{m}}^*\), even around the boundaries of the source body. It is noted in some papers (e.g. Li and Oldenburg 1996; Fregoso et al. 2015) that source bodies are well located in their reconstructions, but the corresponding boundaries are fuzzy. In the context of archaeological studies, source bodies are sharply defined structures, so the smoothness imposed by the regularization scheme can lead to misleading reconstructions. Therefore, the goal of this work is to obtain estimation results using a regularization strategy that preserves the boundaries of the source bodies. The research hypothesis of this work is that such a goal can be achieved by focusing on the numerical representation instead of a smoothing term.

3 Problem Statement

Archaeological sites are composed of regular structures such as walls, pillars, or tiles. The goal of using magnetic data inversion in archaeological studies is to obtain both the localization and a non-smooth estimation of the shape of these underlying structures.

Partial excavations of archaeological sites are often carried out as part of preliminary studies. During these excavations, information is obtained about epoch, culture, material composition, and depth, among others. This particular scenario, where some information about the site is known but further details are needed before extending the excavation area, motivates the present work.

Information coming from partial excavations of archaeological sites should be incorporated into the optimization problem to reduce the ill-posedness of the inverse problem. However, this information may not be easily encoded in a regularization term. With this in mind, a representation for source bodies that is able to reproduce the walls and/or the columns is proposed. In other words, the methodology of this work is designed to recover rectangular structures instead of full volumetric magnetization maps. Details are described below.

Fig. 1
figure 1

Panel (a) depicts an archaeological site. Panel (b) shows a representation consisting of walls (green and blue), columns (red), and a base ground (yellow)

Figure 1a shows a three-dimensional scene corresponding to an archaeological site. It is noted that the explored area of a site is mainly composed of several walls with similar structural characteristics, and it is therefore assumed that similar structures are present within the unexplored areas. In addition, the depth of such a site is approximately constant. Figure 1b illustrates the proposed representation. First, it is assumed that each structure is located directly above a base ground (yellow in Fig. 1b). The depth of this base ground is assumed to be known from the excavation data and is not being estimated since it acts as a boundary for the depth of the domain. Next, in this context, wall-like structures (represented as cyan, green, and red rectangular prisms in Fig. 1b) are defined by their corresponding corners. Thus, a possible representation for the scenario of Fig. 1 consists of a set of independent rectangular prisms \(\{P_i\}_{i=1}^n\), one for each structure, defined by the coordinates of their respective corners. Then, each prism \(P_i\) will have a constant magnetization response \(J^i\) and will be modified within a numerical process. Note that the three structures in Fig. 1b are equivalent under translation and scaling operations. For example, by moving the green rectangle to the right, reducing its length and increasing its height, the red structure is obtained. This fact becomes advantageous for the numerical process because no assumptions about specific positions, dimensions, number of structures, or intersections between them are needed.

Since the scenario of Fig. 1a can be reproduced as a combination of several structures like those shown in Fig. 1b, it is assumed that an archaeological site is composed of the geometric union of prisms such that

$$\begin{aligned} \bigcup _{i=1}^n P_i, \end{aligned}$$
(4)

where \(P_i\) is defined by its corresponding vertices \(q_i^u, q_i^l\) as shown in Fig. 2. Starting from an arbitrary prism \(P_i\), different structures such as north–south-oriented walls, east–west-oriented walls, or columns with different widths and heights can be generated by moving individual positions of \(q_i^u\) and \(q_i^l\). This is the basic idea behind the numerical method described in Sect. 4.

Fig. 2
figure 2

A single prism \(P_i\) defined by corresponding upper and lower vertices \(q_i^u, q_i^l\) is the basis of the representation

The targeting optimization problem is formulated from the representation (4) as

$$\begin{aligned} {{\textbf{m}}^* =} \arg \min _{\{P_i\}_{i=1}^n}&\Vert {{\textbf{d}}} - {{\textbf{A}}} {\mathfrak {m}(\{P_i\}_{i=1}^n)} \Vert ^2, \\ \nonumber subject to&\end{aligned}$$
(5)
$$\begin{aligned} Z = {q_i^l}_z< {q_i^u}_z < 0, ~~~&for all i = 1, \ldots , n, \end{aligned}$$
(6)
$$\begin{aligned} 0 \le {q_i^l}_x, {q_i^u}_x \le X, ~~~&for all i = 1, \ldots , n, \end{aligned}$$
(7)
$$\begin{aligned} 0 \le {q_i^l}_y, {q_i^u}_y \le Y,~~~&for all i = 1, \ldots , n, \end{aligned}$$
(8)
$$\begin{aligned} area(P_i) \ge 0, ~~~&for all i = 1, \ldots , n, \end{aligned}$$
(9)

where constraint (6) states that each \(P_i\) is located just above a base ground (at a known depth Z), and it is not higher than the surface level. The constraints (7) and (8) are used to keep the prisms \(P_i\) inside the study domain. A bounded domain is assumed, such as \(x\in [0,X]\), \(y\in [0,Y]\), and \(z\in [0,Z]\), where xy, and z denote the coordinates axis. The constraint (9) avoids physically infeasible structures. Furthermore, \({\textbf{A}}\) is the sensitivity matrix of Eq. (2), and the term \(\mathfrak {m}(\{P_i\}_{i=1}^n)\) corresponds to mapping the associated constant magnetization response of every prism in \(\{P_i\}_{i=1}^n\) onto a single vector \({\textbf{m}}\). That is, given a volume discretization in rectangular prisms \({r'}^s\), \(s = 1, \ldots , M\), each prism \(P_i\) has an associated vector \({\textbf{v}}^i = (v^i_1, \ldots , v^i_M)\), with

$$\begin{aligned} v^i_s = \left\{ \begin{array}{cc} 0 &{} , for {r'}^s \notin P_i, \\ J^i &{} , for {r'}^s \in P_i, \end{array} \right. \end{aligned}$$
(10)

where \(J^i\) is the magnetization response associated to the prism \(P_i\). That is, Eq. (10) returns a vector \({\textbf{v}}^i\), of the same size as \({\textbf{m}}\), filled with the \(J^i\) value at prisms \(r'\) enclosed by the prism \(P_i\), and zeros elsewhere.

The vector \(\mathfrak {m}(\{P_i\}_{i=1}^n)\) is then defined as

$$\begin{aligned} {\textbf{m}} = \mathfrak {m}(\{P_i\}_{i=1}^n) = (\mathfrak {m}(\{P_i\}_{i=1}^n)_1, \ldots , \mathfrak {m}(\{P_i\}_{i=1}^n)_M), \end{aligned}$$
(11)

where \(\mathfrak {m}(\{P_i\}_{i=1}^n)_s = \max \{v^i_s\}_{i=1}^n\), for \(s = 1, \ldots , M.\) This provides a configuration of magnetic response values in the entire domain generated by all the rectangular prisms \(\{P_i\}_{i=1}^n\). In other words, the mapping on Eq. (11) assigns a magnetization value different from zero to the rectangular prisms of the discretized domain that are enclosed by any of the rectangular prisms \(P_i\), and the larger magnetization response value \(J^i\) is chosen whenever two or more rectangular prisms \(P_i\) intersect between them. Note that the magnetization response value does not sum at the intersection of two or more prisms \(P_i\). The resulting vector \({\textbf{m}}\) contains constant value \(J(r')\) on small prisms \(r'\) contained in the cyan, red, and green rectangular prisms shown in Fig. 1b. Note that the effect of the base volume (shown as a yellow rectangle in Fig. 1b) is neglected.

Note that Eq. (5) does not explicitly establish a regularization term in comparison with Eq. (3), but this does not mean that (5) has no regularization. On the contrary, since the representation of the unknowns is modified, it follows that the search space for solutions changes. In this case, this space corresponds to the volume that can be covered by the map (11), built from a set of rectangular prisms \(\{P_i\}_{i=1}^n\), restricted to the domain \(\Omega = [0,X]\times [0,Y] \times [0,Z] \subset {{\mathbb {R}}}^3\). Now, observe that a set \(\{P_i\}_{i=1}^n\) covering the whole domain \(\Omega \) is always admissible, so there is no a priori preferred configuration of prisms \(\{P_i\}_{i=1}^n\). Then, they are uniform within \(\Omega \), and the regularization term in Eq. (5), if any, should be a constant that depends only on the domain dimensions and thus does not affect the solution \({\textbf{m}}^*\). In this sense, the representation plays the same role as a regularization scheme and is a key aspect of the formulation presented herein, since, unlike traditional methods, no smoothness is imposed on the solutions.

4 Evolution Strategy

The inversion of geophysical data using stochastic methods is a very active research area (Jamasb et al. 2019; Fernández Álvarez et al. 2008; Pace et al. 2022, 2021; Nava-Flores et al. 2023; Nagihara and Hall 2001; Chen et al. 2006). They are used to treat various geophysical data, not only magnetic data, mainly because stochastic methods make it possible to generate several possible inversion models and to convey a quantitative sense of uncertainty (Caumon 2010; Athens and Caers 2022).

The optimization problem (5)–(9) cannot be solved by gradient descent methods (like Newton’s method), because the mapping (10) is discontinuous. Alternatives could be based on derivative-free methods such as heuristics (see interesting works based on meta-heuristics methods in Balkaya et al. 2017; Nava-Flores et al. 2023), Bayesian methods (see for example Wang et al. 2017; Sambridge and Mosegaard 2002; Oh and Kwon 2001), or evolution strategies. For this aim, evolution strategies (ES) are chosen because the design of the evolution steps can be done straightforwardly and naturally (Beyer 2001; Beyer and Schwefel 2002).

Fig. 3
figure 3

General scheme of an ES algorithm. The population evolves through the ES operations to search for best-fitted individuals

Figure 3 illustrates the general scheme of ES algorithms. They are inspired by biological natural selection (or evolution). The initial set of individuals, or the initial population (in the blue step), is evaluated in a fitness function. This process characterizes individuals according to their fitness level, such that individuals with the highest fitness levels are selected. Selected individuals are crossed and mutated (in the red step) to produce new individuals (red arrow). The similarity between natural selection and ES is driven by the crossover and mutation steps. The goal is to generate new individuals that are sufficiently different from their parents to maintain high fitness across generations. Thus, the new population is composed (in the purple step) of crossed and mutated individuals and their parents (selected best-fit individuals in the white arrow). Now the ES design for the purpose of this work is presented. The algorithm is referred to in the following as the restricted prisms evolution strategy (RP-ES).

Let \({\mathscr {P}}^k\) denote the population in generation k as a set of N individuals

$$\begin{aligned} {\mathscr {P}}^k = \left\{ {\mathscr {P}}^k_j \right\} _{j=1}^N, \end{aligned}$$

where each individual \({\mathscr {P}}^k_j\) is composed of a set of n rectangular prisms that are referred to in the following as RP-ES structures

$$\begin{aligned} {\mathscr {P}}^k_j = (P^k_{j_1}, \ldots , P^k_{j_n}), \end{aligned}$$
(12)

recalling that \(P^k_{j_i} = ({q_{j_i}^u}^k, {q_{j_i}^l}^k)\) for \(i = \{1, \ldots , n\}\), and k indicates the corresponding generation. Then, a mapping is defined as

$$\begin{aligned} f({\mathscr {P}}^k_j) = \mathfrak {m}({\mathscr {P}}^k_j) = {\mathfrak {m}(\{P^k_{j_i}\}_{i=1}^n)}, \end{aligned}$$
(13)

where \({\mathfrak {m}(\{P^k_{j_i}\}_{i=1}^n)}\) is the map defined in Eqs. (10) and (11). The corresponding RP-ES steps are described as follows:

  1. 1.

    Initialization. Each individual \({\mathscr {P}}^0_j\) at initial population \({\mathscr {P}}^0\) is randomly generated as

    $$\begin{aligned} {\mathscr {P}}^0_j = (P^0_1, \ldots , P^0_n),&~ where ~ P^0_{j_i} = ({q_{j_i}^u}^0, {q_{j_i}^l}^0), \\ and {q_{j_i}^u}^0&= ({q_{j_i}^u}_x, {q_{j_i}^u}_y, {q_{j_i}^u}_z)^0, \\ {q_{j_i}^l}^0&= ({q_{j_i}^l}_x, {q_{j_i}^l}_y, {q_{j_i}^l}_z)^0, with \\ {q_{j_i}^l}_x, {q_{j_i}^u}_x&\sim U[x_{\min {} }, x_{\max {} }], \\ {q_{j_i}^l}_x&\le {q_{j_i}^u}_x, \\ {q_{j_i}^l}_y, {q_{j_i}^u}_y&\sim U[y_{\min {} }, y_{\max {} }], \\ {q_{j_i}^l}_y&\le {q_{j_i}^u}_y, \\ {q_{j_i}^u}_z&\sim U[z_{\min {} }, z_{\max {} }], \\ {q_{j_i}^l}_z&= z_{\max {} }. \end{aligned}$$

    Here, \(x_{\min },~y_{\min },~z_{\min },~x_{\max },~y_{\max }\), and \(z_{\max }\) indicate the bounds of the study volume, and U corresponds to a uniform probability distribution. Note that the initial population is generated according to the constraints (6)–(9).

  2. 2.

    Evaluation. The evaluation step is performed by evaluating each individual in the population on the fitness function. According to the equations (5)–(9), the fitness function is defined as

    $$\begin{aligned} F({\mathscr {P}}^k_j) = - \Vert {{\textbf{d}} - {\textbf{A}}}f({\mathscr {P}}^k_j) \Vert ^2, \end{aligned}$$
    (14)

    for the generation k, where f is defined as in Eq. (13). The fitness value of each individual is the result of evaluating that individual in F. Note that the function F is defined as negative because ES algorithms encourage the individuals with the highest fitness to be taken. That is, the ES algorithm maximizes the fitness function. Thus \(F({\mathscr {P}}^k_j)\) is negative for all \({\mathscr {P}}^k_j\), and the highest fitness value is reached when \(F({\mathscr {P}}^k_j) = 0\).

  3. 3.

    Selection. Once all individuals have been evaluated on the fitness function, they are sorted according to the corresponding fitness level to produce

    $$\begin{aligned} \tilde{{\mathscr {P}}}^k = sort \{{\mathscr {P}}^k\}. \end{aligned}$$

    The selected population \(S{\mathscr {P}}^k\) is built as the best \(\left\lfloor {\rho _s N}\right\rfloor \) individuals as

    $$\begin{aligned} {S{\mathscr {P}}^k = \{\tilde{{\mathscr {P}}}^k\}_{j=1}^{\left\lfloor {\rho _s N}\right\rfloor },} \end{aligned}$$

    where \(\rho _s \in [0,1)\) is known as the selection rate.

  4. 4.

    Crossover. The crossed population \(C{\mathscr {P}}^k\), consisting of crossed individuals \(C{\mathscr {P}}^k_j\), \(j \in {1, \ldots , \left\lfloor {\rho _s N}\right\rfloor }\), is generated by crossing individuals coming from the selected population \(S{\mathscr {P}}^k\) according to the following rule

    $$\begin{aligned} {C{\mathscr {P}}^k_j = \left\{ \begin{array}{ll} S{\mathscr {P}}^k_j &{} with probability \rho _c,\\ {\tilde{C}}{\mathscr {P}}^k_j &{} with probability 1 - \rho _c, \end{array} \right. } \end{aligned}$$

    where \({\tilde{C}}{\mathscr {P}}^k_j\) is obtained as follows.

    1. (i)

      Randomly choose \(S{\mathscr {P}}^k_v\), \(v \ne j\).

    2. (ii)

      For each component i of the individual (coordinates of the prisms)

      $$\begin{aligned} {\tilde{C}}{\mathscr {P}}^k_{j_i} = \left\{ \begin{array}{ll} S {\mathscr {P}}^k_{j_i} &{}\qquad with probability \rho _c, \\ (1-\alpha _i) S {\mathscr {P}}^k_{j_i} + \alpha _i S{\mathscr {P}}^k_{v_i} &{}\qquad with probability 1 - \rho _c, \end{array} \right. \end{aligned}$$

      \(\alpha _i\) is randomly chosen from \(\{0,0.5,1\}\) for each i.

  5. 5.

    Mutation. Individuals from the crossed population \(C{\mathscr {P}}^k\) are modified to create a mutated population denoted by \(M{\mathscr {P}}^k\). Each individual \(C{\mathscr {P}}^k_j\), \(j \in {1, \ldots , \left\lfloor {\rho _s N}\right\rfloor }\) is mutated as

    $$\begin{aligned} M{\mathscr {P}}^k_j = \left\{ \begin{array}{ll} C{\mathscr {P}}^k_j &{} with probability \rho _M, \\ {\tilde{M}}{\mathscr {P}}^k_j &{} with probability 1 - \rho _M. \end{array} \right. \end{aligned}$$

    In turn, \({\tilde{M}}{\mathscr {P}}^k_j\) is generated from \(C{\mathscr {P}}^k_j\) by randomly choosing and applying one of the following modifications.

    • Choose x from \(\{-2 \Delta _x, -\Delta _x, 0, \Delta _x, 2 \Delta _x\}\), and y from \(\{-2 \Delta _y, -\Delta _y, 0, \Delta _y, 2 \Delta _y\}\). For every prism \(P_{j_i}^k \in C{\mathscr {P}}^k_j\), move its coordinates as

      $$\begin{aligned} {q_{j_i}^u}^k + (x,y,0), \\ {q_{j_i}^l}^k + (x,y,0), \end{aligned}$$

      with probability \(\rho _M\).

    • Choose z from \(\{-2 \Delta _z, -\Delta _z, 0, \Delta _z, 2 \Delta _z\}\) and a prism \(P_{j_i}^k \in C{\mathscr {P}}^k_j\). Move its height as

      $$\begin{aligned} {q_{j_i}^u}^k + (0,0,z). \end{aligned}$$
    • Choose z from \(\{-2 \Delta _z, -\Delta _z, 0, \Delta _z, 2 \Delta _z\}\). For every prism \(P_{j_i}^k \in C{\mathscr {P}}^k_j\), move its height as

      $$\begin{aligned} {q_{j_i}^u}^k + (0,0,z). \end{aligned}$$
    • Select a single element \(P_{j_i}^k \in C{\mathscr {P}}^k_j\) and perform one of the following actions

      $$\begin{aligned}{} & {} {q_{j_i}^u}^k + (x,0,0), {q_{j_i}^u}^k + (0,y,0), \\{} & {} \quad {q_{j_i}^l}^k + (x,0,0) ~or~ {q_{j_i}^l}^k + (0,y,0), \end{aligned}$$

      where x is chosen from \(\{-2 \Delta _x, -\Delta _x, 0, \Delta _x, 2 \Delta _x\}\), and y is chosen from \(\{-2 \Delta _y\), \(-\Delta _y, 0, \Delta _y, 2 \Delta _y\}\).

    • Every \(P_{j_i}^k \in C{\mathscr {P}}^k_j\) remains equal with probability \(\rho _M\) or is replaced by a new one obtained from the initialization rule (step 1).

    The values of \(\Delta _x, \Delta _y\), and \(\Delta _z\) correspond to the mesh discretization step along the x, y, and z directions, respectively.

  6. 6.

    Update. Build a new population as the union \({\mathscr {P}}^{k+1} = {\mathscr {P}}^k \bigcup M{\mathscr {P}}^k\). Set \(k = k+1\) and repeat from step 2 until convergence.

Now, some important aspects of the RP-ES algorithm are noted. First, since each RP-ES structure is described by only two points (see (4)), the complexity of the problem and the computational cost are greatly reduced. Second, the generation of a new individual \({\mathscr {P}}_0^j\) remains unbiased, as do the elements generated in the ES operations. The latter guarantees an optimal global search over the solution space.

The convergence study of the RP-ES algorithm is beyond the scope of this paper. However, due to the stochastic nature of the ES in general, a study in this direction will reside in Markov chain Monte Carlo theory. This will be explored in future work.

5 Experiments

In this section, the capabilities of the RP-ES method are explored in three synthetic test cases and one real data case. The specific configurations are described in each case. Since the magnetization values of the structures may be known from partial excavation information, and the magnetization value of the surrounding material is also directly observable, it is possible to establish a priori known contrast magnetization values. In the synthetic experiments, the contrast magnetization value is 1 A/m for each structure, and the magnetization of the surrounding medium is assumed to be zero A/m. Gaussian noise with mean \(\mu = 0\) and variance \(\sigma ^2 = 1\% \) of the maximum anomaly value is also added.

For a quantitative evaluation of the algorithm performance, the root mean square error (RMSE) and the relative root mean square error (RRMSE) are calculated according to the following expressions

$$\begin{aligned} \textrm{RMSE}&= \sqrt{ \frac{1}{s} \sum _{i=1}^s (x_i - {\hat{x}}_i)^2}, \\ \textrm{RMSE}&= \sqrt{ \frac{\frac{1}{s} \sum _{i=1}^s (x_i - {\hat{x}}_i)^2}{\sum _{i=1}^s {\hat{x}}_i^2}}, \end{aligned}$$

where \(\{x_i\}_{i=1}^s\) is a set of true values and \(\{{\hat{x}}_i\}_{i=1}^s\) is a prediction set for those true values. Thus, the RMSE and RRMSE are computed to evaluate the RP-ES estimation in two aspects: in the first, the true data \(\{x_i\}_{i=1}^s\) are the anomaly data, and therefore the predictions \(\{{\hat{x}}_i\}_{i=1}^s\) are obtained by evaluating Eq. (13) for the elite estimates. This evaluation will be referred to as the anomaly RMSE and the anomaly RRMES, respectively. The second aspect is the evaluation of the in-volume estimation. Then the true data corresponds to the vector \({\textbf {m}}\) of the test case, and the prediction corresponds to the vector \({\textbf {m}}\) obtained from the elite estimation of the algorithm. This is hereinafter referred to as the structures RMSE. The results corresponding to each test case are reported in Tables 12, and 3.

5.1 Parameter Tuning

In all the experiments, several runs were performed to choose a good parameter setting for the RP-ES algorithm. The values of the parameters were chosen on the basis of the recommendations reported in Balkaya et al. (2017): selection rate \(\rho _s = 0.5\), crossover rate \(\rho _c = 0.95\), and mutation rate \(\rho _M = 0.5\). Then, the values were changed slightly one at a time, and a run of 1,000 iterations was performed. The combination of values that gave the best qualitative result was chosen, and 20 runs of 2,000 iterations were performed to obtain the statistics reported below.

The number of iterations was chosen by observing the graph of the fitness function. In all cases it was observed that the negative logarithm of the fitness function drastically reduces its value before the first 1,000 generations (see for instance Fig. 5). After the first 1,000 generations, the changes were minor. Thus, after 2,000 iterations, no large changes in the estimate are expected.

The most important concern in the parameters of the algorithm is the number of individuals and the number of RP-ES structures of the algorithm. Both are tunable parameters that involve a trade-off between the complexity of the reconstruction and the computational cost. Thus, one of the main advantages of the presented formulation is that it is able to provide reasonable estimates even when the number of source bodies is unknown (as is confirmed by the experiments below). To do this, the RP-ES algorithm must be set up with a sufficiently large number of RP-ES structures n. In principle, the number of individuals N can be determined as a factor of the number of RP-ES structures n. Suppose \(N = kn\) with \(k > 0\). Then N should be large enough. However, since each individual must be evaluated in the fitness function, the computational cost could grow rapidly as n increases.

On the other hand, during the experiments it was observed, first, that a very large number of RP-ES structures n concerning the number of source bodies leads to a slow execution of each iteration of the RP-ES algorithm, and second, it turns out that the RP-ES structures tend to a single mean structure. This is illustrated in the following example. In a test case with, say, two source bodies, using a value of \(n \approx 20\), some RP-ES structures of one individual identify one source body, and some RP-ES structures of another individual identify the other source body. Then, after the ES steps, the RP-ES structures are averaged, resulting in RP-ES structures located in the middle of the two source bodies that are difficult to move toward either source bodies since both are equally close. This situation becomes more common as n grows or when there are multiple source bodies close together. This is taken into account when choosing the number of prisms in each experiment.

5.2 Single Wall Case

Consider a single wall that is represented as a rectangular prism with a length of 10 m in the north direction, a height of 3 m, and a thickness of 1 m (in the east direction). This wall is placed at 5 m north, 10 m east, and 5 m depth as shown in blue in Fig. 4a. The dashed black lines are the corresponding vertical profiles for the wall. The constant magnetization of this wall is assumed to be 1 A/m. The anomaly generated by this source body with additive Gaussian noise is shown in Fig. 4b. The location of the source body is shown in white, and the contour lines of the anomaly are shown in black.

Fig. 4
figure 4

Single wall column test case. The wall is represented as a rectangular prism in panel (a). The corresponding noisy anomaly is shown in panel (b)

A north-facing inversion domain with dimensions of 20 m \(\times \) 20 m horizontally and 5 m vertically is considered for this test case. It is discretized as prisms of 1 m \(\times \) 1 m horizontally and 0.5 m vertically. The magnetic anomaly is assumed to coincide with the surface of the inversion domain. This is as 20 m \(\times \) 20 m with a spacing of 1 m in each direction. This results in 2,000 rectangular prisms and 400 anomaly data points. The magnetization of the wall is 1 A/m, and it is assumed that the surrounding domain has magnetization of 0 A/m. It is assumed that the anomaly corresponds to a site located at geographic coordinates 20.745611\(^\circ \) N and \(-\)104.164944\(^\circ \) E, altitude 1,450 m above the sea level, and observed in the year 2019. There is no particular reason for choosing this geographic location and year.

The parameters of the RP-ES algorithm are defined as follows: \(n = 5\) RP-ES structures, \(N=100\) individuals, selection rate \(\rho _s = 0.5\), crossover rate \(\rho _c = 0.8\), and mutation rate \(\rho _M = 0.8\). These parameters of the RP-ES algorithm have been chosen to promote the search in the space of solutions (\(\rho _c\) and \(\rho _M\) high) (Balkaya et al. 2017).

To monitor the performance of the numerical procedure, and to compare the estimation with the ground truth, the plots in Fig. 5 are generated along the RP-ES iterations. In each plot, the 2,000 prisms \(r'\) comprising the volume study are arranged on a single array and formed along the horizontal. The corresponding y-axis indicates the associated magnetization value for each prism \(r'\) (array entry). Blue markers with a value of 1 A/m indicate prisms constituting the ground truth (wall in Fig. 4a), while blue markers with values of 0 A/m correspond to prisms in the surrounding medium. Red markers correspond to the approximation. Figure 5a, b, and c show the plots corresponding to the estimation given by the best-fit element (elite), at 500, 1,000, and 5,000 generation numbers, respectively, in red circular marks. In this sense, the red and blue markers coincide when the elite estimate and the source body exactly match.

The algorithm is run for 5,000 generations in this test case, and it is observed that the negative fitness value decreases very rapidly during the first 1,000 generations. The remaining iterations are presented here to illustrate the numerical convergence and stability of the RP-ES algorithm near the solution in this test case.

Fig. 5
figure 5

The performance of the elite approximation is shown in blue. Comparison plots of the elite estimation against the source body are shown in panels (a), (b), and (c)

In Fig. 6, the approximation corresponding to the elite element after 5,000 generations of the RP-ES algorithm is shown in red for the single wall test case (shown in blue). Note that because the approximation is very close to the source body, the red and blue structures are indistinguishable in both perspective and plain views (Fig. 6a and b, respectively).

Fig. 6
figure 6

Estimation for single wall test case after 5,000 generations is shown in red. The source body is shown in blue in panel (a) and in white in panel (b)

Recall that each individual \({\mathscr {P}}^k_j\) of the population in the RP-ES algorithm is composed as the mapping Eqs. (10) to (11) which allows intersection between the RP-ES structures \(P^k_{j_i}\), \(n = 5\) for this test case. The fact that this test case is composed of a single source body and the number of RP-ES structures is greater than 1 is not a drawback for the algorithm. As can be seen in the equations from (10) to (13), the mapping \({\mathscr {P}}^k_j\) is defined as the union of its corresponding structures \(P^k_{j_i}\), so the intersection of such structures is allowed. As a resulting behavior, in Fig. 6, the \(n = 5\) RP-ES structures forming the elite element are overlapped on a single coincident red rectangular object. In other words, this simple test case shows that the RP-ES algorithm can handle more RP-ES structures than the number of existing source bodies.

To explore the robustness and stability of the algorithm, 20 independent runs of 2,000 generations were performed. The elite elements at the end of each run were averaged to produce a mean estimate. This average is plotted in Fig. 7. In Fig. 7a, the vertical profile of the averaged elites in the northern direction is shown. In Fig. 7b, the vertical profile in the eastern direction is shown, and the in-plant view is shown in Fig. 7c. In all three panels, the position of the source body is marked by a white dashed line.

Fig. 7
figure 7

Average approximation obtained from the elite individuals after 2,000 generations in 20 independent runs. Panel (a) shows the northward profile, panel (b) the eastward profile, and panel (c) the in-plant view. The color bar indicates the magnetization level in A/m, and the dashed white line indicates the position of the source body

As a complement to the estimates shown in Fig. 7, and with the aim of examining the uncertainty of these estimates, Fig. 8 shows histograms generated from the coordinate positions of each RP-ES structure in each elite estimate for the same 20 independent runs of Fig. 7. The histograms correspond to the directions east (Fig. 7a), north (Fig. 7b), and depth (Fig. 7c), and the position of the source body is indicated by black dashed lines. For example, in the eastern direction, the source body is located at 10 m and has a width of 1 m. Then two vertical lines at 10 m and 11 m are drawn in Fig. 7a. Two aspects are observed in the histograms: first, the positions of most of the estimating prisms within the elite elements are often close to the position of the source body (see Fig. 7a, b), and as a second aspect, some other RP-ES structures comprising elite elements are allowed to move uniformly within the region enclosed by the source body, which corresponds to the space in between the black dashed lines.

Fig. 8
figure 8

Histogram of the positions in the coordinate directions of all the RP-ES structures comprising the elite individuals. The position of the source body is indicated by the dashed black lines

The values of anomaly RMSE, anomaly RRMSE, and structures RMSE are reported in the first row of Tables  12, and 3. The first column corresponds to the error values for the average estimation (see Fig. 7a–c). The remaining columns show the statistics of the errors for the elite estimates of the 20 independent runs. It can be observed that the anomaly RMSEs are low, and represent on average less than 20% of the error, as indicated by the anomaly RRMSE. Moreover, in some runs the structures RMSE error is 0 nT.

5.3 Two Structures Case

In this test case, two rectangular structures are considered as source bodies. This test case is inspired by the synthetic test case presented in Balkaya et al. (2017). The difference between this test case and the test case of Balkaya et al. (2017) is that the bottom of the source bodies is placed up to 3 m for both. The reason for this is to make this test case suitable for applying the RP-ES method. Namely, the structures should be placed above a base ground (see the constraint in Eq. (6)). Figure 9 shows the results for this test case. The first structure is a rectangular prism with lengths of 7 m in the east, 3 m in the north, and a height of 2 m, located at 4 m in the east, 6 m in the north, and 1 m in the depth. The second structure has lengths of 4 m in the east direction, 4 m in the north direction, and 2.4 m of height, which is located at 13 m in the east and north directions and 0.6 m of depth. Both structures have a magnetization of 1 A/m, and their corresponding vertical profiles in the eastern and northern directions are also drawn in the dashed black line in Fig. 9a. Also in Fig. 9a, the elite estimate of a single run after 5,000 iterations is shown in red. In Fig. 9b the corresponding magnetic anomaly is shown, and the locations of the source bodies are indicated by white lines.

Fig. 9
figure 9

Average approximation obtained from the elite individuals after 2,000 generations in 20 independent runs for the two structures test case (panel (a)). The synthetic anomaly is shown in panel (b). Panels (c)–(e) show the average estimation in the in-plant, east, and north views, respectively. The color bar indicates the magnetization level in A/m, and the dashed white line indicates the position of the source body. The comparison plot corresponding to the estimation after 5,000 generations (in red in panel (a)) is shown in panel (f). Histograms for the positions in east, north, and depth positions are shown in panels (g)–(i)

The inversion domain is considered to be a volume of 20 m \(\times \) 20 m in the horizontal and 3 m in the vertical. The domain is discretized by rectangular prisms of 1 m \(\times \) 1 m in the horizontal and 0.1 m in the vertical. This is a total of 12,000 rectangular prisms. The anomaly discretization corresponds to the horizontal discretization of the inversion domain. This corresponds to 400 anomaly data points (this anomaly is shown in Fig. 9b). The geographic location and date are the same as in the previous test case.

For the setting of the RP-ES algorithm, a selection rate \(\rho _s = 0.5\), a crossover rate \(\rho _c = 0.95\), and a mutation rate \(\rho _M = 0.5\) are used. These values were chosen to be similar to the setting of the methodology of Balkaya et al. (2017). The number of individuals N is assumed to be \(N = 200\), and are composed of \(n=10\) RP-ES structures.

Similar to the previous test case, the robustness of the method is examined. Twenty independent runs of 2,000 iterations were performed, and the elite estimation of each run is used to compute an estimation average. The average estimation in plant view is shown in Fig. 9b. The corresponding vertical profiles in the east and north directions are shown in Fig. 9d and e, respectively. It can be observed that the estimates succeed in identifying the horizontal position and height of both source bodies and have small differences at the base of the bodies. In general, in this test case, some runs present certain differences between the elite estimation and the source bodies (see the comparison plot in Fig. 9f), most of the time near the base of the bodies. However, after averaging, the discrepancies become insignificant.

Figure 9g, h, and i show the histograms corresponding to the positions in the east, north, and depth directions, respectively. In these histograms, compared to the previous test case, it is more obvious that the histograms present multimodal frequencies. Moreover, the modes in each histogram coincide with the positions where the edges of the source bodies are located. Even in the depth histogram, the estimates are able to identify the two different heights.

The ability of the method to retrieve very shallow structures with varying heights between them is explored in this test case. Since the RP-ES approach requires the structures to be placed directly above the base ground, a direct fair comparison of the RP-ES result with the result reported in Balkaya et al. (2017) is not possible. However, it is noticeable that knowing the correct number of structures is not a limitation for the RP-ES algorithm. That is, \(n=10\) RP-ES structures are used to estimate only two existing source bodies. In fact, it turns out that over the iterations of the RP-ES algorithm, one source body is estimated as a composition of some RP-ES structures, while the other source body is identified as a composition of the remaining RP-ES structures. This composition allows overlap and intersection between the RP-ES structures, and this is the reason for observing that RP-ES structures are estimated at positions in between the modes in the histograms in Fig. 9g–i. This behavior is an automatic benefit with the presented formulation, since knowledge of the exact number of existing source bodies is not mandatory in either the problem formulation (Eqs. (3)–(9)) or the configuration of the evolutionary algorithm.

The anomaly RMSE, anomaly RRMSE, and structures RMSE are reported in the second row of Tables 12, and 3. The first column in these tables shows the average estimation values shown in Fig. 9c–e. The remaining columns show the statistics of the errors for the elite estimates of the 20 independent runs. It can be seen that the anomaly RMSE is slightly larger than in the single wall test case. However, in percentage terms, this test case presents a better estimation, since the anomaly RRMSE is below 7% in all the runs, and the standard deviation is extremely low. This behavior is also consistent with the structure RMSE values in Table 3.

5.4 Four Structures

The next synthetic test case is designed to explore the accuracy of the algorithm in a challenging and realistic test case. Specifically, since the methodology is intended to be applicable to archaeological sites, it is expected that the underlying structures will have thin walls, with intersections, and perhaps different heights. This is intended to be represented with the test case shown in Fig. 10.

For this test case, the inversion domain is also taken as the single wall test case: 20 m \(\times \) 20 m horizontally and 5 m vertically. The spacing is 1 m in the horizontal, east, and north directions and 0.5 m in the vertical, for a total of 2,000 rectangular prisms in the discretization domain. The same values for latitude, longitude, elevation, and year are used as in the previous test cases.

The four walls that constitute this test case are as follows: first, a wall 1 m thick, 10 m long in the north direction, and 2 m height, located at 5 m in the east direction, 5 m in the north direction, and 3 m in depth; the second is a wall 1 m thick, 10 m long in the north direction, and 2 m height, located at 10 m in the east direction, 5 m in the north direction, and 3 m in depth; the third is a wall 1 m thick, 7 m long in the north direction, and 3 m height, located at 15 m in the east direction, 10 m in the north direction, and 2 m in depth; and the fourth is a wall 1 m thick, with length of 8 m in the east direction, and 3 m height, located at 7 m in the east direction, 10 m in the north direction, and 2 m in depth. Each wall has a magnetization of 1 A/m. The regions where the walls intersect also have magnetization equal to 1 A/m. See blue prisms in Fig. 10a.

For the RP-ES setting, \(N = 200\) individuals are employed, and \(n=10\) RP-ES structures are used. The selection, crossover, and mutation rates are also assumed to be the same as in the previous test cases.

Fig. 10
figure 10

Average approximation obtained from the elite individuals after 2,000 generations in 20 independent runs for the four structures test case (panel (a)). The synthetic anomaly is shown in panel (b). Panels (c)–(e) show the average estimation in the in-plant, east, and north views, respectively. The color bar indicates the magnetization level in A/m, and the dashed white line indicates the position of the source body. The comparison plot corresponding to the estimation after 5 000 generations (in red in panel (a)) is shown in panel (f). Histograms for the positions in east, north, and depth positions are shown in panels (g)–(i)

The elite estimate is shown in red in Fig. 10a, and the corresponding anomaly is shown in Fig. 10b, with the test case structures in white. In Fig. 10a, it can be seen that in this test case, the estimation of the RP-ES algorithm is not as precise as in the previous test cases. In particular, the estimated height is not accurate. However, in the plant view (see Fig. 10c), it is noted that the horizontal estimation is acceptable considering that the difficulty of this test case lies in the estimation of the wall in the middle. In general, the horizontal estimation is acceptable and the estimation of the heights of the source bodies presents opportunity areas (see Fig. 10d and e). The height and estimate for the central wall correspond to the discrepancies observed in the comparison plot in Fig. 10f and in Fig. 10g–i.

Although the results for this test case presented in Fig. 10 do not appear to be accurate, it is observed in the third row of Tables 1 and 2 that the error values are comparable to the anomaly RMSE and anomaly RRMSE values obtained in the previous test cases. Thus, the anomaly reproduced from the RP-ES estimates is comparable to the data, although the volumetric reconstruction has inaccuracies, as seen in the value of structures RMSE reported in Table 3.

5.5 Real Data Case

The archaeological site known as Palacio de Ocomo is located in the municipality of Oconahua in Jalisco, México, with geographic coordinates \(-\)104.1670909\(^\circ \) E, 20.7455698\(^\circ \) N. This site contains a main structure (the Palacio) which is a sunken courtyard 130 m long with an approximate height of 8 m. This settlement belongs to the Grillo tradition and was inhabited between 450 and 900 BC (Secretaría de Cultura 2019).

This archaeological site has been partially explored in several campaigns since 2008 under the supervision of Professor Montgomery Morales et al. (2020), and in 2015 a group of researchers and students from the University of Guadalajara went to the site to take measurements of the magnetic field (see magnetic anomaly data in Fig. 11b).

The main structure remains covered by filling material, and the magnetic field data were measured over a refilled section of the main structure. A rectangular area of 17 m to the east and 18 m to the north with 1 m spacing in each direction was taken in the northernmost part of the third exploration phase. The magnetic anomaly was pre-processed by substracting the diurnal variation and the local international geomagnetic reference field (IGRF) (for more details on the location of the site and exploration phases see Morales et al. (2020)).

Fig. 11
figure 11

Average approximation obtained from the elite individuals after 2,000 generations in 20 independent runs for El Palacio de Ocomo anomaly data (panel (b)). Panel (a) shows the best elite estimation of the 20 runs. Panels (c)–(e) show the average estimation of in-plant, east, and north views, respectively. The color bar indicates magnetization level in A/m. Histograms for the positions in east, north, and depth directions are shown in panels (f)–(h)

An inversion domain consisting of 17 \(\times \) 18 rectangular prisms with a side length of 1 m and a height of 0.5 m is considered. This assumes that the structures are found at a depth of 6 m. The number of individuals is \(N=700\), and each individual is composed of \(n=10\) RP-ES structures. The RP-ES parameters are kept as selection rate \(\rho _s = 0.5\), crossover rate \(\rho _c = 0.95\), and mutation rate \(\rho _M = 0.5\). The magnetization of the underlying structures is assumed to be 2 A/m.

The results of the RP-ES algorithm for this test case, after 20 independent runs of 2,000 iterations each, are shown in Fig. 11. Figure 11a shows the estimation given by the best elite at the end of the 20 independent runs. The anomaly data are shown in Fig. 11b. The mean estimate in plant view and the corresponding vertical profiles in the east and north directions are shown in Fig. 11c, d, and e, respectively. As in the previous test cases, the histograms for the positions in east, north, and depth directions are computed and shown in Fig. 11f, g, and h, respectively.

This test case evaluates the capabilities of the RP-ES algorithm to provide evidence of the underlying structures when processing real anomaly data. The estimated structures generated by the algorithm near position 0 m in the east and 0 m in the north directions correspond to existing structures that are reported in Morales et al. (2020). However, the resolution is not accurate due to the resolution of the anomaly data. That is, the data were observed with a spacing of 1 m while the underlying structures have a thickness of about 30 cm. In other words, better results would be obtained with finer data.

The corresponding values of anomaly RMSE and anomaly RRMSE are shown in the fourth row of Tables 1 and 2. The structures RMSE cannot be computed in this case because the correct location and magnetization values of the source bodies are not fully available at this moment. In the tables, it is observed that the estimate provided by the algorithm has opportunity areas, and at least qualitatively it is noted that some of the estimated RP-ES structures appear close to existing structures in the archaeological site. The improvement of these results and the acquisition of finer data are planned for future work.

Nevertheless, it is noteworthy that the algorithm produces an estimated structure near 16 m in the east and 14 m in the north directions. This particular structure has not been studied during the exploration stages by the archaeological team. In this sense, the methodology presented herein is suitable for identifying the location (horizontal and vertical) and the size of structures, at least to complement preliminary studies.

Table 1 RMSE statistics for the anomalies computed from the elite estimates for the four test cases presented
Table 2 Relative RMSE statistics for the anomalies computed from the elite estimates for the four test cases presented
Table 3 RMSE statistics for the anomalies computed from the elite estimates for the four test cases presented

To the understanding of the authors of this work, the approach in this paper is very similar to that of (Balkaya et al. 2017). Balkaya et al. (2017) presented a differential evolution algorithm and prismatic bodies (similar to the RP-ES structures) for inversion of magnetic anomalies. In the following, the methodology of Balkaya et al. (2017) is referred to as a prismatic bodies differential evolution (PBDE). The results of the PBDE algorithm for estimating the magnetization, location, inclination, and declination of source bodies are excellent whenever it is a matter of reconstructing a few source bodies. However, the PBDE method requires prior knowledge of the correct number of source bodies.

In order to perform a comparative analysis of the presented methodology, a Python version of the PBDE algorithm is implemented and run on the same test cases described in Sects. 5.25.5. For a fair comparison, the magnetization of the source bodies, inclination, and declination are fixed and will not be estimated by either of the two methods. The parameters for selection, mutation, and crossover rates are the same for both algorithms. The scenario in which this comparison takes place assumes that the number of existing source bodies is unknown. Therefore, both algorithms PDBE and RP-ES are run with the same settings. More specifically, 20 independent runs of the PBDE are performed for 2,000 generations each, using the number of individuals and RP-ES structures, or prismatic bodies, reported in each test case. Note that prisms outnumber structures.

Similar to the results reported for the RP-ES method, the 20 elite elements obtained after the 2,000 generations are taken. A single estimation element is constructed as the average of the 20 elites, and the magnetic anomaly is calculated. The RMSE and RRMSE of this magnetic anomaly, concerning the anomaly data, are reported in the seventh column of Tables 1 and 2, respectively. On the other hand, the anomaly is calculated for each elite individual, and the RMSE and RRMSE are calculated with respect to the anomaly data. These 20 RMSE and RRMSE values are averaged and reported in the eighth column of Tables 1 and 2, respectively. Thus, the second column is compared to the seventh column, and the third column is compared to the eighth column. It is observed that the performance of the RP-ES algorithm improves as the number of source bodies increases.

6 Discussion and Conclusions

A computational methodology suitable for archaeological prospecting from magnetic data inversion is presented. Information assumed to be available in the field, such as that previously obtained during archaeological excavations, has been used in a straightforward manner within the problem formulation as a numerical representation and as corresponding constraints.

From the results obtained in the test cases, it is possible to see that the low-dimensional representation allows the identification of regular structures as columns or walls, avoiding smoothing or the overestimation effects that would appear when using traditional regularization schemes. In other words, the presented approach is capable of searching for solutions to the geophysical inversion problem within a space of noncontinuous three-dimensional magnetic response maps.

An evolutionary algorithm, namely RP-ES, is attached to the proposed representation to obtain numerical solutions to the associated inversion problem. The RP-ES algorithm provides acceptable results using the parameters recommended in the literature regarding evolution strategies. Only two parameters of the algorithm are free: the number of iterations and the number of prisms comprising each individual (RP-ES structures). From experiments on three synthetic test cases and one real data case, it has been observed that the proposed procedure is able to provide suitable approximations with relatively few iterations (about only 2,000 iterations) and that slightly better results are obtained by increasing the number of iterations (up to 5,000 for example).

An advantage of this method is its robustness to the number of RP-ES prisms. That is, in this formulation, prior knowledge of the exact underlying source bodies is not a limitation. In particular, a greater number of RP-ES prisms than the number of underlying source bodies does not produce artifacts such as nonexistent structures. This is supported by the comparative study of the RP-ES algorithm versus the PDBE method in synthetic and real data test cases. As expected, using fewer RP-ES prisms than objects does not identify all the structures, but this limitation can be overcome by running the method several times or setting the number or RP-ES prisms high, which results in a slight increase in computational cost.

Due to the random nature of the method, different structures would be retrieved each time, but on average, correct estimates of the source bodies are retrieved as an average of several independent runs, as is supported by the robustness analysis in the four cases studied.

Increasing or decreasing the number of prisms on individuals at the run-time of algorithm executions would be interesting to address in future studies using birth-death processes. The use of different meta-heuristics to reduce the computational cost would also be desirable.

Finally, the scope of this methodology is not limited to archaeological studies or synthetic cases. In fact, the presented methodology could be applied to gravimetric data inversion, or to potential data in general, by simply modifying the anomaly equation. Moreover, it could be applied to larger areas for diverse purposes besides archaeological.