taltamir / ttpack

A collection of KoL scripts by taltamir
MIT License
4 stars 0 forks source link

Maximizer gone wild! #27

Closed magus-prime closed 4 years ago

magus-prime commented 4 years ago

I think the recent changes to the maximizer code might have gone a bit overboard. The script is now performing multiple, lengthy, maximizer passes before every adventure. Here's the session log.

Arbos_20200619.txt

taltamir commented 4 years ago

Most of the length is due to having to exclude or include individual items. Which is necessary in aftercore. we do not want it to use text manglers for example, who would break mafia tracking

As for the repeated maximization... So looking at a sample case, I am seeing 4. first and second are simulations done by providePlusCombat(25) which is trying to give you +combat chance.

third is prefaced with [info] which is informing you that it is about to perform a maximize. fourth is mafia informing you that a maximize occured.

So only 1 actual maximization occurs. But it does look messy. All of this code is actually shared with autoscend. I will look into ways of trimming those messages.

magus-prime commented 4 years ago

It isn't the messages. They are actually helpful as they give insight into what is happening and why. Each one of the of the maximizer runs, and simulations, takes a lot of time to run through the options and it's happening for every adventure.

Two things not captured by the session logs are the amount of time taken for each maximizer pass and the number of permutations considered with each one.

The change in the autoscend code increased the, real world, time needed to complete even a single turn dramatically.

Here's an example from today's gCLI that I stopped after a single turn: `> guzzlr 50

printStackOnAbort => true promptAboutCrafting => 0 breakableHandling => 4 choiceAdventureScript => scripts/autoscend/auto_choice_adv.ash Updating inventory... Taking a Platinum delivery Encounter: Guzzlr Client Selection Submitting option 4 for choice 1412 You acquire an item: Guzzlr cocktail set Searching for "cold wad"... Search complete. Searching for "miniature boiler"... Search complete. Searching for "robin's egg"... Search complete. Searching for "mangled finger"... Search complete. Searching for "Dish of Clarified Butter"... Search complete. Searching for "one-day ticket to That 70s Volcano"... Search complete. Verifying ingredients for Buttery Boy (1)... Creating Buttery Boy (1)... You acquire an item: Buttery Boy Successfully created Buttery Boy (1) Taking off Guzzlr shoes... Equipment changed. Putting on Guzzlr shoes... Equipment changed. [INFO] - Equipping mafia thumb ring to slot acc2 Maximizer: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,+equip mafia thumb ring,effective Maximizing (1st time may take a while)... 62784 combinations checked, best score 4,555.17 96748 combinations checked, best score 4,555.17 Maximizer: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,200combat 25max,+equip mafia thumb ring,effective Maximizing... 77560 combinations checked, best score 7,538.47 96748 combinations checked, best score 7,538.47 [INFO] - I think we're good to go to apply Carlweather's Cantata of Confrontation Casting Musk of the Moose 1 times... You acquire an effect: Musk of the Moose (10) Musk of the Moose was successfully cast. Putting Purdey the Trick-or-Treating Tot back into terrarium... Taking Stubastian the Fist Turkey out of terrarium... plastic pumpkin bucket is better than (none). Switching items... Stealing plastic pumpkin bucket from Frullace the Space Jellyfish... Unequipping Frullace the Space Jellyfish... Familiar unequipped. Putting on plastic pumpkin bucket... Equipment changed. [INFO] - Maximizing: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,200combat 25max,+equip mafia thumb ring,effective Maximizer: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,200combat 25max,+equip mafia thumb ring,effective Maximizing... 76252 combinations checked, best score 8,833.88 96748 combinations checked, best score 8,833.88 Putting on Brogre bucket hat... Equipment changed. Wielding Granny Hackleton's Gatling gun... Equipment changed. Holding wolf whistle... Equipment changed. Putting on cod cape... Equipment changed. Putting on "Remember the Trees" Shirt... Equipment changed. Putting on mafia thumb ring... Equipment changed. Putting on Ass-Stompers of Violence... Equipment changed. Checkpoints cleared. You acquire an intrinsic: Spirit of Peppermint Spirit of Peppermint was successfully cast.

You have the latest recoveryScript_map_v2.txt. Will not check again today. Restoring MP! Currently at 542 of 574 HP, 64 of 658 MP, current meat: 878237179 ... Target MP = 329. Let's take a hot shower. You gain 594 Mojo Points You took a hot shower.

Visit to That 70s Volcano: The Bubblin' Caldera in progress...

[1936] The Bubblin' Caldera Encounter: Caldera Air

[INFO] - Equipping mafia thumb ring to slot acc2 Maximizer: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,5familiar exp,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,+equip mafia thumb ring,effective Maximizing... 75483 combinations checked, best score 4,607.88 104386 combinations checked, best score 4,607.88 Maximizer: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,5familiar exp,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,200combat 25max,+equip mafia thumb ring,effective Maximizing... 68789 combinations checked, best score 7,965.88 104386 combinations checked, best score 7,965.88 [INFO] - I think we're good to go to apply Carlweather's Cantata of Confrontation Casting Carlweather's Cantata of Confrontation 1 times... You acquire an effect: Carlweather's Cantata of Confrontation (15) Carlweather's Cantata of Confrontation was successfully cast. Searching for "talisman of Horus"... Search complete. Using 1 reodorant... You acquire an effect: Hippy Stench (10) Finished using 1 reodorant. Using 1 musk turtle... You acquire an effect: High Colognic (15) Finished using 1 musk turtle. Using 1 violent pastilles... You acquire an effect: Everything Must Go! (10) Finished using 1 violent pastilles. [INFO] - Maximizing: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,5familiar exp,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,200combat 25max,+equip mafia thumb ring,effective Maximizer: 5item,meat,0.5initiative,0.1da 1000max,dr,0.5all res,1.5mainstat,mox,-fumble,0.4hp,0.2mp 1000max,3mp regen,1.5weapon damage,-0.75weapon damage percent,1.5elemental damage,2familiar weight,5familiar exp,-equip hewn moon-rune spoon,-equip sword behind inappropriate prepositions,-equip staph of homophones,-equip Snow Suit,-equip deceased crimbo tree,-equip broken champagne bottle,-equip tinsel tights,-equip wad of used tape,-equip makeshift garbage shirt,-acc1,-pants,200combat 25max,+equip mafia thumb ring,effective Maximizing... 73234 combinations checked, best score 9,607.88 104386 combinations checked, best score 9,607.88 Putting on Covers-Your-Head... Equipment changed. Taking off wolf whistle... Equipment changed. Wielding Fourth of May Cosplay Saber... Equipment changed. Holding Brimstone Bludgeon... Equipment changed. Putting on vampyric cloake... Equipment changed. Putting on sea salt scrubs... Equipment changed. Putting on Garland of Greatness... Equipment changed. Checkpoints cleared.`

taltamir commented 4 years ago

It isn't the messages. They are actually helpful as they give insight into what is happening and why. Each one of the of the maximizer runs, and simulations, takes a lot of time to run through the options and it's happening for every adventure.

Oh, I was assuming everyone puts a cap on max combinations allowed. It did not occur to me that some people allow maximizer to run unchecked. I will add temporarily switching the cap setting to a reasonable figure

also when posting logs it is best to get them a code wrapper. which you do by using ` three times in a line by themselves to start multiline code and then do it again to stop.

taltamir commented 4 years ago

ok. added limit on maximizer so it won't take so long.

Also, in retrospect I should not use providePlusCombat as it checks too many unnecessary in run things. Instead I should just make sure a couple of relevant buffs are on.

done. please let me know if this solved the issue

magus-prime commented 4 years ago

Fixed. Thank you. I did have an upper bound set by maximizerCombinationLimit but it was rather high. :-) It isn't normally a problem but I hadn't run into any scripts that maximized every turn before now.