Winterbay's Helpful Automatic Monsterbasher (WHAM)

I think it is more interesting actually to point out that it's doing 1 round stuns for a skill which is pretty pointless... That part is at least fixed in the upcoming WHAM-version that comes out with the next BatBrain. As to why it wants to do a stun when it it clearly one-shotting (not even close to not doing it I don't know). What damage does freeze say it'll do with verbosity 10? Is that value completely off compared to the actual value? That may be one reason.
Okay, I'm back in Jarlsberg and I haven't yet seen the stun-then-oneshot behavior, but it is doing another odd thing. I have an MP regen range of 9-11 right now, and WHAM is choosing to attack with Grill for 30 mp, even though the creature will die with Blend Boil Boil for 17 mp. The verbosity 10 log below starts with BatMan Re, but I used the button to pass combat to WHAM on the first turn.
Code:
[459] Haunted Bedroom
Encounter: animated nightstand
Round 0: frodobatman wins initiative!
Running ZLib version: r37 (current)
1 HP costs 6.667μ. ( 32 / 45 )
1 MP costs 17μ. ( 138 / 138 )
Running BatBrain version: /\/\^v^/\/\ (current)
Running SmartStasis version: 3.18 (current)
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
ATT: 174 (94% × 104.36, death in 1)
DEF: 168 (8.59% × 2.18, win in 200)
HP: 200, Value: 436.83 μ, RES: 0
Parsed round number: 1
Building options...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*92.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Options built! (13 actions)
Building custom actions...
Custom actions built! (0 actions)
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
Attack action chosen: skill 14024 (round 1, profit: -357)
Stun action chosen: skill 14034 (round 1, profit: 0)
Stasis action chosen: jiggle (round 1, profit: -3,650.16)
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
Attack action chosen: skill 14024 (round 1, profit: -357)
Your huckleberry will kill you.
Running BatMan RE version: 1.7 (current)
Value of stat gain: 390.63μ
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
Running ZLib version: r37 (current)
Running ZLib version: r37 (current)
1 HP costs 6.667μ. ( 32 / 45 )
1 MP costs 17μ. ( 138 / 138 )
Running BatBrain version: /\/\^v^/\/\ (current)
Running SmartStasis version: 3.18 (current)
Running WHAM version: 4.9 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 458.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for Animated Nightstand (White).
WHAM: No need to do anything with Animated Nightstand (White).
WHAM: Setting up variables via BatBrain
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
ATT: 174 (94% × 104.36, death in 1)
DEF: 168 (8.59% × 2.18, win in 200)
HP: 200, Value: 436.83 μ, RES: 0
Parsed round number: 1
Building options...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*92.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Options built! (13 actions)
WHAM: We currently think that the round number is: 1 and that the turn number is 458.
WHAM: Current MP = 138 out of 138.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 32 out of 45.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a Animated Nightstand (White). Mafia considers that this monster has an attack of 174 or 174 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 168 or 168 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 195 or 195 when given a monster name.
WHAM: Your current ML-adjustment is: 15.
WHAM: Monster HP is 200.0.
WHAM: WHAM added the following to BatRound: if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
skill 14024 does hurt the monster for 200.0 and is ok.
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
WHAM: Attack option chosen: skill 14024 (round 1, profit: -357)
WHAM: We currently think that the round number is: 1 and that the turn number is 458.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 1 and that the turn number is 458.
skill 14024 does hurt the monster for 200.0 and is ok.
grouchy restless spirit (80.0 @ +5.0): 55μ * 84% = 46.2
Value of stat gain: 390.63μ
WHAM: Attack option chosen: skill 14024 (round 1, profit: -357)
WHAM: No need to stun this monster
Monster HP is 195 according to Mafia and 200.0 according to BatBrain
Queued: skill 14024
Building options...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*92.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Options built! (13 actions)
Parsed round number: 1
Building options...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*92.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*92.0+0.0+0.0,5.0*10)'...
Options built! (13 actions)
WHAM: Evaluating the attack but not performing it took 0.26 seconds.
WHAM: Debug printing the damage dealt by your options.

WHAM: Grill: 200.00 potential damage (raw damage: 319.44) and a hitchance of 100.00%.
WHAM: Boil: 108.46 potential damage (raw damage: 108.46) and a hitchance of 100.00%.
WHAM: Freeze: 108.46 potential damage (raw damage: 108.46) and a hitchance of 100.00%.
WHAM: grouchy restless spirit: 42.00 potential damage (raw damage: 42.00) and a hitchance of 100.00%.
WHAM: Curdle: 33.00 potential damage (raw damage: 33.00) and a hitchance of 100.00%.
WHAM: Bake: 11.00 potential damage (raw damage: 11.00) and a hitchance of 100.00%.
WHAM: Knob Goblin firecracker: 3.00 potential damage (raw damage: 3.00) and a hitchance of 100.00%.
WHAM: Blend: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: wussiness potion: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Jiggle your chefstaff: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: magical mystery juice: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Mountain Stream soda: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: 8-ball: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.

WHAM: Evaluating the attack but not performing it took 0.35 seconds.
Round 1: frodobatman executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Verbosity of 10 or more is set. Data files for debugging have been generated. Aborting.
You're on your own, partner.
Click here to continue in the relay browser.

Round 2: frodobatman
KoLmafia thinks it is round 3 but KoL thinks it is round 1

Edit: spoke too soon. Here's the script doing the stuns and then a verb 10 log.
Code:
[490] Smut Orc Logging Camp
Encounter: smut orc nailer
Strategy: /home/julian/.kolmafia/ccs/default.ccs [default]
Round 0: frodobatman wins initiative!
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: Enqueuing a stun to help with the battle
WHAM: We are going to 2-shot with Blend and Boil.
Round 1: frodobatman executes a macro!
Round 1: frodobatman casts BLEND!
Round 2: frodobatman casts BOIL!
Round 3: smut orc nailer takes 110 damage.
Round 3: frodobatman wins the fight!
You gain 33 Meat
You acquire an item: messy butt joint
You acquire an item: weirdwood plank
You acquire an item: orcish nailing lube
You gain 4 Beefiness
You gain 20 Wizardliness
You gain 5 Sarcasm

Request 6 of 13 (Mountain: Smut Orc Logging Camp) in progress...
KoLmafia declares world peace.

[491] Smut Orc Logging Camp
Encounter: smut orc nailer
Strategy: /home/julian/.kolmafia/ccs/default.ccs [default]
Round 0: frodobatman wins initiative!
Click here to continue in the relay browser.


Round 1: frodobatman casts BOIL!

[491] Smut Orc Logging Camp
Round 2: smut orc nailer takes 107 damage.
Round 2: frodobatman wins the fight!
You gain 25 Meat
You acquire an item: thick caulk
You acquire an item: morningwood plank
You gain 6 Strongness
You gain 13 Enchantedness
You gain a Mysticality point!
You gain 11 Cheek

> zlib verbosity = 10

Previous value of verbosity: 3
Changed to 10.
Validating adventure sequence...
Condition added: any plank (25)

Running ZLib version: r37 (current)
Running Best Between Battle Script Ever version: 2.6 (current)
You don't have any spooky putty monsters.

Visit to Mountain: Smut Orc Logging Camp in progress...

[492] Smut Orc Logging Camp
Encounter: smut orc pipelayer
Strategy: /home/julian/.kolmafia/ccs/default.ccs [default]
Round 0: frodobatman wins initiative!
Running ZLib version: r37 (current)
1 HP costs 6.667μ. ( 41 / 50 )
1 MP costs 17μ. ( 93 / 147 )
Running BatBrain version: /\/\^v^/\/\ (current)
Running SmartStasis version: 3.18 (current)
Running WHAM version: 4.9 (current)
WHAM: We currently think that the round number is: 0 and that the turn number is 491.
WHAM: Checking to see if WHAM sould adjust the unknown_ml for smut orc pipelayer.
WHAM: No need to do anything with smut orc pipelayer.
WHAM: Setting up variables via BatBrain
Value of stat gain: 251.56μ
Value of stat gain: 251.56μ
ATT: 115 (94% × 39.82, death in 2)
DEF: 110 (8.59% × 2.18 (30), win in 31)
HP: 110, Value: 251.56 μ, RES: 0
Parsed round number: 1
Building options...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*98.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Options built! (14 actions)
WHAM: We currently think that the round number is: 1 and that the turn number is 491.
WHAM: Current MP = 93 out of 147.
WHAM: You have no profitable MP restoratives.
WHAM: Current HP = 41 out of 50.
WHAM: You have no profitable HP restoratives.
WHAM: You are fighting a smut orc pipelayer. Mafia considers that this monster has an attack of 115 or 115 when given a monster name.
WHAM: Mafia further considers that this monster has a defense value of 110 or 110 when given a monster name.
WHAM: Mafia further further considers that this monster has a HP value of 105 or 105 when given a monster name.
WHAM: Your current ML-adjustment is: 35.
WHAM: Monster HP is 110.0.
WHAM: WHAM added the following to BatRound: if pastround 29; abort "Stopping fight because it has gone on for too long (set WHAM_maxround to a higher value if you think this was in error)"; endif; 
skill 14003 does hurt the monster for 110.0 and is ok.
Value of stat gain: 251.56μ
WHAM: Attack option chosen: skill 14003 (round 1, profit: -85)
WHAM: We currently think that the round number is: 1 and that the turn number is 491.
WHAM: Starting evaluation and performing of attack
WHAM: We currently think that the round number is: 1 and that the turn number is 491.
skill 14003 does hurt the monster for 110.0 and is ok.
Value of stat gain: 251.56μ
WHAM: Attack option chosen: skill 14003 (round 1, profit: -85)
WHAM: Stun option chosen: skill 14034 (round 1, profit: -119)
Monster HP is 105 according to Mafia and 110.0 according to BatBrain
Queued: skill 14034
Building options...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*98.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Options built! (14 actions)
Queued: skill 14003
Building options...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*98.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Options built! (14 actions)
Parsed round number: 1
Building options...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Evaluating '2.2*min(45+min(0.3*98.0,50)+0.0+0.0,30.0*10)*2'...
Evaluating '2.2*min(12.5+0.4*98.0+0.0+0.0,5.0*10)'...
Options built! (14 actions)
WHAM: Evaluating the attack but not performing it took 0.36 seconds.
WHAM: Debug printing the damage dealt by your options.

WHAM: Boil: 110.00 potential damage (raw damage: 110.00) and a hitchance of 100.00%.
WHAM: Freeze: 110.00 potential damage (raw damage: 110.00) and a hitchance of 100.00%.
WHAM: Grill: 110.00 potential damage (raw damage: 327.36) and a hitchance of 100.00%.
WHAM: grouchy restless spirit: 42.00 potential damage (raw damage: 42.00) and a hitchance of 100.00%.
WHAM: Curdle: 33.00 potential damage (raw damage: 33.00) and a hitchance of 100.00%.
WHAM: Bake: 11.00 potential damage (raw damage: 11.00) and a hitchance of 100.00%.
WHAM: Knob Goblin firecracker: 3.00 potential damage (raw damage: 3.00) and a hitchance of 100.00%.
WHAM: magical mystery juice: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: wussiness potion: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Blend: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Mountain Stream soda: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: Jiggle your chefstaff: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: 8-ball: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.
WHAM: murky potion: 0.00 potential damage (raw damage: 0.00) and a hitchance of 100.00%.

WHAM: Evaluating the attack but not performing it took 0.43 seconds.
Round 1: frodobatman executes a macro!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
WHAM: Verbosity of 10 or more is set. Data files for debugging have been generated. Aborting.
You're on your own, partner.
Click here to continue in the relay browser.


Running ZLib version: r37 (current)
Running ZLib version: r37 (current)
Round 2: frodobatman casts BOIL!

[492] Smut Orc Logging Camp
KoLmafia thinks it is round 3 but KoL thinks it is round 2
Round 3: smut orc pipelayer takes 110 damage.
Round 3: frodobatman wins the fight!
You gain 37 Meat
You acquire an item: raging hardwood plank
You acquire an item: long hard screw
You gain 7 Strengthliness
You gain 18 Magicalness
You gain 6 Sarcasm
Running ZLib version: r37 (current)
1 HP costs 6.667μ. ( 41 / 50 )
1 MP costs 17μ. ( 94 / 147 )
Running BatBrain version: /\/\^v^/\/\ (current)
Running SmartStasis version: 3.18 (current)
Value of stat gain: 251.56μ
Value of stat gain: 251.56μ
ATT: 115 (94% × 39.82, death in 2)
DEF: 110 (8.59% × 2.18 (30), win in 31)
HP: 110, Value: 251.56 μ, RES: 0
Parsed round number: 0
Look! You found 1 long hard screw (50μ)!
Look! You found 1 raging hardwood plank (50μ)!
Running BatMan RE version: 1.7 (current)
Running ZLib version: r37 (current)
 
Last edited:
I think the reason is that Boil does ~110 damage and the monster has ~105 HP meaning that a small variation in either could lead to you getting hit and thus a stun is enqeueued as well to help out. Not sure about the first one though.
 
It looks like it wasted a grenade on me...I have maximum MP, tons of MP regen, and it used a grenade and chop instead of slice...
Code:
[106] Belilafs Comedy Club
Encounter: Pr Imp
Strategy: /~/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
The string "/\/\^v^/\/\" is not an integer; returning 0 (zlib.ash, line 181)
The string "/\/\^v^/\/\" is not an integer; returning 0 (zlib.ash, line 182)
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: Enqueuing a stun to help with the battle
WHAM: We are going to 2-shot with CSA obedience grenade and Chop.
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos uses the CSA obedience grenade!
Round 2: pr imp drops 3 attack power.
Round 2: pr imp drops 3 defense.
Round 2: chef_rannos casts CHOP!
Round 3: pr imp takes 85 damage.
Round 3: chef_rannos wins the fight!
You gain 49 Meat
You gain 5 Fortitude
You gain 16 Enchantedness
You gain 3 Roguishness

Visit to Pandamonium: Belilafs Comedy Club in progress...

[107] Belilafs Comedy Club
Encounter: CH Imp
Strategy: /~/.kolmafia/ccs/WHAM.ccs [default]
Round 0: chef_rannos wins initiative!
The string "/\/\^v^/\/\" is not an integer; returning 0 (zlib.ash, line 181)
The string "/\/\^v^/\/\" is not an integer; returning 0 (zlib.ash, line 182)
WHAM: Running SmartStasis
WHAM: Starting evaluation and performing of attack
WHAM: We are going to 1-shot with Slice.
Round 1: chef_rannos executes a macro!
Round 1: chef_rannos casts SLICE!
Round 2: ch imp takes 156 damage.
Round 2: ch imp drops 20 attack power.
Round 2: chef_rannos wins the fight!
You gain 28 Meat
You acquire an item: imp air
You gain 5 Strengthliness
You gain 16 Mysteriousness
You gain 3 Roguishness


EDIT: Finally upped my verbosity...in case that provides some useful information next time.
 
Last edited:
My experience was contrary, but checking your code it seems I underestimated you and made a simple mistake based on the fact that my BatMan_blacklist previously was manually configured with a subset of my WHAM_dontuse. Since the replay script was promptimg me with my full WHAM_dontuse, it seemed obvious to me that it wasn't looking at BatMan_blacklist.

Now I know that it is actually checking both, so I can simply delete my WHAM_dontuse and cease to worry.

I have a new question: Why are you continuing to write out a blank WHAM_dontuse? I'd rather that it would stop existing if I deleted it from my /data directory. To fix that I'd recommend that if count(not_ok) > 0 after reading it in, mark it for blanking and otherwise don't do a map_to_file on it.
 
Last edited:
Turtle Tamer in Aftercore. Character has just about every skill in game perm'd. Running through a Video Game dungeon. WHAM makes its choices, runs the combat and then stops because it has reached max rounds and not killed the monster. This is not desirable for automatic adventuring, especially when WEAPON OF THE PASTALORD or SAUCEGEYSER can one shot. Since I value automation and killing the monster more than say, the meat, mp, or hp to be gained by stasis or the mp saved by using a weapon, I figure I must have some setting wrong. Obviously I should run with high verbosity and repost, and I shall, but are there any obvious candidates for settings to be tweaked? On several occasions I have felt as if WHAM ignored spells when I was a Muscle class even when spells were more effective, where effective means killing the monster. Is there any an embedded preference of class skills and, if so, can it be overridden? Is there a simple explanation along the lines of "Mafia (or Batbrain) doesn't know about the video game monsters"?
 
Against video game monsters or other scalers, deleveling followed by melee can be a devastating combo. Sometimes I've seen WHAM do that... othertimes not. Perhaps I should pay attention to details.
 
Personally, I use this:
WHAM_maxround 30
WHAM_round_limit 10
WHAM_safetymargin 10
Basically:
30 rounds max - unfortunately it isn't currently smart about extended fights, but... eh, what can you do easily? :(
Only spend 10 rounds automating at a time.
Leave 10 rounds at the end for me to finish things if WHAM goes stupid.

Automates basically everything unless the monster stats are wrong/special, like in the Sea or Groar's resistance, but it's automated about 40-100 DailyPros without a problem.
 
Last edited:
Well. I tweaked a couple settings and WHAM is handling the video game just fine. I am at a lost to explain why changing maxRounds and safetyMargin make a difference but the problem seems to have resolved itself. I will note that I broke the prism yesterday whereas today was a fresh loging so perhaps there is some setting related to being in hardcore that did not get reset? Regardless, my issue is resolved.
 
Well. I tweaked a couple settings and WHAM is handling the video game just fine. I am at a lost to explain why changing maxRounds and safetyMargin make a difference but the problem seems to have resolved itself. I will note that I broke the prism yesterday whereas today was a fresh loging so perhaps there is some setting related to being in hardcore that did not get reset? Regardless, my issue is resolved.
I'd also tweaked my settings before trying the video game and had no trouble there. My settings are:
Code:
WHAM_maxround 50
WHAM_round_limit 15
WHAM_safetymargin 0
Really? That's odd. Those are the defaults, except max round of 50.
 
WHAM version 5.0 uploaded that should hopefully fix most of the oddities with stunning monsters that we can one-shot (it didn't take monster element into account in any way).

WHAM Dontuse has been updated to 0.4 with the minor fix to not regenerate an empty datafile just because.
 
This has become one of my favorite scripts. I'm so happy I stopped developing DAM.


WHAM Dontuse has been updated to 0.4 with the minor fix to not regenerate an empty datafile just because.

That is in the script's changelong, but it does not work. My nonexistent WHAM_dontuse_bale was recreated by saving.
 
Ehh... Yes... I thought I had done that change, but I had only done it on my work computer... *sigh*

Edit: 0.4.1 should do it for reals...
 
Last edited:
Edit: 0.4.1 should do it for reals...

I don't want to sound hyper-critical, but I'd suggest that you skip right to the 6th stage of debugging and try again. Were you planning to start using blacklist instead of not_ok as the primary map? If so, you forgot that step.
 
I updated. After casting noodles, it tells me I am on my own. The message "Could not match item(s) for use: use 5048" appears in the relay browser page when I go to finish the combat, but nothing like that occurs in the gCLI. I reverted to what Dropbox claimed was the previous version and I get the same behavior. r12035. Turtle Tamer in aftercore with almost all skills in the game perm'd.
 
Do you have any shards of double-ice?

Edit: That said, it should be the same in the old version since the new version really didn't change anything in regards to what to enqueue or not.
 
Back
Top