Speeding up the Rummikub algorithm – explanation required

Regarding this question: Rummikub algorithm.

I was reading the first part of the solution in the posted answer (specifically, when there are no jokers involved, all tiles are distinct and only four colours are involved). Then, I reached the part in which the says that the algorithm runs in $ O(ABCD(A+B+C+D))$ time, which is easy to determine why.

However, he the goes on to saying that we can speed up the algorithm so as to run in $ O(ABCD)$ time by changing "the recurrence to ensure this occurs only once while maintaining correctness, which leads to $ O(1)$ time for every ‘cell’ in the DP-table".

My problem is: I do not see how this can be done. I have tried playing around a bit with the recurrence, but I do not see how it can be modified, or what else we should keep track of so that we can speed up the time.

Is there an official explanation for the fluff of why magical healing is less effective on creatures with lots of hit points?

I’m most familiar with D&D 3.5e and 5e, which both have pretty similar ways of describing hit points. The 3.5e SRD says

Hit points mean two things in the game world: the ability to take physical punishment and keep going, and the ability to turn a serious blow into a less serious one.

5e’s Player’s Handbook has a couple bits about hit points, but the most descriptive part is on page 196.

Hit points represent a combination of physical and mental durability, the will to live, and luck.

Hit points are a reasonable abstraction by themselves, since in both the editions I know about, they effectively convey the fact that a tougher or more experienced character is better-able to survive dangerous scenarios. They also allow a novice and an epic hero to spend similar amounts of time recuperating after an adventure (since natural healing scales with the number of Hit Dice a creature has), which makes sense, given what hit points are stated to represent.

However, magical healing (be it via potions or a divine caster’s spells) scales with the caster’s abilities and not with the target’s hit points. This means that, in both editions, an average peasant or a 1st-level fighter who drinks a healing potion will instantly heal from all their injuries and be brought back to full fighting strength. However, an epic dragon-slaying adventurer (or, in a more extreme case, an actual dragon, with its mountains of hit points) would drink the same potion, and only a very small percentage of their vitality would be restored.

What’s with the difference? I know that mechanically it serves as a sink for high-level parties’ gold and spell slots to force players to use stronger magical healing, but narratively, I haven’t been able to find any information on why everybody’s natural healing happens at similar rates, but the efficacy of magical healing is inversely proportional to a target’s natural fortitude and adventuring experience. Did 1st and 2nd editions handle healing differently, or is there something specific about healing potions and magic that causes them to behave this way, or is there simply no explanation given, with the assumption being that "it’s just a mechanical thing, don’t think about it too hard"?

Is there a plausible explanation for a large number of armed adventurers in a fantasy RPG setting?

I’m working on a Dungeons & Dragons setting. I’m looking for a comprehensive and logical explanation why, in a feudal society similar to Western Europe in the Middle Ages, there might be bands of armed adventurers (both male and female) wandering the country, slaying monsters, and frequenting taverns.

Does it follow that if you introduce magic and monsters guarding dungeons filled with treasure into a historical medieval setting, you’ll see an adventuring class emerge? Have there been any real world analogues to an “adventuring class” (obviously without the monsters and magic)?

What is a believable in-game explanation of GUMSHOE’s spending point system?

I am studying the GUMSHOE system as it is implemented in Trail of Cthulhu and, while I can grasp the logic behind its mechanics, I have a hard time of translating the rules of allocating points to skills and expending them into a believable in-game analogy, in order to minimize their meta-gaming aspect.

As far as the d100 (BRP) system is concerned, a 40% chance of succeeding in e.g. Archaeology could be translated as the chance of the player possessing a relevant knowledge. There is a believable in-game analogy: the higher the percentage, the higher your expertise and the better the chances of recalling/knowing things related to your skill. And this analogy can be consistently used in every situation.

In GUMSHOE’s terms, when a player is an expert in Archaeology, they automatically succeed in finding a relevant clue if they associate their investigative skill with the required action. In this case, there is also a believable in-game explanation; the investigators are experts, they are supposed to spot relevant clues. The immersion does not break.

But when it comes to the spending point system, they only in-game analogy I can find is that expending a point from an investigative skill could mean that players put an extra effort in order to spot additional clues, like using your Archaeology skill to estimate the origin of an ancient statue and spending one point in order to associate it with a specific famous ancient figure. But in that case, from an in-game perspective, having no other points to spend means that for some unexplainable reason you are no longer able to make extra efforts of extracting further clues when using your investigative skill.

Another approach could be that these points represent the "stamina" of your character, so expending them would mean that they become more and more "fatiqued", either mentally or physically, and thus no longer able to perform harder tasks unless they replenish them. Which is also highly unconvincing.

Since I am mainly interested in Trail of Cthulhu, I thought of providing a more mystical interpretation, like that these points represent the will of the players to overcome the obstacles lied to them by unknown forces. So unknowingly to them, there is an subconscious, telepathic "battle of wits" taking place and the more they spend their points the lesser their will power becomes. Which is also something that the characters are not supposed to be aware of; thus we still have to resort to meta-gaming.

Perhaps I am overthinking this and I can just appreciate the novelty that the GUMSHOE system brings to the investigation-driven rpgs without trying to shoehorn every rule into an in-game perspective. But even if I ignore the meta-gaming aspect, the whole point system seems very unconnected to any physical or mental characteristic of the characters, albeit undeniably effective in building tension and giving the feeling that the stakes are being steadily raised.

To summarize; what would be a plausible in-game representation of the spending point system, at least as far as the investigative skills are concerned?

What is the in-universe explanation for why succubi, who were demons, became “neutral evil fiends” in 5e?

The Forgotten Realms wiki page on succubi tell us (specifically in footnote 1) that in 1e, 2e and 3.Xe1, succubi were chaotic evil demons, but then were retconned to be lawful evil2 devils in 4e and have now just been made into generic neutral evil "fiends" in 5e, presumably in an attempt to avoid contradicting any previous editions’ lore.

Does 5e give any sort of in-universe lore explanation as to why they are now neither devil nor demon? The 5e Monster Manual entry doesn’t really explain that besides briefly mentioning that they "can be found in service to devils, demons, night hags, rakshasas and yugoloths", again presumably to avoid contradicting any previous editions’ lore, but without explaining why this is now the case.

This is the second part, which was split out from another question; see: What is the in-universe explanation for why succubi, who were demons, became devils?


1 Actually, the footnote on the Forgotten Realms wiki page only says 3e, but I know it was still true in 3.5e because of Neverwinter Nights 2, which was a video game based on 3.5e. In this game they were considered demons, which is incidentally my introduction to D&D and why I consider succubi being demons to be what they "should" be.

2 I say "lawful evil", because that’s what a devil’s alignment is, but I’m aware that 4e changed the alignment system, so it might not be so accurate to claim they were "lawful evil" in 4e, but at the very least, in the context of D&D overall, they would have been considered lawful evil all the time they were considered to be devils.

What is the in-universe explanation for why succubi, who were demons, became devils, then became “neutral evil fiends”?

The Forgotten Realms wiki page on succubi tell us (specifically in footnote 1) that in 1e, 2e and 3.Xe1, succubi were chaotic evil demons, but then were retconned to be lawful evil2 devils in 4e and have now just been made into generic neutral evil "fiends" in 5e, presumably in an attempt to avoid contradicting any previous editions’ lore.

Unlike with the Shadar-kai, I believe there was supposed to be some kind of canonical in-universe lore reason as to why these demons became devils. What was that reason? I assume it appears in some 4e material somewhere? I’m only really familiar with 5e material…

Furthermore, does 5e give any sort of in-universe lore explanation as to why they are now neither devil nor demon? The 5e Monster Manual entry doesn’t really explain that besides briefly mentioning that they "can be found in service to devils, demons, night hags, rakshasas and yugoloths", again presumably to avoid contradicting any previous editions’ lore, but without explaining why this is now the case.


1 Actually, the footnote on the Forgotten Realms wiki page only says 3e, but I know it was still true in 3.5e because of Neverwinter Nights 2, which was a video game based on 3.5e. In this game they were considered demons, which is incidentally my introduction to D&D and why I consider succubi being demons to be what they "should" be.

2 I say "lawful evil", because that’s what a devil’s alignment is, but I’m aware that 4e changed the alignment system, so it might not be so accurate to claim they were "lawful evil" in 4e, but at the very least, in the context of D&D overall, they would have been considered lawful evil all the time they were considered to be devils.

Is there a lore explanation why each setting might have different deities?

As far as I know, the multiverse of D&D 5E consists in different worlds all residing in the Material Plane, but the rest of the planes (Transitive Planes, Inner Planes, Outer Planes…) are shared between them.

Is there a lore explanation why each setting might have different deities? Since deities exist in planes other than the Material Plane, shouldn’t those deities be the same in every setting?

OpenSSH v2 Protocol Explanation

I’ve been searching high and low, trying to find a easily digestible protocol flow of SSH v2.

Does anyone have any docs or, could someone give me an example flow?

I’m interested in the flow of the public key exchange, things like:

  • does the server sign with the host private key, so the client can verify it’s not being spoofed by some MITM with a good server public key?

  • does the protocol use Ephemeral:Ephemeral ECDH by default? i.e. are session keys the product of ephemeral ECDH or ECDH with host/client authentication keys?

Minimum Cost Tree From Leaf Values solution explanation needed

I’m trying to understand the solution for the question posted here: https://leetcode.com/problems/minimum-cost-tree-from-leaf-values/

One of the solutions is to find the minimum leaf node, add the product with its smaller neighbor and remove it from the array and continue the same way until array size is one.

here is the link for the solution: https://leetcode.com/problems/minimum-cost-tree-from-leaf-values/discuss/339959/One-Pass-O(N)-Time-and-Space

What is the result binary tree? why is it working..

Thanks

Is there an explanation for what all of the DLCs add in with the Talisman Digital Edition? [closed]

In short I bought the Talisman Digital Edition earlier in the week (oddly reminisced about the game that I hadn’t played for 30 years in the morning bought it and the starter pack in the evening). Have now bought the Season Pass because of a spot Steam Sale.

I added all the DLC in but found myself a bit lost in terms of what was doing what (e.g. the Dragons and Dark amd Light Fate tokens totally threw me).

Have started another game just adding in the base game, Sacred Pool, Frostmarch, City, Dungeon and Reaper expansions & it seems a balanced kind of game.

Is there a preferred amount of DLC to add in (or a preferred set of what to add?) and is there any explanation for what they add to the game (e.g. the Dragon tokens have totally thrown me)?

Thanks in advance for any advice or suggestions.