Since I am not going to embed a generalized linear program solver in KoLmafia or write one in Ash or extend Ash so that it can access an online solver I will use a "pick the best available item until a constraint is hit" algorithm and favor ease of implementation over mathematical optimality.
BTW, would you be interested in using a LP solver if I managed to write one in ASH? I haven't really given it much thought yet, but I *do* have one implemented in perl (did that several years back to help optimize in some other games). Unless it uses PDL, BigRat(ional) numbers, or some weird array structures, it shouldn't be very hard to rewrite in ASH, maybe. Though I suspect it won't be very fast.
Oh right. *Integer* programming. That would be a problem ... you don't want to eat only 2/3 of a 3-fullness food so that you can stuff in another. I will have to look into other algorithms for that ... I remember being taught several ...
I'd love to see the complete problem addressed first. Premature optimization tends not to be a good thing. That said, there are several possible ways to reduce the number of consumables if performance suggests that needs to be done. As I think about the equivalency idea proposed I note that I forgot to include availability as a constraint on the number of items that can be consumed. That probably drives the problem for players that do not have Mall access.
I'll modify the first post so that iit includes a link to the most recent version.
Edit your vars_yourcharactername.txt file (in your /data folder); change the setting:Is there a way to remove the 3 second countdown
This is voodoo advice. If there is a problem with inventory, "refresh inventory" will fix it. Since "refresh all" does nothing to inventory - and even if it did, it would be exactly the same thing as "refresh inventory" does - it is completely pointless to do it in the superstitious hope that it will magically fix your problem.refresh inv, then run the script again. If it's still confused, try refresh all.
I have never had a problem with "inventory awareness" since ... well, I can't remember ever having such a problem. If you have such a problem, how about looking in your session log and telling us what you've been doing?Basically, mafia's inventory awareness gets off sometimes, but the script is working based on what mafia tells it. I had the same issue come up a few weeks back.