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

Theraze

Active member
Yeah... mulligan stew is even moreso than blankets, since it's 17 avg adventures for 2 fullness, currently priced at 21.5k. But hey, comparison. Let's be lazy and use the spectral pickle, my usual Monday aftercore food. Easier than trying to work out the lasagna swing. Spectral is 23 avg adventures for 4 fullness, currently at 4.4k each.

At 2k VoA, your stew is worth (34000-21500)/2=6.25k per fullness. The pickle is worth (46000-4400)/4=10.4k per fullness.
At 3k VoA, the stew is worth (51000-21500)/2=14.75k per fullness. The pickle is worth (69000-4400)/4=16.15k per fullness.
At 4k VoA, the stew is worth (68000-21500)/2=23.25k per fullness. The pickle is worth (92000-4400)/4=21.9k per fullness.

As you can see, at current pricing levels, the stew would need quite a high VoA to actually win over the pickle. But with a high enough VoA, anything is possible...
 

Lxndr

Member
This happens almost every time I run EatDrink in the past few days:

Code:
Getting 6 Bee's Knees in 3 seconds
Countdown:     3 seconds...
Countdown: 2 seconds...
Countdown: 1 second...
Waiting     completed.
autoBuyPriceLimit => 1000.0
You need     6 more Bee's Knees to continue.
autoBuyPriceLimit => 20000
EatDrink     encountered an error: You don't have 6 Bee's Knees and you're not able to     shop.
Something went wrong with getting Bee's Knees     for 500. Recalculating.
Pass 2: booze.
booze:     At 1, consuming to 14 with 77070 meat.
Getting 3     Sockdollager in 3 seconds
Countdown: 3 seconds...
Countdown:     2 seconds...
Countdown: 1 second...
Waiting completed.
autoBuyPriceLimit     => 1000.0
You need 3 more Sockdollager to continue.
autoBuyPriceLimit     => 20000
EatDrink encountered an error: You don't have 3     Sockdollager and you're not able to shop.
Something     went wrong with getting Sockdollager for 500. Recalculating.

Why is it going after SIX Bee's Knees? You can only buy 3 from the speakeasy....?
 

Theraze

Active member
The fact that it's even trying to get ANYthing from the speakeasy is pretty nifty, since I've never touched code regarding them.

If you have some suggested ideas on how to detect which drinks are speakeasy and how many more we can get... without any additional server hits... I'll implement it.
 

Bale

Minion
EatDrink just spend 10 Chroner for two racks of dinosaur ribs. Huh?! What settings do I need so that it won't do that again.
 

Zen00

Member
EatDrink just spend 10 Chroner for two racks of dinosaur ribs. Huh?! What settings do I need so that it won't do that again.

Would turning off auto-satisfy with coin masters do the trick?

I would like to say that EatDrink needs a rationality test for the Stomach/Liver/Spleen limits. I accidently inputed 151 instead of 15 for the stomach limit and it goes and buys 22 Fleetwood Mac 'n' Cheese. You know, just say anything over the value of fullness_limit() should require secondary verification.
 

Theraze

Active member
You'd need to make a mafia feature request to not consider untradable items as free during retrieve_item calls. We already consider non-tradable or quest tokens as special prices for EatDrink, but since we allow mafia to retrieve items, as we've been repeatedly told that's the safest way to handle acquisition, mafia is allowed to pick from any of the available ways...

Even though you can buy the ribs from the mall for just under 8k, mafia decided that the untradable Chroner was a cheaper option, and used it. Nothing ED can do to avoid it. Though you could manually put each of the Chroner-ed items into the permanent avoid category.
 

Bale

Minion
Thank you for explaining. After thinking that over for a bit it makes sense for EatDrink to do that. If the mall cost of coinmaster items is the cheapest alternative then the equivalent meat value of the coins is probably less than my previous preconception.
 

Theraze

Active member
Certain Chroner items sell better than others, but it gets tricky [for mafia] when you have non-tradable coinmaster tokens. Which to prefer, meat or the token?

Depends on the person, I'd imagine. Without some method of individually valuating your tokens, what we have is probably the best we can have. And if mafia allows individually valuating non-tradable tokens... that's a horrendous rabbit-trail of doom and maintenance.
 

fxer

Member
Think the latest Mafia broke spleen use in EatDrink, you just get the error "<spleen item> must be chewed." now
 

Veracity

Developer
Staff member
Yeah. I may undo that part of the submit.

The alternative is to add a chew() function to ASH - to correspond with the eat() and drink() functions - for use with spleen toxins. That's probably a reasonable idea, anyway, since "spleen items are now a thing", but requiring it breaks old scripts.

Which I am willing to do.

Decisions, decisions. :)
 

edgy

Member
If you're getting the "<spleen item> must be chewed." error, change the statement starting line 2235 from:
Code:
if ((type == "spleen") || (type == "choc"))
   use(1, con.it);
to:
Code:
if (type == "spleen")
   chew(1, con.it);
if (type == "choc")
   use(1, con.it);
 

Xenthes

Member
Got the new update for eadrink. Verified the new lines of code were there. For some reason ED is completely skipping spleen since it thinks the best available is twinkly wads.

Code:
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.2).
Consuming up to 0 food, 0 booze, and 15 spleen
Considering food from inventory Hagnk's Coinmasters NPCs the mall. 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 50 meat. Moxie subpoint is 0.0. Nonprime stat subpoint is 0.0.
spleen: At 0, consuming to 15 with 5000 meat.
Best find was twinkly wad with a value of -130. That's no good, so not consuming and moving on.
Best find was twinkly wad with a value of -130. That's no good, so not consuming and moving on.
choc: Checking non-filling crimbo chocolates - all 3 kinds
Best find was chocolate seal-clubbing club with a value of -2750. That's no good, so not consuming and moving on.
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 0 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0.
Adventures: 0. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
 

Theraze

Active member
Because you gave adventures a value of 50 meat, which is... Yeah. You're not going to fund any sort of spleen on 50 meat.
 

Xenthes

Member
Weird. I don't remember ever changing that from anything but 2000. Did the set valueOfAdventure = 2000 and it is doing what I wanted. Shrug. Thank you for pointing that out to me.

*goes back to his corner and puts on the dunce cap.*
 
So I was comparing the advice from EatDrink and http://www.houeland.com/kol/diets. I was surprised to see that they differ. This led to an investigation where I found out more about this script and the variables going into it. I found a setting that gives advice (at least today with today's prices) that beats houeland by a little bit. However, I noticed something strange.

With zlib.ash eatdrink_budget = 20000; set autoBuyPriceLimit = 20000, I get the following output:
Code:
Starting EatDrink.ash (version 3.2).
Consuming up to 15 food, 0 booze, and 0 spleen
Considering food from inventory closet Hagnk's Coinmasters NPCs the mall. 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 3000 meat. Muscle subpoint is 0.0. Nonprime stat subpoint is 0.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15 with 450052 meat.
0: milk of magnesium price: 625 value: 44375
0: potion of the field gar price: 7992 value: 67008
1: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:4599 own:0 value:17500
2: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:4599 own:0 value:17500
3: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:4599 own:0 value:17500
4: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:4599 own:0 value:17500
5: long pork lasagna lev:10 gain:3.0 adv:19.0 musc:0.0 myst:50.5 mox:0.0 meat:4599 own:0 value:17500
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: choco-Crimbot lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:7000 own:0 value:8000
2: chocolate turtle totem lev:0 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:3498 own:0 value:2502
Best find was chocolate turtle totem with a value of -498. That's no good, so not consuming and moving on.
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 18396 meat with additional expenditures of 8617 meat. Gained Fullness: 15. Inebriety: 0. Spleen: 0.
Adventures: 117. Muscle: 0. Moxie: 0. Mysticality: 250.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
If I am understanding the value calculation correctly, the value of this is 117*3000 - 18396 - 8617, which ends up being 323,987.

Now if I set zlib.ash eatdrink_budget = 200000; set autoBuyPriceLimit = 200000, I get the following:
Code:
Starting EatDrink.ash (version 3.2).
Consuming up to 15 food, 0 booze, and 0 spleen
Considering food from inventory closet Hagnk's Coinmasters NPCs the mall. Per-item budget cap is 250000.0.
Retrieval cap is 200000. Price will be a factor if you own it already.
An adventure has the value of 3000 meat. Muscle subpoint is 0.0. Nonprime stat subpoint is 0.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15 with 450052 meat.
0: milk of magnesium price: 625 value: 44375
1: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
2: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
3: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
4: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
5: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
6: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
7: tin cup of mulligan stew lev:15 gain:2.0 adv:17.0 musc:534.0 myst:534.0 mox:534.0 meat:21500 own:0 value:18488
8: snow crab lev:1 gain:1.0 adv:6.0 musc:15.0 myst:15.0 mox:15.0 meat:3395 own:9 value:14815
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: choco-Crimbot lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:7000 own:0 value:8000
2: chocolate turtle totem lev:0 gain:1.0 adv:2.0 musc:0.0 myst:0.0 mox:0.0 meat:3498 own:0 value:2502
Best find was chocolate turtle totem with a value of -498. That's no good, so not consuming and moving on.
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 150500 meat with additional expenditures of 625 meat. Gained Fullness: 15. Inebriety: 0. Spleen: 0.
Adventures: 147. Muscle: 3753. Moxie: 3753. Mysticality: 3753.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
Again, if I am understanding the value calculation correctly (and this is the value I would personally place on this outcome), it ends up being 147*3000 - 150500 - 625 = 289,875.

I gave EatDrink.ash more freedom with the price of individual items and it generated a worse outcome! This *seems* to be due to it miscalculating the value of Garish/lasagna.



Also, just out of curiosity, how does this handle extra-greasy slider and salad forks? I've seen houeland recommend them multiple times, along with large amounts of spleen items due to the clearing of spleen, but the order that this script does things in (strict eat->drink->spleen) does not seem amenable to taking advantage of the extra spleen.
 

Crowther

Active member
I agree that seems odd. I might look into it more, but I want to point out that EatDrink optimizes marginal value, not total value. So your formula is not correct and that might explain what you've seen. Optimizing total value is a much harder problem and I know no tool that does this. That is why you can find people on this thread suggesting you set your adventure value a bit lower than your expected MPA if you want to maximize your profit.
 
I did notice that it was marginal value, though since the first case was homogenous consumption and the second nearly homogenous, I would expect the marginal value to be the total value over the fullness (or nearly so in the second case.) If Garish and lasagna were considered as a single unit for marginal valuation, I would expect it to win vs tin cup of mulligan. NB that I have basically no idea how EatDrink.ash implements most of this, having not studied the code in much depth, so my assumptions may well be way off base.

Regarding maximizing marginal value vs maximizing total value, wouldn't A* over 3 dimensions work? My guess (from houeland suggesting extra-greasy sliders) is that houeland is doing something along those lines, though I guess it could be using good heuristics to generate a set of potentials and comparing the options. (I also may be underestimating the growth of the search space, or missing some subtlety that invalidates A*'s guarantees.)
 
Top