loathers / garbage-collector

Script for farming meat (and garbage) in 2003 web RPG Kingdom of Loathing
24 stars 59 forks source link

[micro-optimization] place the shortest digitize first #1520

Open docrostov opened 1 year ago

docrostov commented 1 year ago

in the current logic, garbo tends to make the last digitize of the day the shortest one due to how the untangle/chunking works and how garbo determines whether it should or should not digitize. (it is sometimes actually much, much shorter than the first two due to some of the approximations used for thumb ring, which is a slightly separate issue, but not the end of the world.)

if you have kremlin's greatest briefcase, it likely would be better for the end-user to make the shortest digitize of the day your -first- digitize, because then you are getting the maximal number of embezzlers in during the KGB buff duration, as well as any limited buffs that were cost-effective in your first X turns with high embezzler concentration and not so much in your next Y turns. i have a headache and cannot figure out exactly how you would patch this so the garbo logic understands this immutable truth, but it is located in some combination of the two functions linked below and would be a (likely) relatively simple PR for someone in order to actualize, i dunno, maybe 1-2k of gain?

https://github.com/loathers/garbage-collector/blob/4dca85dc1c41838203219befa8811a4708bc5eb2/src/turns.ts#L92 https://github.com/loathers/garbage-collector/blob/4dca85dc1c41838203219befa8811a4708bc5eb2/src/combat.ts#L147

horrible-little-slime commented 1 year ago

upon reflection, it's just shouldRedigitize; untangleDigitizes is just used for counting the number of embezzlers left in the day for shit like maps and marginal familiars

dapanda1 commented 11 months ago

@horrible-little-slime was this never closed because it was waiting on implementation or something else? I came across a use case and I can submit another request for it, but if the shortest digitize is first then it would allow someone who isn't spending all their adventures on Garbo (to perform other tasks, maybe spading of a new iotm or new christmas drop) to take advantage of those higher meat bonuses at the start of the run. ( I can also make another feature request if that would be better)

horrible-little-slime commented 11 months ago

We aren't waiting on anything in particular. It's not closed because no one has done it.

On Thu, Oct 12, 2023, 12:28 PM whatisbecome1111 @.***> wrote:

@horrible-little-slime https://github.com/horrible-little-slime was this never closed because it was waiting on implementation or something else? I came across a use case and I can submit another request for it, but if the shortest digitize is first then it would allow someone who isn't spending all their adventures on Garbo (to perform other tasks, maybe spading of a new iotm or new christmas drop) to take advantage of those higher meat bonuses at the start of the run. ( I can also make another feature request if that would be better)

— Reply to this email directly, view it on GitHub https://github.com/loathers/garbage-collector/issues/1520#issuecomment-1759959675, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZNQVLKTNCYCZRX6QJGJNLX7ALEFAVCNFSM6AAAAAA3ZGLEPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJZHE2TSNRXGU . You are receiving this because you were mentioned.Message ID: @.***>

horrible-little-slime commented 10 months ago

One potential complication here is that the start of the day is when we have our least precise estimate of the number of turns we're going to run

dapanda1 commented 10 months ago

What is the current timing that it uses? Is it static or does it calculate when to use it based on the number of turns left, when it reaches a particular number of digital monster encounters/digitizations?