Typical plasmonic (hydrogen) sensing setups measure transmission or reflection spectra of the nanofabricated samples within the visible and near-infrared range (400-1000 nm). To have sensors with resonances within this range, we thus limit our array parameter searching space to d = 100-300 nm, h = 20-100 nm and a = 300-500 nm (Fig. ). For the PMMA layer thickness, t PMMA , we limit the range to 100-300 nm. The lower limit of 100 nm is chosen to ensure robust PMMA deposition when translating the parameters into a real sensor and also to provide sufficient refractive index medium, while the upper limit of 300 nm is to avoid significantly slowing the H 2 diffusion kinetics introduced by a thicker layer. To efficiently pinpoint the structural parameter combination with the highest FoM within such four-dimensional searching space, we adopt a particle swarm optimization (PSO) algorithm combined with our FDTD calculations (Fig. ). This computational technique comprises populations that together asses the parameter space, and subsequently influence each other to move within this space to maximize the set goal (fitness parameter) that, in our case, is to maximize the FoM. We utilize 10 populations that start with a random set of parameter values and assess their corresponding FoM. In the following generations, each population moves to other parameter values that result in a higher FoM (Fig. ). Running this process for 15 generations (see Methods), we move from an average FoM of 0.03 to 0.09, with single-best populations reaching 0.11. The corresponding best sensor architecture is d = 124 nm, h = 20 nm, a = 376 nm and t PMMA = 300 nm (Fig. ), with Δλ peak and FWHM of 32 and 296 nm, respectively (see other populations at Supplementary Table and Supplementary Figure ).