## 3 Results  
First, the NSGA II was used to optimize the metal thickness, the semiconductor thickness and the refractive index, and the number of graphene/TMDC monolayers without minimization of the reflectivity level. The reflectivity curves for the optimized configurations with the best sensitivity and narrowest FWHM are shown in Figure 3. The black line \begin{table}
\begin{tabular}{c c c c c} \hline
**L.N.** & **Parameters** & **Parameter Space** & **Objectives** & **Constraints** \\ \hline
1 & Ag thickness & 0–100 nm & -Sensitivity & \(<\)–200 deg/RIU \\
2 & Semiconductor’s thickness & 0–50 nm & FWHM & \(<\)10 deg \\  & Semiconductor’s & 1.34–4 & Reflectivity & \(<\)1\% \\  & refractive index & & at resonance & \\
4 & No. of 2D & & & \\  & material monolayers & 1–10 L & & \\ \hline \end{tabular}
\end{table} 
Table 1: Parameter space, objectives and constraints used in NSGA II algorithm. Figure 2: Schematics of the implementation of the NSGA II algorithm alongside TMM. represents the response of the configurations that present an enhanced sensitivity, whilst the red line indicates the configurations with narrow reflectivity curves (small FWHM). The convergence plots of objectives and layers can be found in Supplementary Information Figure S1. The results clearly show that, whereas in order to enhance sensitivity, the thickness of the silver layer must be decreased and the semiconductor layer must be increased, conversely, for a smaller FWHM, the thickness of the silver must be increased and the thickness of the semiconductor decreased. The differences in sensitivity and FWHM between the two types of structure (sensitivity enhanced configuration and small FWHM configuration) are shown in Table 2. (The convergence plots of layers and objectives can be found in Figure S1 and additional configurations together with the sensitivity and FWHM can be found in Figure S2 and Table S1 in the Supplementary Information). The combination of the imaginary part of the refractive index and the thickness of the 2D materials plays an important role in the SPR response. Due to the higher imaginary part of the MoS\({}_{2}\) refractive index that induces an additional loss, the structures modified with MoS\({}_{2}\) present a broader reflectivity curve and also a smaller sensitivity in comparison to the other configurations. Thus, the highest sensitivity achieved is 258 deg/RIU which is about 60 deg/RIU less than the sensitivity obtained for graphene and WS\({}_{2}\) structures. Looking at the FWHM, the structure containing MoS\({}_{2}\) has the narrowest FWHM of 5.8 deg. and a sensitivity of 198 deg/RIU, while WS\({}_{2}\) and graphene based structures have sensitivities around 204 deg/RIU, and a FWHM of 3.4 deg. and 3.6 deg., respectively. Configurations containing the WS\({}_{2}\) monolayers exhibit a slightly higher sensitivity and also a narrower reflectivity curve in comparison to the graphene modified monolayers, mainly due to its \begin{table}
\begin{tabular}{c c c c c} \hline \multirow{2}{*}{**L.N.**} & \multirow{2}{*}{**Material**} & \multicolumn{2}{c}{**Configuration**} & \multirow{2}{*}{**Sensitivity** (**deg/RIU**)} & \multirow{2}{*}{**FWHM (deg)**} \\  & & **Metal–Semic.–2D Mat.–(\(n_{\text{diel}}\))** & & \\ \hline
1 & & 43 nm–11 nm–1 L (2.6) & 331 & 7.1 \\
2 & & 50 nm–7 nm–1 L (2.83) & 202 & 3.9 \\
3 & & 38 nm–10 nm–1 L (2.62) & 258 & 8.9 \\
4 & & 45 nm–7 nm–1 L (2.66) & 205 & 6 \\
5 & & 44 nm–8 nm–1 L (2.87) & 333 & 7 \\
6 & & 51 nm–6 nm–1 L (2.72) & 206 & 3.7 \\ \hline \end{tabular}
\end{table} 
Table 2: Configurations with the optimal dielectric refractive index for which the sensitivity is enhanced and FHWM is lowered. Figure 3: Reflectivity curves for the optimized semiconductor refractive index: the black line shows the high sensitivity configurations, the red line shows the narrow FWHM configurations, the dashed lines shows the sensor’s response for \(n+\Delta n\), \(\Delta n=0.005\).