roippi
Developer
How about, after (current) maximization is done, something like
Code:for each slot { if original equipment can still be equipped in the slot and isn't already included in current best result (in that slot) { if score(current best)=score(current best with the original equipment placed back in that slot) { change current best to use the original equipment in that slot } } }
That should keep the original equipment if it would get overwritten with useless equipment or emptiness, but not when it got overwritten with a synergetically useful thing.
And it should only cost fewer than 100 score calculations, instead of tens of millions.
That, again, doesn't work at all for outfits/synergies. Suboptimal per-slot score can be part of the global optimum solution when synergies are involved. A synergetically useful thing may have a score of exactly 0 when you look at it individually for its slot, but the amortized synergy bonus is very much non-zero.
The heuristic I proposed before works here, too. Instead of remembering individual slot items, remember outfit groups that are currently equipped (and if an item isn't a member of a predefined outfit group, just give it it's own singleton 1-item outfit). Then
Code:
if score(current best for slots masked by outfit)=score(current best with the original equipment placed back in those slots)
works.