Machine learning-based closed-loop for optimizing HOMO–LUMO gap in diarylethene | Synapse