EatDrink.ash: Optimize your daily diet (and see how your old diet stacks up).

Lxndr

Member
Is this a problem with eatdrink or zlib?

Code:
> call scripts\EatDrink.ash

Checking for updates (running ZLib rev. 30)...
Validating repo...
svn: E175002: connection refused by the server
Something went wrong while fetching svn directory info
Done.
 

Veracity

Developer
Staff member
No.

Well, some would consider zlib's insistence on updating itself every time it runs to be a bug, but the failure is not due to buggy code in either EatDrink or zlib.
 

illarion

Member
The problem is with SourceForge (where most of the scripts are hosted). We assume it's temporary. You can work around it by commenting out the line in zlib that calls 'svn update'.

As Veracity alludes to, some might argue that that change is for the better even in the absence of this issue ;)
 

infarct

New member
When I run this on one account, everything goes great.

On my other, it insists on looking for Chakra-mental wine.

Huh?
 

Prsidz

New member
Strange; seems Mafia doesn't want to accept that i'm installing EatDrink. Whenever I try to install it with the SVN link, it always says:
Starting Checkout...
Validating repo...
Repo validated.
C:\Users\User\Desktop\Folder\KolMafia\svn\therazekolmafia-eatdrink
At revision 54
but always says "Unable to invoke EatDrink.ash" when I try to use it.
 

xKiv

Active member
That looks like it's already "installed", but missing from live script folder. Mafia sees that there are no changes coming from SVN server, so does not push any changed files (from svn/ folder to scripts/ folder).

I am not sure what the correct way to resolve this is.

Maybe svn sync?
Or delete the script and install it again?
 
Currently I'm in aftercore, and it's my first time using this EatDrink.ash script.

Comparing this with the Houeland's optimal diet list, that gave me 277 adventures, this script only returned 216 adv. Thus, I'm wondering why is there such a large difference?

I ensured that both of them I set the adv value as 3,500.

I also noticed that all of the items EatDrink suggests comes from my own inventory rather than the mall. Is this normal? I assumed that its supposed to have checked the prices in the mall too according to the script's description on the first page.

In addition, comparing the overall profit of both diets,
houeland optimal diet (after taking into account the cost of mall buying): ~889.6k Meat
EatDrink.ash: ~756k Meat

Does this mean I should continue using houeland's optimal diet?
 
Last edited:

heeheehee

Developer
Staff member
My first pass with ED tried to consume deluxe layer cake with mayozapine, which pointed to weighting stats too heavily. My next pass pointed out that I hadn't set my valueOfAdventure appropriately, so I did so.

With those two tweaks, food + booze were identical to Eleron's diet calculator (lasagna, perfect booze with peppermint booze filler). Spleen insisted on using all transdermal smoke patches, but that's likely because Eleron's diet calculator relied on an outdated price of coffee pixie sticks.
 
My first pass with ED tried to consume deluxe layer cake with mayozapine, which pointed to weighting stats too heavily. My next pass pointed out that I hadn't set my valueOfAdventure appropriately, so I did so.

With those two tweaks, food + booze were identical to Eleron's diet calculator (lasagna, perfect booze with peppermint booze filler). Spleen insisted on using all transdermal smoke patches, but that's likely because Eleron's diet calculator relied on an outdated price of coffee pixie sticks.

Thanks for the insight! :) You're right about the coffee pixie sticks, I usually just press exclude and see what else I get.

Any recommendations as to what I should change the "eatdrink_valueOfNonPrimeStat" and "eatdrink_valueOfPrimeStat" to get similar results as Eleron's diet calculator?

I tried amending valueOfNonPrimeStat and valueOfPrimeStat, even setting both to 0, but I still get the same result as before, where the no. of adv generated is inferior to that of Eleron's.

Thank you!
 
Last edited:

xKiv

Active member
As far as I can tell, eleron's datafile will soon be an entire year out of date, and some of the prices in the diet it suggested for me were an entire 100% off.
 

heeheehee

Developer
Staff member
Thanks for the insight! :) You're right about the coffee pixie sticks, I usually just press exclude and see what else I get.

Any recommendations as to what I should change the "eatdrink_valueOfNonPrimeStat" and "eatdrink_valueOfPrimeStat" to get similar results as Eleron's diet calculator?

I tried amending valueOfNonPrimeStat and valueOfPrimeStat, even setting both to 0, but I still get the same result as before, where the no. of adv generated is inferior to that of Eleron's.

Thank you!

Are you modifying the value in data/vars_<charname>.txt, or attempting to set Mafia settings (via CLI's `set valueOfNonPrimeStats = 0` etc)? The latter won't work.
 

heeheehee

Developer
Staff member
Odd. You did set valueOfAdventure as a mafia setting? You're being consistent with, say, not overdrinking in either simulation? And you're setting custom organ sizes to fit your in-game situation? Is Eleron's diet calc suggesting forks / mugs? ED doesn't support those.

I do remember arguing in the past re: ED's suboptimality due to its greedy approach, but in my experience it hasn't been that bad, outside of the cases it simply doesn't support.
 
EDIT: I figured out what was wrong, I didn't enable "buying items from Mall if required" in the Kolmafia settings.
Thanks heeheehee for running through all the checks with me :)

Nonetheless, I'm still curious regarding this: What is the difference between "spent X meat" and "additional expenditures of X meat"?




Odd. You did set valueOfAdventure as a mafia setting? You're being consistent with, say, not overdrinking in either simulation? And you're setting custom organ sizes to fit your in-game situation? Is Eleron's diet calc suggesting forks / mugs? ED doesn't support those.

I do remember arguing in the past re: ED's suboptimality due to its greedy approach, but in my experience it hasn't been that bad, outside of the cases it simply doesn't support.

Yes, I'm quite sure I set the valueofadventure correctly, as the start of the script shows the correct valueofadventure that I had set. And yes, I was being consistent in setting no overdrinking for both simulations. Same for organ size.

Eleron's diet calculator did not suggest forks/mugs. I do acknowledge that the prices on Eleron's calculator is a bit off especially for spleen items. But nonetheless, I don't think that could still explain the ~58 adventures difference between both calciulators.

For reference, Eleron's diet calculation here:

Screen Shot 2017-05-13 at 12.47.44 PM.png


Here's is EatDrink's calculation:
Code:
Starting EatDrink.ash (version 3.2).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from inventory Hagnk's NPCs. Per-item budget cap is 25000.0.
Retrieval cap is 20000. Price will be a factor if you own it already.
An adventure has the value of 3500 meat. Mysticality subpoint is 0.0. Nonprime stat subpoint is 0.0.
Simulating only; no purchases or food/drink/spleen consumption.
booze: At 0, consuming to 19 with 1016369 meat.
0: Ode to Booze price: 0 value: 66500
1: perfect mimosa lev:5 gain:3.0 adv:18.5 musc:17.5 myst:27.5 mox:8.0 meat:3398 own:0 value:20450
2: distilled fortified wine lev:1 gain:1.0 adv:5.5 musc:5.5 myst:5.5 mox:5.5 meat:2499 own:0 value:16751
3: bottle of laundry sherry lev:11 gain:2.0 adv:7.5 musc:0.0 myst:65.0 mox:0.0 meat:1300 own:0 value:12475
4: bottle of laundry sherry lev:11 gain:2.0 adv:7.5 musc:0.0 myst:65.0 mox:0.0 meat:1300 own:0 value:12475
5: dusty bottle of Marsala lev:1 gain:2.0 adv:7.0 musc:7.5 myst:7.5 mox:7.5 meat:158 own:3 value:12171
6: dusty bottle of Marsala lev:1 gain:2.0 adv:7.0 musc:7.5 myst:7.5 mox:7.5 meat:158 own:3 value:12171
7: dusty bottle of Marsala lev:1 gain:2.0 adv:7.0 musc:7.5 myst:7.5 mox:7.5 meat:158 own:3 value:12171
8: dusty bottle of Marsala lev:1 gain:2.0 adv:7.0 musc:7.5 myst:7.5 mox:7.5 meat:158 own:3 value:12171
9: dusty bottle of Marsala lev:1 gain:2.0 adv:7.0 musc:7.5 myst:7.5 mox:7.5 meat:158 own:3 value:12171
10: tankard of ale lev:1 gain:1.0 adv:3.0 musc:13.5 myst:13.5 mox:13.5 meat:150 own:15 value:10350
food: At 0, consuming to 15 with 1010330 meat.
0: milk of magnesium price: 1384 value: 51116
1: sleazy hi mein lev:13 gain:5.0 adv:30.5 musc:27.5 myst:27.5 mox:72.5 meat:4356 own:0 value:20478
2: This Charming Flan lev:1 gain:2.0 adv:11.0 musc:11.0 myst:0.0 mox:0.0 meat:3500 own:0 value:17500
3: tasty tart lev:1 gain:1.0 adv:5.5 musc:5.5 myst:5.5 mox:5.5 meat:2695 own:0 value:16555
4: tasty tart lev:1 gain:1.0 adv:5.5 musc:5.5 myst:5.5 mox:5.5 meat:2695 own:0 value:16555
5: tasty tart lev:1 gain:1.0 adv:5.5 musc:5.5 myst:5.5 mox:5.5 meat:2695 own:0 value:16555
6: tasty tart lev:1 gain:1.0 adv:5.5 musc:5.5 myst:5.5 mox:5.5 meat:2695 own:0 value:16555
7: actual tapas lev:11 gain:1.0 adv:4.5 musc:40.0 myst:0.0 mox:0.0 meat:1000 own:3 value:14750
8: actual tapas lev:11 gain:1.0 adv:4.5 musc:40.0 myst:0.0 mox:0.0 meat:1000 own:3 value:14750
9: actual tapas lev:11 gain:1.0 adv:4.5 musc:40.0 myst:0.0 mox:0.0 meat:1000 own:3 value:14750
10: actual tapas lev:11 gain:1.0 adv:4.5 musc:40.0 myst:0.0 mox:0.0 meat:1000 own:3 value:14750
spleen: At 0, consuming to 15 with 992666 meat.
1: agua de vida lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:9275 own:0 value:4243
2: agua de vida lev:4 gain:4.0 adv:7.5 musc:0.0 myst:0.0 mox:0.0 meat:9275 own:0 value:4243
3: prismatic wad lev:7 gain:3.0 adv:6.0 musc:55.0 myst:55.0 mox:55.0 meat:8631 own:0 value:4123
4: prismatic wad lev:7 gain:3.0 adv:6.0 musc:55.0 myst:55.0 mox:55.0 meat:8631 own:0 value:4123
Finished.
Spent 58131 meat with additional expenditures of 1384 meat. Gained Fullness: 15. Inebriety: 19. Spleen: 14.
Adventures: 219. Muscle: 398. Moxie: 263. Mysticality: 367.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

On this topic, could I also ask what is the difference between "spent X meat" and "additional expenditures of X meat"?
 
Last edited:

heeheehee

Developer
Staff member
Looks like "spent X meat" is the price of food / booze / etc, while "additional expenditures" is for helpers like Milk of magnesium.
 

Theraze

Active member
Sorry, I've been in the process of moving across the state. You finally posted why it's skipping the mall though, so I can answer that for ya.
Considering food from inventory Hagnk's NPCs. Per-item budget cap is 25000.0.
You've only told mafia that it's allowed to go from storage and NPCs. You need to tell mafia that the mall (and maybe coinmasters) are okay if you want ED to consider them. :)
 
Top