Destroy All Monsters

Winterbay

Active member
It does not attack Procrastination giants because it does not want to attract the annoying effect it can give you if you do, and so it falls back to other options which are apparently no good at the moment. I guess it could iterate down to a skill that will work for a low cost, but 0 is probably going to be hard to beat... (and leads you into SpamAttack's territory of being slowed down by too many options).
 

Theraze

Active member
0 is fine if it works. Using Weapon or Fettucini to one hit it would have been fine as well. Deciding that 0 is best value and then eliminating it and quitting is not optimal behaviour. :)
 

Bale

Minion
0 is fine if it works. Using Weapon or Fettucini to one hit it would have been fine as well. Deciding that 0 is best value and then eliminating it and quitting is not optimal behaviour. :)

Definitely not. Found the problem and I think I fixed it. Give the new build a whirl.


New Version!
Download 0.3.1 beta from the first post.



Edit: Let's try that again....


New Version!
Download 0.3.1.1 beta from the first post.
 

Catch-22

Active member
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?

Yeah, basically so the hardcore testers like myself can set it to zero and entrust the full amount of rounds to DAM or for people who want to be a bit careful, you can allow a specified amount of rounds at the end. Maybe cushionRounds or safetyMargin, I dunno :)
 

Bale

Minion
Done. (Already added to my local copy.) Next time I update the version it will include a variable at the top called safetyMargin. I'm not making it a zlib variable, at least for now.
 

Catch-22

Active member
Thanks Bale :)

So I did a bit of reading and as lostcalpolydude has said, the HP variance is sort of capped at 5.

Although "Variance has a triangular distribution (that is, you are much more likely to see 0 than -5 or 5)." seems to suggest that it should more often than not be a pretty good estimation of HP, which doesn't really explain Theraze's woes, perhaps she was just extraordinarily unlucky. If there's only a difference of 5hp at most, then you'd think it very unlikely that the battle would end exactly within that 1-4 HP remaining range. Perhaps DAM or BatBrain is just being too optimistic elsewhere and the ±5 HP is just a bit of a red herring.

In the example given, Spaghetti Spear is being used, the damage formula for this is 2-3 damage (my guess is 50/50 chance to deal 2 or 3 damage), bonus damage capped at +5, for a total of 7-8 damage. Even if we assume that Procrastination Giant has exactly 225HP you'd still have to deal 8 damage as often or more often than 7 damage each time you use Spaghetti Spear, so perhaps it's more that Theraze's troubles were the cause of optimistic damage prediction as opposed to monster HP variance.
 
Last edited:

Theraze

Active member
Hmm... with DAM 0.3.1.1 it doesn't think it can finish the combat, and just hangs instead of aborting.
Run SmartStasis! (-91 profit to stasis with seal tooth -- low)
Monster: Pooltergeist, ATT: 20, DEF: 18, HP: 25, Value: 222.13
You will die in 2 rounds.
Your attack will kill the monster in 9 rounds.
DestroyAllMonsters starts now! (using Clobber -- killrounds: 3, dierounds: 2)
KoLmafia declares world peace.
You're on your own, partner.
I one-hit them using my master-fist unarmed.

The lack of thinking attack is fine is a BatBrain bug. Hanging instead of aborting is a DAM bug.
 

Bale

Minion
Hmm... with DAM 0.3.1.1 it doesn't think it can finish the combat, and just hangs instead of aborting. Hanging instead of aborting is a DAM bug.

Yep. I've improved anti-infinite-looping protection.


New Version!
Download 0.3.1.2 beta from the first post.

  • safetyMargin is a configurable (and hopefully useful) variable near the top of the script. It is for Catch-22's personal enjoyment.
  • Hopefully fixed an infinite loop.
 
Last edited:

Bale

Minion
New Version!
Download 0.3.1.3 beta from the first post.

  • Shmart Shtuff.
  • Better noodling.


So much left to do regarding my recent abandonment of safe vs dangerous combats.

Plus I still have no good implementaton for deleveling. Anyone have any idea how deleveling should be implemented? It would make me happy if anyone had a good suggestion for that problem.
 
Last edited:

Winterbay

Active member
I guess the delevelling question is dependent on if you want it to go as fast as possible, or as cheaply as possible and so on. Do you have any base assumption that you want to be there as a start someone can build on?
 

Bale

Minion
Do you have any base assumption that you want to be there as a start someone can build on?

Just that it should delevel if that will enable you to hit with your basic attack and it will cost fewer mp than using attack skills. Obviously mistletoe should be accounted for.

At least that is what I do when I'm running a bit more ML than I can handle as a moxie class. I suspect that softcore people never delevel since the ML they can run is insane.
 

Winterbay

Active member
So, in a flow:
1) Calculate cost of killing with attack skill (without you getting spanked)
2) Calculate cost of delevelling to where you can hit the monster (also without you getting spanked)
3) Perform the cheapest option of the two

Not having looked intently at the current script I am guessing the first calculation is done somewhere already? That leaves doing the second step and then comparing it.
Should we use a short-list of delevelling skills/items or do we want to use all (which will slow down the calculation I guess)? I might take a look at it (I mean my spamattack is also lacking this functionality so...), if I find the time.
 

Bale

Minion
Winterbay said:
Not having looked intently at the current script I am guessing the first calculation is done somewhere already?

Nope. I don't do that calculation at all! :D

The wonder of BatBrain is that I don't have to do it! Okay, maybe that isn't something to be so proud about. Still, BatBrain has kept track of that so I can probably check adj.mp for the answer.

I've currently got an attempt at a function to delevel the enemy. It's called enqueuePlink(). I'm not proud at it, but it is in the script. It's very messy.
 

StDoodle

Minion
The "to delevel or not to delevel" question was what eventually made me give up on writing a combat script back in the day, so good luck! :p
 

Winterbay

Active member
The "to delevel or not to delevel" question was what eventually made me give up on writing a combat script back in the day, so good luck! :p

There's no problem with it. You just need to define your target audience first and all others that use it do so on their own risk :)
 

Crowther

Active member
I had a couple problems yesterday, with yesterday's version.

The first involved Half-Eaten Brain. I was fighting zombie waltzers. Destroy chose to noodle, then spam stream of sauce. That worked great, except on two different occasions, I was hit with Half-Eaten Brain. Then stream of sauce stopped and attack was used instead. I couldn't hit and died quickly. I really should put an abort into my CCS after your script, but I think the script was still running. I think the macro was still running. I've got logs if that helps.

The second was with Quiet Healer. Stasis value was zero, Destroy took over and decided to sing until all rounds were used up. Obviously she's an odd monster (dierounds: 1260000).

All in all, this script (and batbrain) are really amazing. I hope someone can figure out a simple, nearly optimal deleveling scheme.
 

Bale

Minion
I've got logs if that helps.

Logs always help. "I think" makes me wonder.

The second was with Quiet Healer. Stasis value was zero, Destroy took over and decided to sing until all rounds were used up. Obviously she's an odd monster (dierounds: 1260000).

This is a BatBrain bug. I reported it to zarqon in his thread. You can fix it pretty easily. For some reason zarqon thought that the Quiet Healer never attacks. You can remove that mistake by changing line 565 of BatBrain.ash to this:

Code:
   if ($monster[naughty sorority nurse] == m) return 0;   // these monsters have no attack
 
Last edited:
Top