AI-Assisted Cocktail Design with Evolutionary Optimization

This project explores how machine learning and evolutionary algorithms can be combined to design cocktail recipes under real-world constraints. Instead of generating drinks from scratch, users provide the ingredients they already want in a cocktail along with desired taste profiles, and the system intelligently completes the recipe with optimized ingredients and quantities.

It’s not a rule-based mixer or a language model prompt — it’s a data-driven flavor system powered by trained taste classifiers and genetic search.
Average AUC
0.90
Best AUC
0.998
Average F1-Score
0.67
Taste Classifiers
9
DataSet
4,500+

Core Innovation

What makes this project different:

  • Multi-label flavor modeling instead of single “primary taste.”
  • Ingredient quantities as features, not just presence/absence.
  • Genetic Algorithm for constrained search, not brute force.
  • Fitness driven by trained ML models, not hand-crafted rules.

This turns cocktail creation into a structured optimization problem similar to real-world engineering systems.

Sample Generated Recipes

Each recipe is evolved from mandatory ingredients and target flavor profiles using ML-powered genetic optimization.

spicy 90%sweet 10%

Mandatory

Sugar Syrup (2:1), Vodka

Generated Composition

Chocolate Caramel Liqueurs35.00%
Ginger Liqueur31.51%
Vodka15.00%
Sugar Syrup (2:1)15.00%
Total normalized: 96.51%
sweet 80%herbal 20%

Mandatory

Lime Juice, Vodka

Generated Composition

Chocolate Caramel Liqueurs32.28%
Bénédictine D.O.M.23.99%
Vodka15.08%
Lime Juice15.00%
Advocaat Liqueur13.62%
Total normalized: 99.97%
floral 50%fruity 50%

Mandatory

Vodka, Spiced Rum

Generated Composition

Crème de Cassis35.00%
Crème de Violette32.61%
Spiced Rum15.00%
Vodka15.00%
Total normalized: 97.61%
citrus 100%

Mandatory

None

Generated Composition

Lemon Juice35.00%
Lime Juice35.00%
Limoncello Liqueur29.00%
Total normalized: 99.00%
creamy 60%sweet 40%

Mandatory

Gin

Generated Composition

Whipping Cream35.00%
Cream of Coconut35.00%
Gin24.53%
Total normalized: 94.53%
bittersweet 70%fruity 30%

Mandatory

Malt Whisky

Generated Composition

Fresh Fruit34.97%
Gentian Liqueur34.96%
Malt Whisky24.29%
Total normalized: 94.22%

Model Performance

All taste classifiers were trained using Logistic Regression with tuned thresholds:

FlavorAUCPrecisionRecallF1-Score
Creamy0.9980.9171.0000.957
Floral0.9710.4580.6470.537
Bittersweet0.9600.8020.8530.827
Spicy0.9430.5710.6000.585
Sweet0.9010.7310.7310.731
Herbal0.8810.5310.6820.597
Fruity0.8630.7500.5960.664
Citrus0.8490.6600.8650.749
Savoury0.7500.3910.4290.409

Even with simple linear models, the system achieves strong AUC and usable F1 scores — validating the feature design and framing of flavor prediction.

These models directly power the GA fitness evaluation.