You are Oeis the Wise, professional Oracle. Your uncanny ability to predict how lists of whole numbers will continue – and only how lists of whole numbers will continue – creates infrequent but intense demand for your counsel: you usually leave your mountain home about once a month, whenever circumstances place a local noble or merchant lord in need of your services.
Today’s customer is Morgan, a monk. (Morgan has no money, but his temple has frequently provided you with food and shelter while travelling to more lucrative clients, so you’re fine doing this one for free.)
Morgan explains that he uses transcendental meditation to link himself to the substructure of the universe, observing the pulse and flicker of those lights which cast all we know as shadows. In his notes, he records flows of mana as they rise and ebb, forming the rhythms that undergird reality.
You tell him that sounds cool and you hope it works out for him.
However, Morgan continues, a recent supernova of unusual intensity has disrupted the leylines of the world, creating the possibility of flux in realms which have previously known only stasis. In ten days – day 384 in his record – he will have a once-in-several-lifetimes chance to not merely channel these flows, but change them: he plans to invoke two mana types simultaneously, wielding them in a ritual that subtly but profoundly reshapes the world for the better. If he is to do this, he must begin the endeavour now; to determine which sources of power he should prepare to conjure on that fateful day, he zealously entreats your assistance.
You tell him that sounds cool and you hope it works out for him. (Living alone on a mountain has not done wonders for your conversational repertoire.)
Morgan concludes by saying that his priorities for day 384 are as follows:
- Firstly, the strongest of the two mana types he channels cannot be Void, Doom, or Spite. These may be used if you are certain they will be the weaker of the pair, but if they dominate, darkness will possess him and he will transform into an immortal demon, wreaking horror and bloodshed upon the world he sought to improve.
- Secondly, the ritual must work. For this to occur, the two mana types together must have a combined power of at least 70.
- Finally, as a strictly tertiary objective, increasing the total amount of mana channelled would allow him to increase the amount of good done; however, this is much less important than guaranteeing the ritual works at all.
From the dedication in his eyes, you perceive Morgan will not be persuaded from this path: all you can do is ensure he walks it as best he can. You are Oeis the Wise, and you have a title to uphold. What, in your
Oeisdom Wisdom, will you advise him to do?
I’ll be posting an interactive letting you test your decision, along with an explanation of how I generated the dataset, sometime
next Friday on Monday the 23rd. I’m giving you a week, but the task shouldn’t take more than a few hours; use Excel, R, Python, Shivers, Inland Empire, Espirit de Corps, or whatever other tools you think are appropriate. Let me know in the comments if you have any questions about the scenario.
If you want to investigate collaboratively and/or call your decisions in advance, feel free to do so in the comments; however, please use spoiler tags or rot13 when sharing inferences/strategies/decisions, so people intending to fly solo can look for clarifications without being spoiled.
My current plan and a few intermediate discoveries:
Observations and results so far:
Ignoring any time dependence, solar+lunar and solar+earth are the most successfuly combinations; they would have succeeded on 246 and 235 respectively of the existing 374 datapoints.
Note, in my remarks on individual mana types I may include information on other mana types.
Solar seems to have a 27 day cycle with 3 peaks within it (so 9 day cycle?) but which peaks are stronger has been changing over time. The current cycle, cycle 14, has been weird with days 15-20 of the cycle (days 366-371) being higher than expected. The last 3 days (372-374) are low, but not far from expected. Other slightly weird cycles include cycle 8 (slightly higher than expected values from days 12-14 of the cycle, i.e. days 201-203) and cycle 10 (slightly higher than expected values from days 20 to 25 of the cycle, i.e. days 263-267). I'm counting "day 1" of a cycle to be the one that's a multiple of 27 from the day 1 of the overall data.
If solar is back to its normal pattern, on day 384 it should be on the way down from a high peak and approaching a high trough, so still doing pretty well (>40 expected), making solar a good candidate for one of the mana choices.
Lunar, like solar, shows a 27 day cycle (shouldn't it be 28 days?) with 3 peaks changing which is stronger over time; outliers include days 26 of cycle 8 to day 1 of cycle 9 (days 215-217) which are unexpectedly weak. Like solar, lunar should be declining to a high trough on day 384, I expect >35. Assuming solar is back to normal, solar + lunar should succeed.
Ocean varies greatly from single digits to over 60. While some possible patterns appear (e.g. some short range autocorrelation, and a degree of autocorrelation at a 4-day displacement almost as high as at 1-day displacement) it does not seem to have a fixed period of variation. The possible high values make this a potentially interesting choice if it can be predicted, but more analysis needed to determine what ocean will be at at day 384.
Breeeze looks fairly random, distribution peaks at 13 and varies from 6 to 20.
Like Ocean, has short-range autocorrelation but no single period. Varies from 11 to 41.
Like Ocean and Flame, has short range autocorrelation but does not seem to have a single period. Varies from 2 to 10, so of scientific interest only.
Looks random except for some possible 1-displacement autocorrelation. Varies from 9 to 74, so definitely of interest if a pattern can be found.
Looks fairly random, varies between 17 and 31. This is the same size of range as for Breeze, but has a fatter and asymmetrical distribution.
8 days sawtooth pattern with some possible random variation (peak on day 2, bottom on day 3, then steady rise). Notable outliers from expected pattern: Day 9 of cycle 1 (i.e., day 9), day 5 of cycle 22 (i.e. day 181), day 3 of cycle 11 (i.e. day 91), and day 1 of cycle 31 (i.e. day 249).
On day 384, it will be day 8 of the cycle, and something in the range of 27-33 is likely. Not as good as solar and lunar, even discounting the risk of a miscalculation with one of the dangerous mana types.
28-day periodicity with lots of peaks and troughs within the period; the troughs are often (but not always) 0. A reliable spike on day 5 gives the period away. Seems to also prefer specific values instead of a smooth distribution. Day 384 will be day 20 of the period, and a low value can be expected (7 or 0).
So far Solar+Lunar seems the best choice.
This is also the choice that looked best before getting time dependence information for Solar, Lunar, Doom and Spite, so further research on the time dependence of other mana types (especially Ocean or Earth which can have high values) might find an alternative, better answer.
Edit after reading aphyer's solution:
Aphyr found that Earth and Ocean are anticorrelated and their sum has a smooth 22-day pattern. As Aphyr reports, day 384 should be close to the peak. Expected value 75-80 or so. This looks like a good, safe solution.
I actually expect Solar+Lunar to be slightly higher, since the peaks and troughs have been shifting in height/depth over time, and while they will be near a trough at day 384, the trough is one that has been shifting upward. I expect ~43- 45 from Solar and ~36-40 from Lunar on day 384. However, this is less certain than the Earth+Ocean expectation and as Aphyr notes Solar has been weird lately. Solar+Lunar is definitely the riskier pick and probably is objectively not what one should pick based on the available info, so I'd switch to Aphyr's solution in real life but I'll stick with Solar+Lunar as what I want to get credit for (for now) since I have an excuse that it might be better and it's what my analysis was on.
Not had time for this recently (fortunately extra weekend though) but after checking gjm, Jemist's and GuySrinivasan's comments:
Whoops so much for Lunar.
Only a little further remarks as time running out:
The following predicts solar with +-1 accuracy:
28 day cycle: 32,32,32,27,27,27,27,27,27,32,32,32,34,34,35,36,37,40,41,42,42,41,40,37,36,35,34,34
9 day cycle: 9,10,10,10,9,3,0,0,3
anomalies: +8 days 61 and 62, +12 dats 201-204, +9 days 263-268, +24 days 366-371
predicted result for day 384 is 45+-1, unless there's an anomaly.
Doom's 8 day cycle is 30,32,18,20,22,24,26,28 plus 0-5 with anomalies on days 34, 91, 181, 249. Unlike solar there are both positive and negative anomalies. Expected result (no anomaly) is 28-33 on day 384.
Solar+doom should give (with no anomaly) 72-81, does not look as good as Earth+Ocean's 74-80 (from GuySrinivasan) though obviously Doom is better than Lunar's known value of 16 at day 384.
With respect to Earth and Ocean, both include many values larger than the minimum of the sum of the two, and Ocean has a sharp minimum value at 4, while Earth's minimum value is not so sharp with 9 being the smallest but more of the bottom edge of the Earth-Ocean x-y plot being at 11 or so. This probably says something about how they are made but I have not thought of it. So far, nothing better than Earth+Ocean found.
also (whoops, this postdated the eval, and was apparently spurious to boot):
Obviously, the best candidates for beating earth+ocean are solar+ocean or solar+earth (whichever we can find out will be bigger).
Spite correlates a bit with Ocean and anticorrelates a bit with Earth. Not a super large effect but relating ocean/earth (which we need to predict) to Spite (which we know deterministically) is very interesting)
What I'd get from Aphyr is that
What's important for every pair is:
What will element A do, what will element B do, and
What will they do together? (That said, I haven't done a lot of poking around for correlations and just found S+L like you. I'm mostly waiting for -
This next part is a double spoiler, so don't open it if you haven't gone through the prior D&D Sci stuff.
- a 'surprise! one of the ones that was low had a specific pattern which allows for a super combination!', though that's mostly because of how some of the stuff in the submarine one turned out.
NOTE: Because reasons, I've decided to release the evaluator and answer key next Monday instead of this Friday. I'd apologize for the inconvenience but I'm pretty sure nobody minds.
Sweet, I didn't get much of a chance last weekend. :)
Solar and Lunar both have a ~27 day high-low cycle (in phase with each other). There is an anomaly in the Solar data staring around 7 days ago (the supernova probably) that briefly caused Solar to spike (replacing the scheduled low point in the cycle). Lunar was unaffected by the anomaly, and the next peak for both should line up with the ritual day. Using [Solar + Lunar] for the ritual should yield 97-102 total power (assuming the supernova hasn't messed anything up).
Ocean and Earth are strongly anti-correlated, and the graph of [Ocean + Earth] shows a strong repeating 22-day cycle with the next high peak occurring on day 385, just one day after the ritual. Using [Ocean + Earth] should yield 75-80 total power.
Breeze is weak and useless.
Flame and Ash are strongly correlated with Flame being significantly stronger. Both show some short-term self-correlation, but not enough to predict 10 days out.
Void and Doom have similar distributions (Doom has a bit more variance) with moderate power, but not really useful even without the risk.
Spite is just weird with lots of zero values and a very unusual distribution covering only a few specific values. Again not useful even without the risk.
Based on my analysis, either [Solar + Lunar] or [Ocean + Earth] is a valid approach. Neither has any risk of getting a demon, and both have strong patterns that show an upcoming high peak around ritual day. I'm slightly more confident of the [Ocean + Earth] pattern continuing since the Supernova might possibly have disrupted the [Solar + Lunar] cycle somehow, but [Solar + Lunar] has generally much higher power, so that's my recommendation.
I observe that
solar seems to be (period 28) + (period 9) + (shortish upward transients) + (very small noise), and the periodic parts are predicted to be at 45 on day 384.
That's a good start. What about the others? Well,
lunar appears to be 75-solar, shifted by 14 days. On day 384 we expect it to be experiencing the reverse of solar's most recent upward transient; it will not be a good candidate for Morgan's purposes.
ocean, breeze, flame, ash and earth all look rather unpredictable, except that ash is basically a scaled copy of the previous day's flame; none of them will be predictably at 25ish or more on day 384. I would be extremely unsurprised to find that some of these are more predictable than I think (e.g., breeze has a suspicious number of peaks at the same height and 6 or 7 days apart; maybe this is real, and maybe it's caused by something I could exploit with more work or ingenuity) but for now I'm leaving them alone. (Flame/ash also seems like it's not just uncorrelated random noise, but it might e.g. be low-pass-filtered noise.) Earth seems to have a pretty good chance of being big enough on any given day, but something more predictable would be better.
What about the bad ones?
Spite is perfectly predictable, being a sum of periodic spikes with periods 4, 5, 7, and 14; on dat 384 it will be zero. Void seems rather unpredictable, though its overall level isn't far off what we need -- but if we have to rely on luck we have better chances with earth than with void.
doom has a strong periodic component of period 8 (and, alas, occasional single-day transients); its periodic component will be 30 on day 384. Unless we get unlucky with a sizeable negative transient, it seems like solar+doom is a likely winner.
Would this lead to danger of apocalypse?
It doesn't look like it. Solar is almost always bigger than doom; the largest doom-solar has ever been is 13, when our periodic estimates would have predicted an excess of 9; we are predicting solar=45 and doom=30 so we have plenty of slack to spare.
I don't see any obvious sign of
an abrupt change in the data that might correspond to the supernova.
Things I've been looking for:
Strong periodic components (either sinusoidal with any period, as found e.g. by FFT or periodogram calculations, or with integer period and arbitrary shape). Close correspondences between different kinds of mana, but I haven't looked for fancy things as opposed to the simple solar/lunar and flame/ash relationships. Short-term autocorrelation within a single type of mana. Long-term trends (no sign of any of these).
One notable thing I haven't bothered looking for:
Matches between either the raw data or the locations of peaks or troughs or anomalies, and things in the OEIS. (Despite our character's name.) That sort of thing would be amusing but feels like it would be a cheat even if it were there. Also, most OEIS sequences don't look much like random-ish noise.
So my advice to Morgan at present would be
to go for solar + doom
almost certainly yield a total a little over 70, and almost certainly not cause a catastrophe; I think unexpectedly good outcomes are a bit more likely than unexpectedly bad ones.
Having read other answers, I add
that aphyer's suggestion looks strictly better than mine; annoyingly, I had noticed that there was some weak evidence of period-22 components in both earth and ocean but never bothered looking at their sum; in hindsight, eyeballing the plots of [EDITED to add for clarity: the sums of] all pairs of mana types with any chance of reaching 70 should have been a super-obvious thing to do, but I am a moron and didn't do that.
Are any of the other monks doing anything like this?
How much good will it do, channeling good, if another monk is 'possessed by darkness and transformed into an immortal demon, wreaking horror and bloodshed upon the world' and interrupts him amidst channeling? (Probably by killing him.)
Is the temple close? Even if it is far away, might any of the channeling help banish or counter such demons?
(What happens if someone channels two of Doom/Void/Spite? If bad, might there be an evil order of monks that might do such a thing?)
Also one might wish to condition advice on data from those 10 (or 9) intermediate days, like 'Doom is fine unless it starts coming back up to X, then it's too risky'. (Not based on Doom, don't use as advice.)
First condition can be met by...not channeling Void, Doom, or Spite at all.
Second, over the past 10 days, Solar and Lunar look like together they meet the second condition.
I haven't balanced the third condition - I don't have a model yet.
Eyeballing it, Earth got high once. Higher than 70, on day 253. (Solar also happened to be somewhat high on that day as well. Not sure how likely, or if it's worth it - do we have any idea what this utility function looks like?
Solar + Lunar seems 70-80, versus this moonshot at 116.
aphyer seems to have it figured out.
1. How big a deal is "an immortal demon, wreaking horror and bloodshed upon the world"?*
2. Can the ritual in someway counteract that? Any specific bonuses, or things that are stronger against demons, or more helpful in a world where one is running loose?
3. How would multiple rituals (separately interact)?
4. An ideas at all around probability of other people doing a ritual like this one? Across the entire world?*
This particular factor suggests...that there is a calculation that could be performed, taking into account the possibility of someone else turning into a demon, in order to guess if it would be beneficial to intentional channel one of Void, Doom, or Spite, so that any advantage a intentionally evil ritual would have, you would also have (if they happened at the same time).
That's unlikely to be the result of such a calculation (especially because, say, if they all happened at the same time, then...if things go south, that is more demons...depending on the procedures involved).
*As the saying goes, expected value is probability times magnitude.
Morgan seems to think that ensuring this doesn't happen should be your top priority, but he's biased for obvious reasons. If you feel increasing the probability and/or magnitude of success is worth risking the worst outcome, that's a valid decision.
Possible but unlikely.
I would use
Solar and Lunar Mana, which I think has about 66% chance of working. The only mana type that can be predicted 10 days in advance (beyond the prediction of a random sample from the previous data) is Doom. And that still doesn't work out with as high probability. (Doom mana will be on a high at the time, but using it with solar gives a 69% chance of reaching 70 and an 11% chance of demons. So a 58% chance of doing good.) If the utility is 0 for any amount of mana <70, and the amount of mana if its >=70, then solar + earth does slightly better in expected utility. 54.6 vs the 54.2 for solar+lunar. It has slightly lower success probability 63%, but slightly more mana if it does succeed.
Do we know when exactly the supernova occurred? Is the whole dataset post-supernova, or did it happen partway through the dataset?
The supernova Morgan mentioned happened partway through the span of time covered by the dataset; however, due to complexities and delays in the relationship between the event and its impact on mana flows, he doesn't know where or whether its effects would show up in his records.
Solar - Appears to operate on approximately a 27 day cycle which suggests it's value should be around 50 on day 384. However this has risen to anomalously high values recently (The supernova being a star may be the cause), so there is a risk it may not behave as predicted in the immediate future.
Lunar - Seems to go through a pattern of relative highs and lows that repeat every 27-28 days, probably not coincentally the same as the orbital period of the moon. On day 356-357 lunar was at a relatively high value of 46 - 39, so this looks like a good prospect.
Ocean - Can be very strong, but also very weak at times with no obvious pattern.
Breeze - Has never been more than 20 or less than 6. This is unlikely to be good enough.
Flame - Can be anywhere between 11 and 41 with no obvious pattern
Ash - Is consistently <= 10 , so should probably be avoided
Earth - Another one that can easily be very high or low with no obvious pattern.
Void - Highly erratic osscillations between 17 and 30,
Doom - The qualitative pattern seems to repeat itself once every 8 days, suggesting it's value on day 384
will be about 30.
Spite - Is 0 about half the time. It takes on a high value regularly once every 28 days though. The last time
this happened was on day 369 which is no good for us. On other days it is either 0 or a relatively low
value, so this is one to avoid.
Looking at the ones that seem reasonably predictable Solar + Lunar should yield over 90 so this should be a good prospect, providing the supernova doesn't unexpectedly disrupt things.
Lunar + Doom is another possibility, however unless the supernove disrupts things it has a lower expected value.
On balance I think Solar + Lunar looks like the best bet.
Here are my findings and plans, before looking at any comments:
Therefore Doom + Solar is my strategy
Looks like I was slightly wrong about Solar
Seems like it's on two 28 + 9 day cycles, or similar, but sometimes spikes 10-20 points for no apparent reason. Solar will be 44-ish barring any spikes which isn't enough for solar + doom to do the job reliably.
Given this, Solar + Earth probably has a good chance, as does Solar + Ocean, both of which I think will be better than Earth + Ocean
UPDATE: I had my Doom plot wrong, Solar + Doom is still a good strategy, but Earth + Ocean is probably better
Further info: Flame is a biased random walk, each day it changes by a value greater than Floor(Flame/4) + 1, but I can't see a further pattern to what is chosen. The residual looks a bit like an exponential distribution but the fit is terrible.
There's no easy pattern to much of the rest of the randomness, I'm gonna guess it's all some bamboozling combination of random integer generation
Starting my thread. Haven't gotten much chance to dig in yet; hopefully will before the week is out.
Spite is 100% deterministic. Add these four components to get its value on any day. No supernova effects. Will be 0 on T=384.
spite1 = cycle([0,7,0,0,0])
spite2 = cycle([0,0,6,0,0,0,0,0,0,0,0,0,0,0])
spite3 = cycle([13,0,0,0])
spite4 = cycle([0,0,0,0,18,0,0])
Solar and Lunar are highly related. Solar is always more than Lunar. Solar - Luna has a strong 9-day cycle; subtracting out its mean leaves a fairly strong pattern of outliers where Solar is even stronger, predicting that Solar will be "even stronger" on T=384. Needs more scrutiny.
Lunar[t] = 75 - Solar[t-14]
Ash[t] = floor(Flame[t-1]/4)
Ocean+Earth equals [56,57,58,59,60,61,62,63,64,65,66,65,64,63,62,61,60,59,58,57,56,55] repeating starting with day 1, plus up to 6 (so 7 possible values total) on any given day; guessing the residuals are a predictable cycle but haven't looked yet. Edit: untrue, different base pattern. Edit2: Fixed base is [56,58,61,64,65,65,66,69,72,74,75,74,72,69,66,65,65,64,61,58,56,55]
Doom takes on one of 6 values in a predictable length-8 pattern except for 4 deviants.
Fixed the Ocean+Earth base pattern above. Also, Earth is nearly 4 higher than Ocean on average; I suspect that Ocean+Earth follows that base pattern and then Earth gets +0-6 in some way I haven't divined. I have not found any predictors of how much of the total goes to Ocean vs Earth on any given day; I suspect there may be a cycle of some sort which is significantly faster than Morgan's measurement period, which makes the shares appear uniform random.
Correlations near 0.42 suggest Lunar and Flame may be random walks? Highly speculative.
Perhaps important: Morgan can act on data collected during the next 9 days! If the ritual setup has the potential for Evil Demonhood, and more data will determine whether it will go awry, then he can just cancel and not do the ritual. This is worth doing only if we think that there is an enormously great result available with high probability but with Evil Demonhood as a small chance, discernable later, and if the next best alternative is something like a 50/50 of fine result and ritual fizzling.
How about actual values on T=384?
Breeze, Ash, Flame, Spite, Void: smol
Solar: ?? plz find
Ocean: uniformish random but with some min/max cutoffs up to 74
Earth: uniformish random but with some min/max cutoffs up to 74, plus 0 to 6, O+E=74
Doom: almost certainly 28-33, probably 30, but with black swans
Also! Solar's initial pattern, presumably before the supernova, looks similar to Ocean+Earth's, but on a different scale, 14 rather than 22 days it looks like? Or maybe 13?? And Solar-Lunar has a 9-period, but we know Lunar is Solar shifted 14, so what does that even mean.
Solar looks like the important thing to figure out, here. Our realistic options are:
- Choose Ocean and Earth. No demon, guaranteed ritual, strength 74-80, most likely 77.
- Choose Solar plus Doom. If we can confidently predict Solar as large, with Doom contributing 30ish, Solar would be 50+ (because otherwise why not stick with O+E, so Doom's black swans won't exceed Solar unless they're like really black. No demon, extremely likely ritual, strength ?? how big will Solar be.
So Solar starts with a 28-day cycle that looks vaguely like Ocean+Earth's shape. But it starts getting little distortions, and then some really big ones around day 120-220. Then it's fairly tame (looks like original!) except for a big spike around day 265, and a really big spike around day 367 which has just died down. Seems like the thing to do is try to model the "regular" variation, subtract it out, and analyze the remains. I will try averaging the normalish looking cycles.
Natural cycle peaks appear to be on days [20, 48, 76, 104, 132, 160, 188, 216, 244, 272, 300, 328, 356, 384]; T=384 is a natural solar peak. Normalish-between-peaks subtracted out... leaves, ah ha, a very clear 9-day cyclic thing. To investigate later, but that's why the Solar-Lunar looked 9-dayish.
I've got a very nice, but not 100% precise, fit to Solar with a 28-day sine plus a 9-day sine. Barring its 4 jumps of course. I don't see any particular reason to guess it will be away-from-normal on T=384, and the 28+9 predicts Solar=44 then, with a +-5 (closer to +-4 or 3).
So we have a choice between:
- Ocean+Earth: 74-80, probably 77, guaranteed no demon
- Solar+Doom: [39,49]+[28,33] + maybe Solar spike + maybe Doom spike + maaaaybe Doom dip is probably 74, tiny chance of a demon, small chance of ritual failure, small chance of big success
The conservative choice is to just go with Ocean+Earth. But there is another option, of hoping for a Solar spike. These have been increasing in magnitude and the last one provided 20-25 extra mana. If Morgan can prepare the ritual and continue to monitor flows, he could check for whether Solar is significantly above baseline (we'd give him the decision procedure) and then either go ahead with the ritual or cancel.
I think there is a low chance of a spike, without further insights. Lower than 10%. Higher than 1, even 2%. So roughly 4+%, with a tiny helping of Doom spike, call it 5%. And even if there's a spike, maybe it's only 10-15 or 20-25 rather than something larger. Let's say 0.75% chance of a large spike, 1.5% chance of a 20-25 spike, and 2.5% chance of a 10-15 spike.
My answer to Morgan is that he can have a guaranteed 74-80 mana, or a chance of 84-95, or a chance of 94-105, or a chance of (making this up) 104-130. I will ask at what chance he would rather each of the other alternatives, then convert that to elicited preference, multiply, add, compare, and give him either the Ocean+Earth combo or the Solar+Doom combo+procedure. If he "chooses" Solar+Doom and then balks at the procedure, I will relent and give him Ocean+Earth.