It's an APie: Artificial intelligence tries its hand in the kitchen and creates bizarre recipes such as Scotch egg and spiralised veg and SALAD pie

  • The AI was developed by Esme Loans and Sussex pie-makers Piglet's Pantry
  • From a cookbook of thousands of recipes the algorithm learnt to make new ones
  • Some early proposals were less-than-appetising but it soon cooked up winners
  • Veggie spiral pies and Scotch egg pies are among five of its recipes being made

An AI has been studying the cookbooks and has taught itself how to make intriguing new pie recipes — including Scotch egg pies and one with a salad filling.  

Working with a Sussex-based pie makers, the algorithm has produced thousands of recipes, five of which have been selected for production and will be going on sale. 

The AI works by looking for patterns in existing recipes and then trying to make its own based on what it learnt.

While some of the early recipes it proposed were perhaps less-than-mouth-watering, with a little guidance it soon got the hang of cooking up new pie concepts.

The experiment illustrates how artificial intelligence can provide new insights for small businesses and help dream up novel products to take to market. 

Scroll down for video 

An AI has been studying the cookbooks and has taught itself how to make intriguing new pie recipes ¿ including Veggie spiral pie, pictured, and pear & blackberry crostata

An AI has been studying the cookbooks and has taught itself how to make intriguing new pie recipes — including Veggie spiral pie, pictured, and pear & blackberry crostata

WHAT PIE RECIPES DID THE AI COOK UP?

The algorithm cooked up thousands of recipes — some more appetising than others — but with a little help from food experts at Piglet's Pantry, the top five were narrowed down:

1. Veggie spiral pie with spiced tomato sauce & chopped salad

2. Scotch egg pie

3. Curried chicken pie

4. Pear & blackberry crostata

5. Gluten-free curried veg pie

Advertisement

The culinary AI is a collaboration between digital business lending platform Esme Loans and Sussex pie makers Piglet's Pantry to demonstrate the potential of emerging technologies like machine learning to help bring novel new products to market.

The AI based its recipes on thousands of existing UK-specific pie recipes — totalling nearly a million characters of text — from which the machine learning algorithm was able to invent thousands of new pie recipes.

After some refining, five novel pie recipes were selected for production — including a veggie spiral pie, a Scotch egg pie and a pear & blackberry crostata.

Reporters at the MailOnline tried the AI's 'veggie spiral pies' and can confirm that they were delicious.

'The speed and the volume of results we were able to deliver were outstanding,' said Veronika Lovett, the co-founder and CMO of Esme Loans.

'Suggestions from the AI model were usable and relevant,' she added. 

'AI and machine learning in food production is a really powerful tool, and the end result was great,' said Piglet's Pantry founder, Joanne Hunter.

'I'm always interested to try new things and am excited to explore the possibilities of new technology in the future.'

The AI model was built using GPT-2, an unsupervised text-generating language model, built by the Elon Musk founded AI research company Open AI, which has previously been demonstrated writing news articles.

When given enough examples of a particular kind of writing — whether that be news reports, Reddit comments or pie recipes — the AI can readily produce plausible-reading versions of its own without needing to be trained.

It does this by looking for patterns and structure in the examples texts given to it. 

Working with a Sussex-based pie makers, the algorithm has produced thousands of recipes, five of which have been selected for production and will be going on sale

Working with a Sussex-based pie makers, the algorithm has produced thousands of recipes, five of which have been selected for production and will be going on sale

The AI works by looking for patterns in thousands of existing recipes and then trying to make its own based on what it learnt

The AI works by looking for patterns in thousands of existing recipes and then trying to make its own based on what it learnt

The algorithm is programmed to produce 30 new recipes at a time.

At first, the recipe-writing AI came up with a few unpalatable suggestions — along with some intentionally humorous cooking instructions.

These included 'Ask your vegetarian or vegan chef to cook your fish in a pan containing just enough water to just cover it' and 'Ask your fishmonger to cook your fish in a shell that fits the pan.'

These examples are great illustrations of how the AI learns, producing sentences along the way that sound like they might appear in a cookbook, even if they don't entirely make sense.

In a similar vein, a recipe for a 'filo-topped fish pie' from the model's first-generation output called for putting tomato, prawns and Parmesan 'through a ricer to leave a sticky paste' — guidance unlikely to lead to an award-winning filling.

A FUNNY REJECTED AI PIE RECIPE 

At first, the recipe-writing AI came up with a few unpalatable suggestions, along with some intentionally humorous cooking instructions.

The title of the below recipe certainly doesn't sound like the most delicious of taste combinations — but the ingredients list might appeal to cheese lovers:

 

Cherries & Cheese stuffed with Potato 

500g pack all-butter shortcrust pastry

140g/ 5oz Welsh Caerphilly cheese (we used Caerphilly Valley)

140g/ 5oz Caerphilly cheese (we used Caerphilly Valley)

140g/ 5oz Caerphilly cheese (we used Caerphilly Valley)

200g/ 8oz Caerphilly cheese (we used Caerphilly Valley)

200g/ 8oz Caerphilly cheese (we used Caerphilly Valley)

140g/ 5oz Caerphilly cheese (we used Caerphilly Valley)

200g/ 8oz Caerphilly cheese (we used Caerphilly Valley)

200g/ 8oz Caerphilly cheese (we used Caerphilly Valley)

200g/ 10oz Caerphilly cheese (we used Caerphilly Valley)

140g/ 5oz Caerphilly cheese (we used Caerphilly Valley)

140g/ 5oz Caerphilly cheese (we used Caerphilly Valley)

200g/ 12oz Caerphilly cheese (we used Caerphilly...  

Advertisement

After adjusting the algorithm's parameters and rejecting unappetising recipes, however, the AI's instructions began to strike the right note.

For example, one recipe proposed by the machine was for a gluten-free pie that contained a gluten-free filling.

While this sounds obvious, it requires the AI to realise that the filling must be gluten-free if the pie is to be too — and to work out which ingredients are gluten free.

In this way, the algorithm gathered knowledge on gluten free recipes from the digital cookbook initially given to it and then translated this understanding into the creation of a new gluten-free pie.

The experiment illustrates how artificial intelligence can provide new insights for small businesses and help dream up novel products to take to market

The experiment illustrates how artificial intelligence can provide new insights for small businesses and help dream up novel products to take to market

While some of the early recipes it proposed were perhaps less-than-mouth-watering, with a little guidance it soon got the hang of cooking up new pie concepts

While some of the early recipes it proposed were perhaps less-than-mouth-watering, with a little guidance it soon got the hang of cooking up new pie concepts

The culinary AI is a collaboration between digital business lending platform Esme Loans and Sussex pie makers Piglet's Pantry to demonstrate the potential of emerging technologies like machine learning to help bring novel new products to market

The culinary AI is a collaboration between digital business lending platform Esme Loans and Sussex pie makers Piglet's Pantry to demonstrate the potential of emerging technologies like machine learning to help bring novel new products to market

One of the AI-generated recipes now being produced was selected because the algorithm had stumbled upon an interesting new twist for vegetarian pies — both literally and metaphorically.

The 'veggie spiral pie' it dreamt up contains spiralised vegetables — those which have been cut into linguine-like strands — adding a new dynamic to the pies' texture.

This was an idea that Ms Hunter and her colleagues had never thought of using before. 

According to Ms Hunter, plant-based pie fillings make up a considerable slice of Piglet's Pantry's sales as vegetarianism and veganism become increasingly popular. 

The AI based its recipes on thousands of existing UK-specific pie recipes ¿ totalling nearly a million characters of text ¿ from which the machine learning algorithm was able to invent thousands of new pie recipes

The AI based its recipes on thousands of existing UK-specific pie recipes — totalling nearly a million characters of text — from which the machine learning algorithm was able to invent thousands of new pie recipes

The 'veggie spiral pie' it dreamt up contains spiralised vegetables ¿ those which have been cut into linguine-like strands ¿ adding a new dynamic to the pies' texture. This was an idea that Ms Hunter and her colleagues had never thought of using before

The 'veggie spiral pie' it dreamt up contains spiralised vegetables — those which have been cut into linguine-like strands — adding a new dynamic to the pies' texture. This was an idea that Ms Hunter and her colleagues had never thought of using before

According to Esme Loans, emerging technologies like machine learning are seen by many small-to-medium-sized business as somewhat of the 'great unknown.' 

However, Ms Lovett noted, bringing insights gained from using artificial intelligence into the workplace can 'open many opportunities to gain a competitive advantage.'

'Any business with intentions of scaling should be having discussions around how Machine Learning and AI could be used to help them succeed.' 

Through their team-up with Piglet's Pantry, she added, 'we have demonstrated this is within reach of small and medium enterprises, and not just big tech firms.'

More information about how the AI cooked up its new pie recipes can be found on the Esme Loans website.

The AI model was built using GPT-2, an unsupervised text-generating language model, built by the Elon Musk founded AI research company Open AI, which has previously been demonstrated writing news articles

The AI model was built using GPT-2, an unsupervised text-generating language model, built by the Elon Musk founded AI research company Open AI, which has previously been demonstrated writing news articles

MAKE YOUR OWN AI PIE AT HOME 

Veggie spiral pie with spiced tomato sauce & chopped salad

You'll need: 

  • 1 tbsp cumin seeds
  • 1 tbsp coriander seeds
  • 2 tbsp olive or rapeseed oil
  • 1 large onion
  • 250g carrots
  • 500g spinach
  • 280g peppers
  • 5 fresh tomatoes
  • 250g frozen leaf spinach
  • 250g vegetable shortcrust pastry
  • 300g courgette
  • 2 egg yolks
  • 1 tsp each ground cumin
  • 2 tbsp dried mango
  • 100g hot red pepper (chopped)
  • 1½ kg floury potato
  • 100g butter
  • 200g frozen peas

To prepare the filling:

For the spinach, tip the spinach into a saucepan with 1 tbsp of the oil, then cook until wilted. Leave to cool, then squeeze out as much liquid as possible. 

Tip into a large heatproof bowl, then stir in the cumin, coriander seeds, olive oil, half the spinach and 250g cooked spinach. Season well, then set aside. 

For the potato, boil or simmer for 6-8 mins until tender. Drain, then tip back into pan. Fry in the remaining oil until golden. 

Stir in the chopped pepper, then leave to cool. 

Add remaining ingredients and stir in with cooked spinach.

Advertisement

 

The comments below have not been moderated.

The views expressed in the contents above are those of our users and do not necessarily reflect the views of MailOnline.

We are no longer accepting comments on this article.