Thermophotovoltaic (TPV) conversion is a heat to electricity solid state energy conversion mechanism standing out with potentially high conversion efficiency and power output density values. TPV systems are compact and passive structures consisting of a photovoltaic cell and a hot photon emitter. Heat could be supplied to the emitter by numerous sources such as concentrated sunlight, waste heat, combustion or radioisotopes. Photovoltaic cell is a p-n junction typically made out of III-V semiconductors. One of the most outstanding techniques to enhance the efficiency and power output of a TPV system is to bring the emitter and cell into the near field. Near field refers to the length scale at which radiative heat transfer could only be explained by fluctuational electrodynamics. Due to effects such as radiation tunneling and surface polaritons, near field radiative heat transfer could be orders of magnitude greater than Planckian radiation for the same temperature. Additionally, due to these effects, near field radiative heat transfer depends highly on the material properties and spatial dimensions of the structure. Therefore, periodical structures such as metamaterials are utilized to confine the energy transfer into a spectral interval that is favorable in terms of conversion by the photovoltaic cell. The first step of our mission in this study is to model the underlying physical phenomena by developing open-source tools. Whereas the primary step of the mission is to design an optimized near field TPV system based on a 1-D multi-layer geometry relying on these tools. In the optimization process, a state-of-the-art machine-learning based optimization method, Bayesian optimization is utilized.