<

Challenge 4

User Image Log-in
with Discord

Part One:
The Center of Flavor

It's a new day on the STS Solara, and today you're headed to the galley. That's perfect, because you could use a snack…

You meet the ship's head chef, who is deep in thought about the menu. Just as you're about to mention that you could really go for a cheeseburger, he begins speaking to you, explaining what's on his mind.

It turns out, the only food that the crew actually eats aboard the ship is Galactic Algae Blooms; a thought which slightly turns your stomach, but you hide your disgust well.

There are five species of Galactic Algae Blooms: Sweet, Bitter, Umami, Salty, and Sour. The depth of flavor of each of these species varies from bloom to bloom, each having its own scores for both flavor complexity, persistence of taste, and intensity. A skilled chef can take these individual flavor profiles and create dishes that resemble many non-algae-based dishes the crew are familiar with from home.

The process is as follows:

  1. Gather algae from each of the required species:
    • You select three individual algae blooms (your puzzle input) and obtain each of their flavor profiles.
    • Flavor complexity is labeled X, so the three algae blooms you would use of a certain species have x1, x2, and x3.
    • Persistence of taste is labeled Y; y1, y2, and y3.
    • Intensity is cleverly labeled m for "Mmm". Each algae bloom has its own individual intensity; m1, m2, and m3.
    • Each line of your input represents a species of Galactic Algae Bloom. Individual algae blooms are separated by spaces. For each individual algae bloom, the format is Intensity(Flavor Complexity,Persistence of Taste) or m(x,y).
  2. Seek out the Center of Flavor for each species:
    • To determine the Center of Flavors of a species with three individual algae blooms, you use the common Center of Mass (cm) equations.
    • Finding the Center of Flavor at X and at Y will provide you with the Center of Flavor coordinates on the complexity-persistence graph. You will have a set of coordinates for each species used in the recipe.
  1. Lookup the values in the ASCII Recipe Cards:
    • Translating the numerical value of each coordinate to its ASCII value will provide you with two letters per species of Galactic Algae Blooms. One letter for X and one letter for Y.
  2. Complete the recipe:
    • Concatenating the letters for all the X coordinates in order, a space, and all the letters for the Y coordinates in order, will spell out the recipe item.

For example:

If the algae blooms you gather from three species of Galactic Algae Blooms is 6(71,74) 6(70,73) 3(68,76)
12(74,65) 8(73,63) 4(70,69)
8(75,80) 4(72,71) 18(69,77)

To get the Center of Mass at X for the first species, you would put the numbers into the equation:
for the numerator (6*71) + (6*70) + (3*68) = 1050
and the denominator 6 + 6 + 3 = 15 giving you 1050/15
70 for the X value.

To get the Center of Mass at Y for the first species, you would put the numbers into the equation:
for the numerator (6*74) + (6*73) + (3*76) = 1110.
The denominator remains the same as for X, 15 giving you 1110/15
74 for the Y value.

Performing the same operations on all three species, we get X and Y values: (70, 74), (73, 65), and (71, 77)

Converting these numbers to ASCII values, you get: (F, J), (I, A), and (G, M)

Finally, concatenating all of the X values together and the Y values together, with a space between them, you get: FIG JAM

Here are your selected Galactic Algae Blooms: