Research Article

Exploring the Food Pairing Hypothesis in Saudi Cuisine Using Genetic Algorithm

Algorithm 2

GA food pairing.
(1)Initial pool containing N number of ingredients.
(2)Generate K number of recipes containing S ingredients randomly constructed from the initial pool of ingredients.
(3)From the pool of K recipes select one recipe randomly.
(4)Copy the recipe.
(5)Mutate the copied recipe M times.
(6)Randomly select an ingredient from the copied recipe.
(7)Randomly select an ingredient from ingredients pool.
(8)Compare fitness value of the two ingredients.
(9)Replace the ingredient in the recipe with the ingredient having the higher fitness value.
(10)Add the mutated recipe to the pool of recipes.
(11)Introduce a new ingredient to the pool of ingredients.
(12)Repeat steps 3 to 7 until the corpus of random recipes match the number of recipes in the real cuisine.