Destroy All Monsters

Bale

Minion
I'm retiring this thread. DAM is not currently under active development. While it is possible that may change in the future I just don't see as much need for it anymore now that Winterbay's WHAM has matured. Heck, I've even started to use WHAM since DAM is so far behind the curve.

I refer all current users of DAM to Winterbay's Helpful Automatic Monsterbasher.


===========================================

Destroy All Monsters 0.4.2 beta

This script is designed to fight monsters regardless of their type or your character's skills. If you want a script that can easily switch between killing huge ghouls and Feast of Boris monsters, then you've found it! It knows when monsters can be out-moxied and when to shieldbutt or cast spells.

The emphasis is on flexibility and speed of execution. There is already an excellent script that determines the optimal combination of spells to cast, but it was too darn slow if you have all the skills in the game so I began work on this. This script is less optimal, but still reasonably smart.

I know that a lot of people expect me to produce fully realized and fool proof scripts. This is not one of those. This script is more of the "throw stuff against a wall and hope it sticks" variety. It is very solidly in beta and I appreciate constructive criticism from anyone who can help to make this script better. I don't expect this script to be perfect, but I do hope it becomes better.

This script makes heavy use of BatBrain. I'm not really interested in improving it in ways that move away from BatBrain. A secondary purpose of my writing this was to figure out how to make maximal use of BatBrain's power, so if I miss a BatBrain trick, please point it out and help me improve this script.

Please notice that the script starts out by calling SmartStasis. SmartStasis does many clever and important things. After that it will announce when DestroyAllMonsters attempts to kill the monster. Anything disagreeable that happens before this script announces "DestroyAllMonsters starts now!" is probably a SmartStasis bug so report it in that thread, not here.

This script requires the user to download the latest versions of the following scripts to the KoLmafia /script directory. If you dislike clutter, you can create a subdirectory called /automation and put all four scripts in that directory. KoLmafia will automatically detect scripts in subdirectories of the /script directory.

Then you need to set your custom combat action to "custom combat script" and create a custom combat script that contains only the following:

Code:
[ default ]
consult DestroyAllMonsters.ash
 

Attachments

  • DestroyAllMonsters.ash
    23.1 KB · Views: 236
Last edited:

Winterbay

Active member
Nice good to have a thread in which to discuss this.

I will most likely still use my own spamattack-script while in HC runs but in aftercore it is, as you say, way too slow taking 2-3 minutes per fight :)
 

Winterbay

Active member
Anythign I can do to help debug this one?
Code:
Request 2 of 183 (The Sea: The Wreck of the Edgar Fitzsimmons) in progress...

[8523] The Wreck of the Edgar Fitzsimmons
Encounter: mine crab
Strategy: C:\Privat\Dropbox\Mafia\ccs\PM.ccs [default]
Round 0: winterbay wins initiative!
Profit per round: ActionProfitDamageOtherbase; Grouper Groupie (0μ)0μ--
Run SmartStasis! (0 profit to stasis with spectre scepter -- low)
Monster: Mine Crab, ATT: 710, DEF: 549, HP: 860, Value: 2709.5
You will die in 2306 rounds.
Your attack will kill the monster in 1 rounds.
DestroyAllMonsters starts now! (using attack -- killrounds: 1, dierounds: 2306)
Macro called on empty queue!
DestroyAllMonsters starts now! (using attack -- killrounds: 1, dierounds: 2306)
Macro called on empty queue!
Profit per round: ActionProfitDamageOtherbase; Grouper Groupie (0μ)0μ--
Run SmartStasis! (0 profit to stasis with spectre scepter -- low)
Monster: Mine Crab, ATT: 710, DEF: 549, HP: 860, Value: 2709.5
You will die in 2306 rounds.
Your attack will kill the monster in 1 rounds.
DestroyAllMonsters starts now! (using attack -- killrounds: 1, dierounds: 2306)
Macro called on empty queue!
DestroyAllMonsters starts now! (using attack -- killrounds: 1, dierounds: 2306)
Macro called on empty queue!
You're on your own, partner.
Click here to continue in the relay browser.

Edit:
I am currently a level 30 TT with a melee weapon equipped (even though it is a whip so not very powerful). Current stats are 2628/1617/1634 if that matters and verbosity is currenlty on 7.

Edit, edit: Having attacked the darn thing manually I noticed that, as it says up there, it was a mine crab. Batbrain does not like attacking mine crabs so when DAM tried to do that nothing happened since that option wasn't available. I think you need special handling for mine crabs if you are going to get that to work. I tend to funksling two toy soldiers to kill them.
 
Last edited:

Bale

Minion
I should probably add some nice vprint("",8) lines for debugging purposes. Right now all my debugging lines are in the code, but commented out in case I decide to enable them for some special purpose. Obviously that's less useful to people other than myself.


Edit, edit: Having attacked the darn thing manually I noticed that, as it says up there, it was a mine crab. Batbrain does not like attacking mine crabs so when DAM tried to do that nothing happened since that option wasn't available. I think you need special handling for mine crabs if you are going to get that to work. I tend to funksling two toy soldiers to kill them.

I see. BatBrain was trying to avert disaster. It will definitely require special handling to deal with them.


Are you going to add versioning?

Yup.
 
Not sure if this is by design, but Destroy All Monsters just used a yellow ray to kill a Knob Goblin Madam. Kind of a lame use of a yellow ray, but I guess if the purpose is to have DAM use the most likely method to successfully make a kill, then it completed it as it should. Just made me tear up a little when I realized my yellow ray was done for the day. :(

Code:
Request 2 of 49 (Knob: Cobb's Knob Harem) in progress...

[113]     Cobb's Knob Harem
Encounter: Knob Goblin Madam
Strategy:     ................\HC_Run.ccs [default]
Round     0: IceColdFever wins initiative!
BCC: We are using     the hebo against the right monster.
Round 1: IceColdFever casts     SUCKERPUNCH!
Round 2: knob goblin madam takes 1 damage.
Round 2:     knob goblin madam drops 1 attack power.
Round 2: knob goblin madam     drops 1 defense.
Round 2: Mike Wazowski's yellow eye gazes upon a pie     cooling on a windowsill. The pie doesn't vanish, but the hobo who was     trying to steal it does.
BCC: We are trying to use     the HeBoulder, but this is not the right monster, so I'm attacking.
BCC:     We are trying to use the HeBoulder, but this is not the right monster, so     I'm attacking.
Run SmartStasis! (-1 profit to     stasis with Suckerpunch -- low)
1/3 monsters drop goals here.
DestroyAllMonsters     starts now! (using Point at your opponent -- killrounds: 1, dierounds: 188)
Round     2: IceColdFever executes a macro!
Round 2: IceColdFever casts POINT AT     YOUR OPPONENT!
Round 3: Mike Wazowski swings his eyestalk around and     unleashes a massive ray of yellow energy, completely disintegrating your     opponent.
You acquire an effect: Everything Looks Yellow (duration: 150     Adventures)
Round 3: IceColdFever wins the fight!
After Battle: Mike     Wazowski gives you an invigorating hot rock massage.
You gain 10 hit     points
You gain 7 Mojo Points
You acquire an item: Knob Goblin     perfume
You acquire an item: whalebone corset
You gain 2 Fortitude
You     gain 4 Mysteriousness
You gain 5 Smarm
 

jwylot

Member
"BCC: We are using the hebo against the right monster" indicates that BCC's ascend script has decided to use the Hebo surely? DAM announces itself as taking over combat later.
 
Last edited:

Bale

Minion
New Version!
Download 0.2.2 from the first post.


Not sure if this is by design, but Destroy All Monsters just used a yellow ray to kill a Knob Goblin Madam. Kind of a lame use of a yellow ray, but I guess if the purpose is to have DAM use the most likely method to successfully make a kill, then it completed it as it should. Just made me tear up a little when I realized my yellow ray was done for the day. :(

Holy crap! I have never seen that before!! Why the heck did BatBrain think that was a good option for killing? Technically this is a BatBrain bug, but I'll make darn sure that it doesn't happen again!

Fortunately it is easy to fix. I'll just add "skill 7082" the list of skill that are not ok. First post updated with the new version.

Versioning has also been added in this build.
 

Theraze

Active member
Any chance DAM can aim to finish fights in 25 rounds instead of 30? It's really depressing when it calculates out that, if their HP is exactly the right one, it can finish off the fight using spaghetti spear in 30 rounds. Problem is, with the 5% HP variance, it feels like more of these end in failure than success.
Run SmartStasis! (0 profit to stasis with spectre scepter -- low)
Monster: Procrastination Giant, ATT: 200, DEF: 180, HP: 225, Value: 931.1
You will die in 69 rounds.
Your attack will kill the monster in 3 rounds.
DestroyAllMonsters starts now! (using Spaghetti Spear -- killrounds: 30, dierounds: 69)
Fully brimstoned pastamancer is apparently just enough to barely kill procrastination giants.

Suppose that may actually be a BatBrain request, since DAM is just using maxround from BB. I'll think through how I can best request it in a way that's more modular. :) But since HP always has that 5% variance, if you ever calculate out that you'll have exactly enough to kill them, that's almost a 50% chance for failure.
 
Last edited:

Theraze

Active member
True... if BB just put the extra 5% on the monster when it was initializing, that would take care of it. But if it's reading the current HP, how does it track that there's always the extra 5% over what mafia is reporting?
 

Catch-22

Active member
True... if BB just put the extra 5% on the monster when it was initializing, that would take care of it. But if it's reading the current HP, how does it track that there's always the extra 5% over what mafia is reporting?

I guess on round 1 you'd do something like:
PHP:
extra_hp = monster_hp(last_monster())*0.05;
then add extra_hp to each calculation involving HP.
 

Bale

Minion
Any chance DAM can aim to finish fights in 25 rounds instead of 30? It's really depressing when it calculates out that, if their HP is exactly the right one, it can finish off the fight using spaghetti spear in 30 rounds.

That sounds like a very good idea and not terribly hard to implement.

I guess on round 1 you'd do something like:
PHP:
extra_hp = monster_hp(last_monster())*0.05;
then add extra_hp to each calculation involving HP.

That has definitely turned into a BatBrain discussion. That has little do with DAM, other than to discuss how to work around BatBrain's possible flaws. DAM does no HP calculation.


New Version!
Download 0.2.3 from the first post.

  • If a monster cannot be killed by round 25, abort and let the player deal with it.
 

Catch-22

Active member
I'd say it's more of a discussion as to the way KoLmafia represents a monsters known HP than a discussion on shortcomings of BatBrain.

I've created a pessimistic monsters.txt file, which multiplies all known HP values by 1.05, see the attached file.

Bale, any chance we can get the maxround abort as a variable at the top of the script, instead of a hard-coded "maxround - 5"?

I'm going to be experimenting with my pessimistic monsters.txt and skip the current fix. We'll see how things go :)

Edit: So parts of this monsters.txt aren't formatted correctly on monsters lacking a Defense stat (due to my laziness), KoLmafia seems smart enough to get around the formatting mistakes. I'll update this when I figure out a better way to edit the file en masse and post it again if anyone's interested.
 

Attachments

  • monsters.txt
    121.3 KB · Views: 191
Last edited:

Bale

Minion
Bale, any chance we can get the maxround abort as a variable at the top of the script, instead of a hard-coded "maxround - 5"?

How would you want that expressed, considering that not every fight is limited to 30 rounds? Several monsters let you go 50 rounds. Should the variable be failsafeRounds?
 

Bale

Minion
New Version!
Download 0.3.0 from the first post.


I only changed a few lines of code, but I believe it is a fundamental improvement in DAM's effectiveness. I hope that I'm not wrong.

First of all, I discarded use of the enqueueSafe() function. I no longer use the safeKill item, although it is still being reported. Now all monsters are killed with the enqueueDanger() function.

Next, I changed the sorting algorithm for opts. All attack skills are sorted according to this shockingly obvious algorithm:


PHP:
int meatval(advevent a, int stun, float mdpr) {
	int rnd = kill_rounds(a);
	int cost = rnd * (a.mp * meatpermp + a.meat);
	if(rnd> stun)
		cost+= (rnd - stun) * mdpr * meatperhp;
	return cost;
}

Honestly I don't know why I didn't just do that in the first place! It's so bloody obvious! It simply figures out how much mp an attack will cost you and how much damage you will receive. It then multiplies that number by the rounds that it will take to kill the monster with that attack. What could be simpler?
 
Last edited:

Theraze

Active member
Unfortunately, DAM 0.3 is failing to attack Procrastination Giants at all now...
Run SmartStasis! (0 profit to stasis with spectre scepter -- low)
Monster: Procrastination Giant, ATT: 140, DEF: 126, HP: 165, Value: 645.87
You will die in 273 rounds.
Your attack will kill the monster in 1 rounds.
DestroyAllMonsters starts now! (using Spaghetti Spear -- killrounds: 22, dierounds: 273)
DestroyAllMonsters is unable to figure out a useful combat strategy
I end up just one-hitting it with a fearful fettucini or physical attack or weapon, or... well, I have a lot of things that work properly. But DAM wants to slowly use SS even though it's decided to consider it to be too dangerous.

Attacked, and killed in one hit:
You swat him on the knee, doing 240 (+10) damage. KERBLAM! WHAM! BAM! KAPOW! SMACK! ZAP! BARF! BONK! POW! SPLAT!
 
Top