loathers / autoscend

An ascension script for KoLMafia
Other
45 stars 67 forks source link

Fix the chronic overlevelling #508

Open Malibu-Stacey opened 4 years ago

Malibu-Stacey commented 4 years ago

Having been running an account with no IotMs until now, I hadn't experienced this before but the script overlevels like crazy if you have a reasonable amount of IotMs. In LKS runs I've seen it kill the NS at level 15 and be close to breaking 16. At least one person in discord has reported it finishing a Standard run at level 14. This is with auto_disregardInstantKarma set to false.

The ML handling code is pile of fettuccine which desperately needs a refactor. At level 13+ I've seen it running a full MCD plus hundreds of adventures of Urkels, Dreschers and Pride of the Puffin. It also doesn't help that we load of experience buffs like Inscrutable Gaze similarly and never uneffect/replace them.

taltamir commented 4 years ago

In regards to reaching level 15, I recall having made it so autoscend will ignore the leveling restrictions once we reach level 14 with the argument that by level 14 we already missed the instant karma, so we might as well do the free fights and get the extra XP to make fights easier.

But it really should not be running high ML at level 13 itself for someone who has set auto_disregardInstantKarma to false. ML code really does need a good refactoring.

I think the main issue here is that we lack any function tries to predict XP gains, either for IOTMS or normal adventuring. Instead what we do is: are we under or over level 13? use all free fights are we exactly level 13? if auto_disregardInstantKarma is false then make a half hearted effort to avoid XP gains. (do not use god lobster, do not buff mainstat in NEP, in theory do not raise ML)

So:

  1. we need to fix ML code to not use ML once level 13 if not disregarding instant karma
  2. we could benefit from an XP prediction function, but that would be a fairly complex undertaking.
  3. should we maybe disable free fights entirely if level 13 and auto_disregardInstantKarma is false? maybe have a second setting specifically for that? because I imagine some people would want it disabled for the instant karma, while others would not want to waste the free fights.
Malibu-Stacey commented 4 years ago

You're focusing far too much on free fight handling which is a tiny part of this issue. The main issue is the scattershot approach to ML and experience buff handling.

As an example I've had it get to level 12 by the end of day 1 in Normal LKS by using all the experience & ML buffs along with all the free fights on turn 0 and then letting autoscend run the rest of the day. Day 2 (with absolutely no manual intervention) it effortlessly passes through level 13 and by the time it rolls around to actually doing the free fights at the end of the day, it's solidly in level 14 and well on the way to hitting level 15 (and still has a handful of tasks to do on day 3). Doing or not doing the free fights on day 2 in that situation isn't going to make a difference.