How best to visually represent attempted (and not-attempted) combinations?

In a game I'm playing, there is a recipe book type thing. The ingredients for a recipe are known but not the specific quantity of each ingredient required to create the recipe, only a minimum and maximum value for each. The fact that there are no clues about quantities means that the number of possible combinations can reach the millions.

I have implemented a system which will specify a number for each ingredient, attempt the combination, and log the attempted combination as a JSON blob.

I have imported those logs into a dockerized kibana+elastic cluster. You can see a summary of the contents in the attached image.

Now for my question, can anyone recommend a way for me to visualize this data in a way that will

  1. Track and allow me to understand my progress as I attempt to exhaust all possible combinations
  2. Give me confidence that I have, in fact, exhausted all combinations

Hi @cgmelastic,

to understand your use case, the pictures you've posted shows the attempts you've tried already, right?

In that case for 7 fields you have attempted: 1 * 1 * 19 * 1 * 16 * 1 * 4 = 1216 combinations already.

Do you know already how many distinct values are possible for each ingredient? Or just the min/max?
In the latter case I suspect you can go with a uniform distribution for each ingredient (you may over-estimate the potential number of combinations), using a max-min interval computation.

Anyway, knowing the name of all fields, I guess you could use Lens to create 2 distinct visualizations:

  • the first visualization as metric, and you could use the Formula feature to run the product above: unique_values(fieldA) * unique_values(fieldB) * ... => 1216
  • the second visualization can be a metric as well (or a bar chart using Percentage value format) with a Formula like:
unique_values(fieldA) * unique_values(fieldB) * ... /
(max(fieldA) - min(fieldA)) + (max(fieldB) - min(fieldB)) + ... + 0.000000001

note the final 0.0000001 to avoid the divide by 0 problem, which can be fixed with the Percentage formatting decimal unit, or avoided if you are sure that there's at least one ingredient which has a max - min value greater than 0.

In short: it's a bit long and explicit, but possible.

Hi Marco, first of all thanks for replying. I figured starting off my post with "In a game I'm playing" might deter some from reading, glad you took an interest!

Each log entry is actually a distinct combination. Here's an example:

{
  "Amber": 27,
  "Page 6": 1,
  "Plate of metal": 28,
  "Ruby potion": 54,
  "Snake skin mesh": 22,
  "Tao stone": 1,
  "Yellow amber": 8
}

For this "recipe," there are actually 30*25*20*100*120*1 possible combinations (so 180m).
Most items have a min & max and the value could, potentially, be any value where min <= value <= max.

I was fiddling with Heat Map this week, but my results were a little unreliable. I could create the map in the visualization editor but, once I saved it, I couldn't view it there or view it once added to a dashboard. This is close to what I was looking for though:

I like your ideas about using formulae to give progress-percentage indicators though... I'll have to think on that.

I think a heatmap is good to get the details of the missing combination.
I proposed something as summary. Both ways can be useful I think.

I think so too. Thank you for the help!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.