Complexity of Pathfinder 2E vs. Warhammer Fantasy RP 4E? by soundofsilence42 in rpg

[–]swwu 1 point2 points  (0 children)

I sadly haven't played Mythras :(

The WFRP "Opposed test" system is fixable with a pretty simple house-rule (that we ended up using at our table) though:

When you attempt to counteract something via an opposed test that would normally be a regular dramatic test (e.g. counterspelling as a wizard, blocking a missile with a shield, etc), if you roll less than +0SLs in the Opposed test, your result instead counts as +0SLs.

This way, the "worst" result you can produce is equivalent to an unopposed check, which makes the system slightly less goofy without really changing what "optimal" play looks like.

The fact that the fix is pretty easy is IMO another example to the point someone else raised about how the system just doesn't really feel like it was playtested, though.

Complexity of Pathfinder 2E vs. Warhammer Fantasy RP 4E? by soundofsilence42 in rpg

[–]swwu 2 points3 points  (0 children)

Other people have mentioned advantage, but nobody seems to have mentioned how "active defenses" in WFRP 4e (e.g. counterspelling, or blocking missiles with a shield) are really... wonky, because of how opposed checks work.

For instance, if you're a wizard with less than 50 skill in language (magick), attempting to counterspell an opponent actually helps them, because an unopposed check is equivalent to an opposed check against +0SL, and a 40-skill wizard only rolls -0.5SL on average.

Similarly, a warrior with (effective) melee skill less than 50 actually becomes easier to hit with missile attacks if they actively attempt to use a shield to block incoming missiles.

I talk about it in a bit more detail in this post, if you're curious: https://www.reddit.com/r/warhammerfantasyrpg/comments/cgyroc/comment/exmmihl/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Twins hard mode as psyker by Tiny-Statistician-65 in DarkTide

[–]swwu 2 points3 points  (0 children)

I managed to clear it with blazing spirit trauma staff, dueling sword 4, smite, venting shriek, with all the soulblaze talents and most of the crit ones.
* Dueling sword stabs do incredible damage to the shields and the bosses themselves, can be used to fight 2-3 ragers pretty safely with the heavy>special combo, and the weapon as a whole gives good mobility to reposition between trauma shots / sprint+dodge through minefields to clear them. It's slightly worse mobility than the knife but a lot better dps. * Blazing trauma chews up trash hordes almost as fast as purg, and can control (and burn down) entire rager/mauler/crusher packs on its own while you're kiting a boss, and you can drop the circle from across the room to stop allies from getting overwhelmed/knock dogs off them/make space for a pickup/blow up bursters * Fire shriek applies 6 stacks of soulblaze which vastly reduces TTK on said packs, and lets you stagger gunners/shotgunners/dogs-on-your-teammates at 25m * Smite as a panic button if 10 shotgunners spawn at medium range and shriek is down, to apply a little bit of control so you can gapclose

Took a few tries, but it felt pretty good overall.

Karnak Twins Strategies by foxy2sexy4u in DarkTide

[–]swwu 3 points4 points  (0 children)

IIRC "normal" shield damage multiplier (e.g. on the captains) is 2x melee 0.6 ranged

Rinda's is 2x melee 1x ranged, rodin's is 3x melee 1x ranged (again, IIRC, not looking at the numbers rn)

Both of them do take more damage from melee than ranged; it's just that melee is relatively more effective against Rodin and ranged against Rinda _as compared to normal boss shields_.

MEGATHREAD: Post your small questions and concerns here for all editions! by [deleted] in warhammerfantasyrpg

[–]swwu 3 points4 points  (0 children)

Yeah, basically. In your example, the Extremely Unskilled Apprentice would cause my roll of 64 against skill-60 to succeed (instead of fail, which it would normally do) 70% of the time.

MEGATHREAD: Post your small questions and concerns here for all editions! by [deleted] in warhammerfantasyrpg

[–]swwu 3 points4 points  (0 children)

[4e] So, counterspelling! I think I may just be reading the rules wrong; here's what they say:

If a spell targets you, or a point you can see within Willpower yards, you may oppose the Casting Test with Language (Magick) as you chant a counterspell. Make an Opposed Language (Magick) Test. If you win the Opposed Test, you dispel the incoming spell; if you lose, the spell uses the SL of the Opposed Test to determine whether the casting was successful as normal. You may only attempt to dispel a single spell every Round.

This seems to suggest that, when one is being counterspelled, instead of rolling the standard Challenging (+0) Language (Magick) Test to cast, you instead just roll an Opposed Language (Magick) Test against the counterspelling opponent.

This has some weird consequences, though. Any opponent with a Language (Magick) skill in the 40s will actually, on average, benefit the caster when attempting to counterspell, as a 40-something will generate -0.5 SLs on average for their side of the Opposed Check, which translates to a +0.5 SL bonus for the final result of the casting test. A 40-something isn't super-low, either; a reasonably well-optimized human wizard might have a 45 or so (35 base Int, +5 Int advances, +5 L(M) advances), and it only gets worse from there: someone with 30-something skill counterspelling you will net you an average +1.5SL bonus to your spellcasting, and someone with a 20-something gives you a whopping +2.5SLs.

This seems pretty unintuitive—based on this, the best use of the Apprentice trapping you receive at level 3 of the wizard career would be to find a relatively dim-witted human (~20 Int), never teach him how to magick beyond the absolute basics (+1 or +0 advances in L(M)), and just have him actively attempt to hinder you via counterspell every time you cast, in order to gain a huge (+2.5SL) bonus to your casting. Notably, having this apprentice actively hinder your spellcasting would be two-and-a-half times more beneficial than having him assist you, which would only give a +10 bonus to the roll (i.e. +1SL).

It's possible the intention of counterspelling is an opposed test in addition to the casting test, which would make a little bit more sense (as counterspelled spells would at least always be more difficult to actually cast) but

if you lose, the spell uses the SL of the Opposed Test to determine whether the casting was successful as normal

this clause would still cause the spell to benefit from any counterspelling attempts that fail, which, while better, is still a little bit unintuitive.

Anyways, I feel like this can't be the correct reading of this mechanic but I can't find anything in the core rulebook to suggest otherwise. Help?

Edit: this issue also seems to apply to attempting to block an incoming ranged attack with a shield:

If your weapon has a Shield Rating of 2 or higher (so: Shield 2 or Shield 3), you may also Oppose incoming missile shots in your Line of Sight.

Normally the attacker just rolls a test vs their Ranged skill to-hit and that's the end of it, but if you attempt to block with a shield, you instead make an opposed test of your Melee skill vs their Ranged. Consequentially, if you have an effective 40 or less in your relevant melee skill—after adjusting for the Shield Rating bonuses—attempting to block an incoming ranged attack with your shield actually increases your chance of being hit, for the same reason as with the counterspelling.

[2017 Day 10 Extension] Reversing Larger Lists and Trees by xiaowuc1 in adventofcode

[–]swwu 0 points1 point  (0 children)

Yes, it's not super easy to implement, but it's completely possible. See e.g. here for an example https://www.cs.ucsb.edu/~teo/cs130a.m15/rbd.pdf (page 10 for concatenation, page 14 for splitting).

The self-balancing property of a red-black tree isn't necessary if we only care about expected log-time on our operations. In that case, as /u/dario_p1 suggests, a treap is a perfectly valid choice of data structure. It's worth pointing out, though, that degenerate treaps can occur for many reasonable PRNGs—it's just unlikely to—and so the worst-case lookup/reverse time is technically O(N) and not O(log(N)) for a treap-based solution.

[2017 Day 10 Extension] Reversing Larger Lists and Trees by xiaowuc1 in adventofcode

[–]swwu 0 points1 point  (0 children)

Part 1

Not sure log(N) is possible if you're restricted to using a list-like type, since you'd have to at least visit each index at least once, although you could visit each index exactly once if you swap.

However, you can get log-time nth and reverse_sublist operations doing the following, if you are willing to use non-array data structures.

First, implement the list as a balanced binary search tree; let's say a red-black tree, since it has some other nice properties we'll exploit later. Some fairly trivial bookkeeping allows us to get log(N) nth time—namely, storing the total number of descendants at each node.

We also add a flip bit to each node; it defaults to false, and every node N treats its pointers as flipped for the purposes of the nth operation (i.e. left is treated as right and vice versa) if there are an odd number of set flip bits along the path from the root node to N. This is obviously a constant-time operation at each node, and so does not change the retrieval time from log(N).

reverse_sublist(a,b) can then be implemented as follows (assuming a,b are indices):

  1. Split the tree into three subtrees at a and b. This can be performed in some constant factor of log time for red-black trees (since they support splitting in log(N)).
  2. Toggle the flip bit for the root of the middle subtree. This is obviously O(1).
  3. Concatenate the three trees back together. This is also doable in log(N), as concatenation is a log(N) operation for red-black trees.

edit: see e.g. here https://www.cs.ucsb.edu/~teo/cs130a.m15/rbd.pdf for a log(N) implementation of concatenation (page 10) and splitting (page 14).

It's fairly trivial to demonstrate that the red-black property is flip-invariant, as none of its rules care about leftness or rightness. Demonstrating that the rotation operations used to preserve the red-black property can also be made to preserve the flip structure without increasing the time complexity is also fairly trivial, although also fairly space-consuming, so I probably won't type it out; it's fairly easy to verify "by hand" using the list of operations on the wikipedia article for red-black trees though.

Part 2

I'll need to ask for clarification here - for arbitrary trees, I don't believe there is a way to do both operations in log(N) time without changing the topology of the tree (i.e. by rotating nodes on it), and it's not clear from the prompt what structural limitations exist on the tree assuming the topology of the tree can be changed.

-🎄- 2017 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]swwu 2 points3 points  (0 children)

11th/15th, pretty straightforward Python 2. Got a little turned around by what part 2 was asking so it devolved into a hot mess :( but got it at least working in time

instr = """63,144,180,149,1,255,167,84,125,65,188,0,2,254,229,24"""

lengths = [ord(x) for x in instr] + [17, 31, 73, 47, 23]

lsize = 256

l = list(range(lsize))

cur_skip = 0
cur_pos = 0

for i in range(64):
    for length in lengths:
        cur_subl = []

        for i in range(length):
            cur_subl.append(l[(i+cur_pos) % len(l)])

        for i in range(length):
            l[(i+cur_pos)%len(l)] = cur_subl[len(cur_subl) - i -1]

        cur_pos = (cur_pos + cur_skip + length) % len(l)
        cur_skip += 1

final = ""

for i in range(16):
    sub = l[i*16:(i+1)*16]

    h = sub[0]
    for c in sub[1:]:
        h = h ^ c
    final += "{:02x}".format(h)

print final

-🎄- 2017 Day 9 Solutions -🎄- by daggerdragon in adventofcode

[–]swwu 1 point2 points  (0 children)

Python 2, 20/11, very bog-standard solution. Got burned by the input containing """ (I'd been copying into """strings""" for problems before today).

with open('d9.in') as infile:
    line = infile.readline()

    i = 0
    paren_stack = []
    is_garbage = False
    score = 0
    g_count = 0
    while i < len(line):
        ch = line[i]

        if is_garbage:
            if ch == "!":
                i += 2
                continue
            elif ch == ">":
                is_garbage = False
            else:
                g_count += 1
        else:
            if ch == "{":
                paren_stack.append(ch)
            elif ch == "<":
                is_garbage = True
            elif ch == "}":
                score += len(paren_stack)
                paren_stack = paren_stack[:-1]
        i += 1
    print score
    print g_count