Bug - Not A Bug Modifier Maximizer incorrectly handles the closet

I have just observed, in the code from Subversion trunk, a problem with the way Modifier Maximizer handles the closet.

Settings:
- Equipment - the problem appears for all three settings
- Max price - don't check
- Include effects with no direct source, ... - irrelevant

Expected effect:
KoLmafia evaluates the properties of objects both on hand and in the closet, pulls everything that is in the closet and is better than what is at hand, and equips the best combination.

Observed effect:
KoLmafia only evaluates the properties of objects on hand. However, if a piece of equipment deemed to be useful by the maximizer is present both on hand and in the closet, the latter is pulled before the item in question is equipped.

Reproducible: always

Example test cases:

1. incorrect parsing of closet items
- requirements: Torso Awaregness, at least two different shirts modifying meat drops (e.g. Ye Olde Navy Fleece and duct tape shirt)
- put all the duct tape shirts in the closet, keeping all the Fleeces on hand
- maximize meat
- KoLmafia will then equip the Fleece instead of pulling and equipping a duct tape shirt
2. pulling duplicates
- requirements: Torso Awaregness, two identical shirts modifying meat drops (e.g. Ye Olde Navy Fleece), no other shirts with such a modifier (if you want to perfectly isolate the problem - in practice, in light of the above putting them all into the closet would work just as well)
- put one of the Fleeces in the closet, keeping the other on hand
- maximize meat
- KoLmafia will then pull another Fleece from the closet despite having one on hand
 

Bale

Minion
Tried 1, got uncloset & equip shirt duct tape shirt (+20) which definitely did not reproduce the issue.

So, I tried set autoSatisfyWithCloset = false and then it reproduced the issue. Of course that is exactly what I would have expected it to do. This seems to be a result of preferences.

I think you want to set autoSatisfyWithCloset = true to make it satisfy with your closet.
 
I think you want to set autoSatisfyWithCloset = true to make it satisfy with your closet.
That indeed allows Mafia to evaluate closet items, thanks. However, there are still a few issues:

1. Maybe it's just me but using the same switch for pulling things to maximize stats (which as far as equipment is concerned, generally doesn't use them up) and to create new ones (which does) is not a good idea...
2. The GUI toggle for autoSatisfyWithCloset is under Item Manager -> Create, which hardly implies it is also used by the maximizer to decide whether equipment can be pulled or not;
3. Until I set it by hand, autoSatisfyWithCloset was not set in my preferences file, which is what caused additional confusion regarding my problem - the maximizer did not evaluate equipment from the closet yet it did pull it in the end. Setting a value helps, as then both stages of maximisation operate consistently. Why not having it set causes such behaviour despite an appropriate entry existing in defaults.txt, I do not know yet.

Anyhow, thanks again for the tip.
 

roippi

Developer
Closing an old report...

1. Maybe it's just me but using the same switch for pulling things to maximize stats (which as far as equipment is concerned, generally doesn't use them up) and to create new ones (which does) is not a good idea...

I disagree strongly. The closet is a "safe zone" when autoSatisfyWithCloset=false. Mafia will never touch items in there, and I do not want it to.

As for the rest, the preferences GUI has been revamped in the intervening years, so no longer applies.
 
Top