The Foraging (Ex-)Bandit [Ruleset & Reflections]

post by abstractapplic · 2024-11-14T20:16:21.535Z · LW · GW · 3 comments

Contents

  Ruleset
    Horse Hills
    Rat Ruins
    Goat Grove
    Rooster Peaks
    Tiger Forest
    Dog Valley
    Everywhere Else
  Reflections
None
3 comments

This is a postmortem for a (tiny, ~10min, browser) game I released earlier this week [LW · GW]. At the time, I thought posting the generation rules for each location would be redundant and spoilery (especially since you could just look at the code on github), and that writing a Reflections section would be premature and presumptuous. My opinions and the circumstances have both now changed; hence, this post.

Ruleset

Horse Hills

Foraging in Horse Hills gives you a 75% chance of 1d4 food and a 25% chance of 23 + 2d6 + 1d4 food.

A chronologically-and-behaviour-invariant Expected Value of 10 food per forage makes this the default foraging location barring any other opportunities. A forager who spent the entire game here could reasonably expect to conclude with >3500 food stored; consider this a benchmark.

Rat Ruins

Rat Ruins was avoided by your fellow bandits because they feared a curse; fortunately for you, they were wrong. Rat Ruins starts by providing a large and consistent 20+1d4 food per forage, but since nothing grows there the expected forage amount decreases with each hour; after twelve forages, it’s no longer better than Horse Hills.

Goat Grove

Goat Grove is in the process of a slow-rolling ecological disaster. It starts by 10 + 1d4 + 1d6 food per forage (for an Expected Value of 15 food per forage), but begins linearly declining on day 7; by day 13, it’s no longer better than Horse Hills.

Rooster Peaks

Rooster Peaks spends most of the game with a suboptimal 1d6+1d4 yield. However, after Day 43, the roosters come home to roost, changing the algorithm to “9+2d4, unless this 1d6 rolls a 1, in which case 0” for an EV of 11.66.

Tiger Forest

The most edible things in Tiger Forest burn bright enough to see only in the darkness of the night; while it’s suboptimal for most of the day, it beats HH/GG/RP on hours 22 and 23 of each day.

Dog Valley

Conversely, Dog Valley’s resources are most easily foraged in bright sunlight, which is only available in the valley’s base at midday; it beats HH/GG/RP on hours 12 and 13.

Everywhere Else

The other six locations are varying levels of suboptimal. They also have no chronological or behavioural effects. Of special note is Dragon Lake, which always produces 0 food because Dragons aren’t real.

Reflections

This microproject was originally slated to be something much grander (a milliproject at the very least, possibly even a centiproject). I had visions of an endless chain of increasingly hostile and complex roguelike-random contexts through which the protagonist could be chased[1], balancing exploration against exploitation and risk against reward until they were finally inevitably caught (at which point the player could try again with a new seed) . . .

. . . and then I built a prototype, and gave it a test-drive, and noticed the central conceit just wasn’t strong enough to support the rest[2]. So, I posted what I had and called it done. Hopefully it provides value as a novelty, and as a vague gesture in the direction of the kind of rationalish inferencey interactive thing I’d like there to be more of.

In retrospect, I think this endeavour was doomed from the start. It involved working with tables of numbers, without requiring or developing relevant skillsets: this gave it a comically small target audience even relative to my other work (sincere thanks to noggin-scratcher, Yonge, and Martin Randall for constituting this audience, and for their thoughtful comments). Next time I set up a VOI/experimentation problem, I think I’ll either 

Feedback is, as always, greatly appreciated.

  1. ^

    . . . which would, for those keeping score, have made this a multi-armed non-stationary bandit problem.

  2. ^

    If you disagree on this point, I enthusiastically encourage you to prove me wrong; all relevant work is public domain, and I’d be more than happy to help by playing playtester.

3 comments

Comments sorted by top scores.

comment by DaemonicSigil · 2024-11-15T08:05:35.453Z · LW(p) · GW(p)

Thanks for making the game! I also played it, just didn't leave a comment on the original post. Scored 2751. I played each location for an entire day after building an initial food stockpile, and so figured out the timing of Tiger Forest and Dog Valley. But I also did some fairly dumb stuff, like assuming a time dependence for other biomes. And I underestimated Horse Hills, since when I foraged it for a full day, I got unlucky and only rolled a single large number. For what it's worth, I find these applet things more accessible than a full-on D&D.Sci (though those are also great), which I often end up not playing because it feels too much like work. With applets you can play on medium-low effort (which I did) and make lots of mistakes (which I did) and learn Valuable Lessons about How Not To Science (which one might hope I did).

comment by JBlack · 2024-11-15T00:58:33.530Z · LW(p) · GW(p)

Thanks for making this!

I found it a challenge to deduce strategies over many plays, rather than following the advice "not intended to be replayed". The first playthrough was pretty much meaningless for me, especially given the knowledge that both time and history could affect the results. I just viewed it as one step of information gathering for the real game.

The suboptimal zones weren't obviously suboptimal from a single pass, even Dragon Lake that always yields nothing. For all I knew, it could have yielded 5000 food with quite a low probability (and still be always optimal), or lesser amounts of food at specific combinations of time and day, or only when matching some rule based on the previous results of foraging in other zones.

After many runs I did settle on a strategy, and mentally scored myself by looking at the source to see whether there was anything that I should have spotted but didn't. As it happened, my final strategy was almost optimal though I stayed on the rats for a few more hours than ideal.

comment by Yonge · 2024-11-16T22:39:52.688Z · LW(p) · GW(p)

I was expecting earlier choices of foraging location to have a much stronger impact, and mistook some of the randomness for affects of earlier choices. In retrospect it would have been better to spend longer exploreing various possibilites rather than settling on an exploit strategy so soon. Adding an explicit target was a big improvement as it gave some idea of "how good a strategy" we should be searching for.