Bug Maximizer Bug

When using the same maximizer string and rerunning, two different outfits are created, one with a rather significantly lower score.

The first use of maximize: (lower score)

> maximize 150 Familiar Experience 10 min 23 max, 6.72 Item Drop 834 max, -buddy-bjorn, -crown-of-thrones, 250 "bonus Mr. Cheeng's spectacles", 283.05 "bonus June cleaver", 291.11 "bonus lucky gold ring", 333.33 "bonus Pantsgiving", 40 "bonus tiny stillsuit", 600 "bonus mafia thumb ring"

Maximizer: 150 Familiar Experience 10 min 23 max, 6.72 Item Drop 834 max, -buddy-bjorn, -crown-of-thrones, 250 "bonus Mr. Cheeng's spectacles", 283.05 "bonus June cleaver", 291.11 "bonus lucky gold ring", 333.33 "bonus Pantsgiving", 40 "bonus tiny stillsuit", 600 "bonus mafia thumb ring"
Maximizing...
24 combinations checked, best score 9,352.29
Putting on mummy mask...
Equipment changed.
Wielding June cleaver...
Equipment changed.
Putting on anniversary pewter cape...
Equipment changed.
Putting on blessed rustproof +2 gray dragon scale mail...
Equipment changed.
Putting on lucky gold ring...
Equipment changed.
Putting on Mr. Cheeng's spectacles...
Equipment changed.
Stealing tiny stillsuit from Squuuuush the Gelatinous Cubeling...
Unequipping Squuuuush the Gelatinous Cubeling...
Familiar unequipped.
Putting on tiny stillsuit...
Equipment changed.

Resulting in modtrace:
1691069990637.png


Second use: (higher score)
> maximize 150 Familiar Experience 10 min 23 max, 6.72 Item Drop 834 max, -buddy-bjorn, -crown-of-thrones, 250 "bonus Mr. Cheeng's spectacles", 283.05 "bonus June cleaver", 291.11 "bonus lucky gold ring", 333.33 "bonus Pantsgiving", 40 "bonus tiny stillsuit", 600 "bonus mafia thumb ring"

Maximizer: 150 Familiar Experience 10 min 23 max, 6.72 Item Drop 834 max, -buddy-bjorn, -crown-of-thrones, 250 "bonus Mr. Cheeng's spectacles", 283.05 "bonus June cleaver", 291.11 "bonus lucky gold ring", 333.33 "bonus Pantsgiving", 40 "bonus tiny stillsuit", 600 "bonus mafia thumb ring"
Maximizing...
80 combinations checked, best score 9,988.00
Putting on giant discarded bottlecap...
Equipment changed.
Wielding portable corkscrew...
Equipment changed.
Putting on makeshift cape...
Equipment changed.
Putting on Mer-kin breastplate...
Equipment changed.
Putting on hewn moon-rune spoon...
Equipment changed.
Putting on shamanic beads...
Equipment changed.
Putting on grey down vest...
Equipment changed.

Resulting in modtrace:
1691070054048.png

Continuing to run the maximizer will swap between these two outfits.

I believe the problem seems to be with the tie mechanism? adding -tie fixes the issue and results in much butter results, and it does not swap between outfits.

Perhaps this is not a bug and just something with ties that I don't understand, but figured I'd post anyway.
 
I wonder if it comes from the +familiar experience being above the maximum threshold sometimes, and maximizer stops valuing it for some reason? Do you limit the number of combinations that maximizer can try? Do you have the checkbox to "always consider equipped items, even outside of HC/ronin"?
 

Ryo_Sangnoir

Developer
Staff member
This modtrace looks very odd to me. It's saying that giant discarded bottlecap gives +3 Fam Exp, portable corkscrew gives +2, makeshift cape gives +1... that isn't right? mummy mask doesn't give any either? Is this in TCRS?

Edit: Looks to be TCRS AT Vole.
 
Yup this is in 2crs, but I don't think that should be the cause of the maximizer issue, I'm quite sure I've had a similar experience in standard aftercore as well.
 
I wonder if it comes from the +familiar experience being above the maximum threshold sometimes, and maximizer stops valuing it for some reason? Do you limit the number of combinations that maximizer can try? Do you have the checkbox to "always consider equipped items, even outside of HC/ronin"?
These are my settings (I believe they're all the default):
1691123531873.png
 

Ryo_Sangnoir

Developer
Staff member
Yup this is in 2crs, but I don't think that should be the cause of the maximizer issue, I'm quite sure I've had a similar experience in standard aftercore as well.
Yeah, but the first step to fixing this is to make a failing unit test, and I can't do that if I don't understand what's going on.

I've also had it flipping between better / worse, but not to this extent.
 
Yeah, but the first step to fixing this is to make a failing unit test, and I can't do that if I don't understand what's going on.

I've also had it flipping between better / worse, but not to this extent.
Absolutely, sorry. It might be a while before I leave 2crs. For anyone that wants to try to replicate it, maybe try something like:

Code:
maximize 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring

This is a relatively simple one that replicated the behaviour for me.

From what I can tell it seems to happen with high values for modifiers. Try to choose a maximum that is reachable with equipment, and under your current bonus from effects?
 

heeheehee

Developer
Staff member
Can you provide a full list of your equipped items before/after?

In particular, the above CLI output snippets only show 2 accessories moving around.
 

MCroft

Developer
Staff member
would also recommend adding the dump parameter to the maximizer string to get more information about what is being considered.
 
Can you provide a full list of your equipped items before/after?

In particular, the above CLI output snippets only show 2 accessories moving around.

Starting point:
1691307067947.png
1691307081486.png


First maximize:
maximize 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump

Result:

Maximizer: 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump
Maximizing...
Outfits []
SLOT HAT
[giant discarded bottlecap]
SLOT WEAPON
[drywall axe]
SLOT OFFHAND
[Yorick]
SLOT CONTAINER
[makeshift cape, (none)]
SLOT SHIRT
[Mer-kin breastplate]
SLOT PANTS
[leather chaps]
SLOT ACCESSORY1
[hewn moon-rune spoon, shamanic beads]
SLOT ACCESSORY2
[portable corkscrew]
SLOT ACCESSORY3
[world's smallest violin]
SLOT FAMILIAR
[grey down vest]
SLOT STICKER3
[portable corkscrew]
50 combinations checked, best score 129,987.00
Putting on giant discarded bottlecap...
Equipment changed.
Putting on makeshift cape...
Equipment changed.
Putting on Mer-kin breastplate...
Equipment changed.
Putting on leather chaps...
Equipment changed.
Putting on hewn moon-rune spoon...
Equipment changed.
Putting on shamanic beads...
Equipment changed.
Putting on shamanic beads...
Equipment changed.
Putting on grey down vest...
Equipment changed.

1691307133557.png
1691307147463.png

2nd maximize (same command)

maximize 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump

Result:
Maximizer: 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump
Maximizing...
Outfits []
SLOT HAT
[zombie mariachi hat]
SLOT WEAPON
[giant shrimp fork]
SLOT OFFHAND
[Yorick]
SLOT CONTAINER
[unwrapped knock-off retro superhero cape]
SLOT SHIRT
[gingerbread hoodie]
SLOT PANTS
[duct tape dockers]
SLOT ACCESSORY1
[lucky gold ring, candy necktie, Cincho de Mayo]
SLOT ACCESSORY2
[June cleaver]
SLOT ACCESSORY3
[sewage-clogged pistol]
SLOT FAMILIAR
[miniature crystal ball]
SLOT STICKER3
[June cleaver, hawk]
24 combinations checked, best score 50,985.00
Putting on zombie mariachi hat...
Equipment changed.
Wielding hawk...
Familiar weight: KoL = 144 KoLmafia = 143
Equipment changed.
Holding June cleaver...
Familiar weight: KoL = 144 KoLmafia = 143
Equipment changed.
Putting on unwrapped knock-off retro superhero cape...
Familiar weight: KoL = 144 KoLmafia = 143
Equipment changed.
Putting on gingerbread hoodie...
Equipment changed.
Putting on duct tape dockers...
Equipment changed.
Putting on lucky gold ring...
Equipment changed.
Putting on candy necktie...
Equipment changed.
Putting on Cincho de Mayo...
Equipment changed.
Putting on miniature crystal ball...
Equipment changed.
1691307200224.png

1691307256874.png

3rd maximize (same command):

maximize 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump

Result:
Maximizer: 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump
Maximizing...
Outfits []
SLOT HAT
[giant discarded bottlecap]
SLOT WEAPON
[drywall axe]
SLOT OFFHAND
[pocketwatch on a chain]
SLOT CONTAINER
[makeshift cape, (none)]
SLOT SHIRT
[Mer-kin breastplate]
SLOT PANTS
[leather chaps]
SLOT ACCESSORY1
[hewn moon-rune spoon, shamanic beads]
SLOT ACCESSORY2
[portable corkscrew]
SLOT ACCESSORY3
[world's smallest violin]
SLOT FAMILIAR
[grey down vest]
SLOT STICKER3
[portable corkscrew]
50 combinations checked, best score 129,987.00
Putting on giant discarded bottlecap...
Equipment changed.
Wielding portable corkscrew...
Equipment changed.
Holding pocketwatch on a chain...
Equipment changed.
Putting on makeshift cape...
Equipment changed.
Putting on Mer-kin breastplate...
Equipment changed.
Putting on leather chaps...
Equipment changed.
Putting on hewn moon-rune spoon...
Equipment changed.
Putting on shamanic beads...
Equipment changed.
Putting on shamanic beads...
Equipment changed.
Putting on grey down vest...
Equipment changed.
1691307306151.png

1691307318972.png

4th maximize (same command):
Maximizer: 9999 familiar experience 13 max, 700 bonus june cleaver, 290 bonus lucky gold ring, dump
Maximizing...
Outfits []
SLOT HAT
[bonedanna]
SLOT WEAPON
[7-Foot Dwarven mattock]
SLOT OFFHAND
[Yorick]
SLOT CONTAINER
[unwrapped knock-off retro superhero cape]
SLOT SHIRT
[gingerbread hoodie]
SLOT PANTS
[duct tape dockers]
SLOT ACCESSORY1
[lucky gold ring, candy necktie, Cincho de Mayo]
SLOT ACCESSORY2
[June cleaver]
SLOT ACCESSORY3
[sewage-clogged pistol]
SLOT FAMILIAR
[miniature crystal ball]
SLOT STICKER3
[June cleaver, hawk]
24 combinations checked, best score 50,985.00
Putting on bonedanna...
Equipment changed.
Wielding hawk...
Equipment changed.
Holding June cleaver...
Equipment changed.
Putting on unwrapped knock-off retro superhero cape...
Equipment changed.
Putting on gingerbread hoodie...
Equipment changed.
Putting on duct tape dockers...
Equipment changed.
Putting on lucky gold ring...
Equipment changed.
Putting on candy necktie...
Equipment changed.
Putting on Cincho de Mayo...
Equipment changed.
Putting on miniature crystal ball...
Equipment changed.
1691307401213.png

1691307408902.png

Further uses of the command from this point will begin resulting in the same outfits from maximizer run #3 and #4 alternating
 

Ryo_Sangnoir

Developer
Staff member
What if you run it without "13 max"? My thought here is that the initial outfit already reaches the maximum, so it might be discarding all the familiar experience it can see, which lowers it below the limit.
 

heeheehee

Developer
Staff member
Pretty much the only weirdness I'm able to reproduce is:

- The second run is better than the first run.
- Maximizer keeps wanting to unequip the mer-kin breastplate.

No significant reduction in score from iterated runs :/

Attaching a patch in case it's a useful starting point for someone else.
 

Attachments

  • tcrs_test.patch
    6.3 KB · Views: 1
What if you run it without "13 max"? My thought here is that the initial outfit already reaches the maximum, so it might be discarding all the familiar experience it can see, which lowers it below the limit.
Yes, it's definitely something related to the "max" implementation
 
More testing with this, if I run into a situation where maximizer will fail getting the minimum value, if I increase the maximum, it will then be successful, and if I return the max back to the original, maximizer will "accept" the new outfit. This tends to happen if I have a force equipped item in the maximizer string

For example:
This string resulted in maximizer not being able to find an appropriate outfit
maximize 7 item 2000 max, 200 familiar experience 10 min 10 max, 1 meat 572 max, 400 bonus KoL Con snowglobe, 220 bonus Mr. Cheeng's spectacles, 460 bonus mafia thumb ring, 300 bonus June Cleaver, 270 bonus lucky gold ring, 120 bonus Crown of Thrones, 35 bonus tiny stillsuit, -equip Brimstone Bludgeon, -equip Brimstone Brooch, -tie, -crown-of-thrones, equip Pantsgiving, 5.75 bonus Powerful Glove

But just changing "200 familiar experience 10 min 10 max" to "200 familiar experience 10 min 11 max" allowed it to find a successful outfit, and then re-running it found an appropriate outfit just fine
 
Top