Lets say I have a collection of foo, we'll call it Foo[]. And a collection of bar, Bar[].
I now have an item that has a subset of Foo[] as properties, chosen at random, and that I wish to assign a single bar to the item that "matches" the collection of foo already there, would it make more sense to start with the entire collection, Bar[], and remove non-matching items as each foo is added, or the reverse?
Here's what I mean:
I'm generating random items with random effects attached to them.
The foo:
Emits fireballs when used
Heals player when dealing damage
Provides air to the player when under water
etc.
The bar:
sword, staff, wand, ring, amulet, trinket, etc. textures
Also a name ("[Verb] [Noun] of [Adjective]") might qualify as 'bar' in this context, but I think that might be easier: [random foo].verb + [texture].noun + [random adjective].
I've done something like this at work, in both directions (the first was "which drug matches this wound" which was removal based* the second was essentially an image tagging system: select one or more tags, see all images with at least one tag).
*In hindsight, due to the changes made, this was a poor solution. Hence the question.