MMI devices with weak guiding designed in three dimensions using a genetic algorithm