Bug - Not A Bug maximizer oddness with min and max

Crowther

Active member
I want to bring my cold resistance up to a specific level, while getting as much item drop as possible.

The max attribute says, don't count any cold resistance beyond the value.

The min attribute says, put a heavy count to cold resistance up to the value.

I don't understand why the second case here fails. It seems like a bug to me. I understand if no one wants to dig into the maximizer code for such an edge case.
Code:
> maximize cold res 23 max 23 min

Maximizer:    cold res 23 max 23 min
Maximizing...
92 combinations checked, best    score 23.00
Putting on hardened slime hat...
Equipment changed.
Wielding    Mer-kin hookspear...
Equipment changed.
Putting on Camp Scout    backpack...
Equipment changed.
Putting on warbear warscarf...
Equipment    changed.
Putting on hardened slime belt...
Equipment changed.

>    maximize cold res 23 max 23 min, item

Maximizer: cold res 23    max 23 min, item
Maximizing...
19532 combinations checked, best    score 468.13 (FAIL)
Putting on eldritch hat...
Equipment changed.
Wielding    party whip...
Equipment changed.
Holding Yorick...
Equipment    changed.
Putting on flaming pink shirt...
Equipment changed.
Putting    on eldritch pants...
Equipment changed.
Putting on Mayor Ghost's    sash...
Equipment changed.
Putting on Mr. Accessory Jr....
Equipment    changed.
Putting on gold detective badge...
Equipment changed.
Putting    on plastic pumpkin bucket...
Equipment changed.
Unable    to meet all requirements via equipment changes.
See the Modifier    Maximizer for further suggestions.

> maximize    cold res 23 max 23 min, .1 item

Maximizer: cold res 23 max    23 min, .1 item
Maximizing...
8668 combinations checked, best score    57.69
Wielding space heater...
Equipment changed.
Holding    Hodgman's metal detector...
Equipment changed.
Putting on rubber    cape...
Equipment changed.
Putting on Hodgman's disgusting    technicolor overcoat...
Equipment changed.
Putting on BOOtonniere...
Equipment    changed.
Putting on hardened slime belt...
Equipment changed.
Putting    on Hodgman's lucky sock...
Equipment changed.
Drat. It is worse than this. It seems to depend on what you are wearing, so it if I run the commands in different orders I get different failures. Sorry, I can't figure out a good way to recreate this problem. I'll leave this here hoping someone can help.
Code:
> maximize cold res 23 max 23 min, .3 item

Maximizer:    cold res 23 max 23 min, .3 item
Maximizing...
19532 combinations    checked, best score 145.34 (FAIL)
Putting on eldritch hat...
Equipment    changed.
Holding Yorick...
Equipment changed.
Putting on flaming    pink shirt...
Equipment changed.
Putting on eldritch pants...
Equipment    changed.
Putting on gold detective badge...
Equipment changed.
Unable    to meet all requirements via equipment changes.
See the Modifier    Maximizer for further suggestions.

> maximize    cold res 23 max 23 min, .3 item

Maximizer: cold res 23 max    23 min, .3 item
Maximizing...
8316 combinations checked, best score    148.84 (FAIL)
Holding antique Canadian lantern...
Equipment changed.
Putting    on Hodgman's disgusting technicolor overcoat...
Equipment changed.
Unable    to meet all requirements via equipment changes.
See the Modifier    Maximizer for further suggestions.

> maximize    cold res 23 max 23 min, .3 item

Maximizer: cold res 23 max    23 min, .3 item
Maximizing...
8800 combinations checked, best score    135.84
Putting on hardened slime hat...
Equipment changed.
Putting    on hardened slime pants...
Equipment changed.
Putting on hardened    slime belt...
Equipment changed.
 

heeheehee

Developer
Staff member
So, these attributes are a bit fiddly to use well.

max means: "stop counting this expression beyond the target score".

min means: "if we don't hit the target number, consider the maximization as failed."

Note, however, that there's nothing explicitly requiring that maximization must succeed. I think you observed the start of this as you down-weighted the other part of the expression.

For instance, if your inventory consists of hardened slime pants (+3 cold res) and bounty-hunting pants (+20% item drop) and you use the raw maximizer string "maximize cold res 3 max 3 min, item drop", then Maximizer will always try to equip the bounty-hunting pants (score 20), declare that a failure, and then give up.

However, if you instead try "maximize cold res 3 max 3 min, .1 item drop", then Maximizer will correctly equip the hardened slime pants (score 3) over the bounty-hunting pants (score 2).

This is... intended behavior, even if it's unintuitive. We could probably document this better.
 

heeheehee

Developer
Staff member
As far as being dependent on your current equipment: that has to do with Mafia's ultimate tiebreaker (in code, not the one you can disable via -tie), where no change is better than some change, assuming they correspond to the same score.
 

Crowther

Active member
Thanks. That all makes sense. It seems the feature I want doesn't exist. Changed to "Not a bug".

I did end up with a decent workaround. I first do "maximize cold res 3 max 3 min, .1 item drop" and if that fails, I do "maximize cold res 3 max 3 min, .01 item drop". That worked every time.
 
Top