Sunday, February 28, 2021


I've still been playing a lot of Deep Rock Galactic, and it has me thinking:

There are a lot of B/X hacks out there, and they've been getting increasingly weird.

Maybe there's room in the world for a B/X / ACKS hack that gets back to classic fantasy, but with the twist that the party is mostly dwarves, with The Hobbit and Dwarf Fortress as its primary sources and a dash of Warhammer's dwarves.  At low levels, you dungeoncrawl dwarven ruins to recover famed weapons and build a name for yourself.  In the mid-levels, you travel further afield to older and deeper ruins while you start accumulating a bigger company/tribe/sept.  At high levels, you found or reclaim a fortress and defend it from darkness.  Eventually it falls and everyone dies and then you start over playing as your old characters' cousins and you get to reclaim your fortress.

I think the sort of players who play dwarves all the time are usually fun players, so I think such a hack might attract a fun playerbase.  Dwarf players have an extravagance in their warfare which makes them more like Titans than Olympians; only they are on the right side, though it is not the side that wins.

It also tickles me to consider Human as a race-as-class. 

Classes that could be lifted from ACKS with small changes:

  • Vault dwarves:
    • Vaultguard
    • Delver
  • Hill dwarves:
    • Fury (or comparable "aggressive damage-oriented melee" class)
  • Halfling Burglar

Classes that I would want to create / rework:

  • Elf
    • Get sort of ranger / bard / cleric with it; ranged weapons, divine-ish spellcasting with themes of light, nature, healing, enchantment.  A lot like this but with less/no divination.
    • Cha, Wis, and Dex minimum ability score requirements should mean no more than 1-2 per party
    • There's precedent in Dwarf Fortress even
  • Human
    • Ye Olde Fighting 2 / HD 1 / Thief 1?
    • Horse-Men, Boat-Men, City-Men, and Hill-Men?
    • Maybe with a "Wisdom no higher than 16, because they're a young and foolish race easily corrupted by darkness" restriction?
  • Wizard
    • Maiar-style outsiders, not really mortal
    • Self-reincarnation (takes a month and you lose half of your XP, but you just won't stay dead.  No, wizards are not very filling, I see you dwarves of Clan Donner thinking about it)
    • Int, Wis, and Cha minimum ability score requirements to limit availability even further than Elf
    • What magic do wizards do, really?
      • Gandalf knows things -> Divination, Sensing, Detect, Augury, etc
      • Gandalf knows "people"
        • The eagles
        • Shadowfax
        • Elrond
        • Radagast
        • etc
        • So spells like Fellowship and Calling/Summoning
      • You shall not pass -> Sanctuary, Protection from...  Maybe abjuration more generally.  Dispel Magic, Counterspell, Antimagic Field are probably in scope.
      • That one time he lit pinecones on fire and flooded a river maybe.
      • Basically a lot like this but with less/no healing, more Calling animal friends, and divine-style "you know the whole list" rather than repertoire management.
    • Change up the spell list a little, swapping calling animals for summoning undead or demons and you have a great villain class, since they don't stay dead either.
  • So we have these two caster classes and neither of them have Big Spike Damage to solve encounters.  Maybe that's OK and you have to rely on doughty deeds of arms, or maybe we find a dwarfy way to solve this
      • I don't want to use Craftpriest because it's a priest and in both Tolkien and Dwarf Fortress, the gods are silent.
      • There's a runemaker class in HFH, but I don't really know that I want to deal with ceremonial magic.
      • It would be on-theme for the "big spells that solve encounters" to be in support of your fighters, ie buffs, but I hate the way that buffs usually work where they give small numerical bonuses that you have to remember to add.  Using big "qualitative" buffs would help here.  Ex Haste, Giant Strength, Invulnerability to Normal Weapons, True Strike, Swift Sword, Striking, Flaming Sword.  But these are mostly pretty high-level.  So there's this low-level gap, where we'd need spells that let low-level fighters win small encounters without doing it through small bonuses.  Tricky constraints.
      • Maybe some area-fear effects?
      • Bless tools
      • Making golems with the traditional "runes on the forehead"
      • Definitely do have repertoire management, and then a focus of gameplay is recovering lost runes to add to your spell list. 
      • Probably just Int as prime req
  • Is there room / sense for a second Hill Dwarf class besides Fury?  Something lighter, parallel to Delver, maybe with a focus on ranged combat?  Houndmaster / huntsman / herder / caravaneer / messenger?

To a certain extent, this project is "mining the Heroic Fantasy Handbook for good bits and then simplifying them".

Sunday, February 21, 2021

Conscious Turing Machines

and automatic dungeon design, obviously.

I read this paper yesterday and I haven't been able to stop thinking about it (which is really funny, for a paper modeling short-term memory and attention).  Obviously any paper trying to model consciousness in a computer should be met with some skepticism, but this is Manuel Blum we're talking about, Turing Award recipient (rather like the Nobel Prize in computer science), and his wife and son, who are also heavyweight professors in their own right.

In retrospect maybe it shouldn't be surprising that Manuel would eventually make his way to / back to this problem, seeing as his advisor was Marvin Minsky, who wrote The Society of Mind.

I think they're basically right.  I think this is a pretty decent formal model of the Global Workspace theory of consciousness.

I'm a bit shaken because I've built something at a previous job where the patterns of data-flow between independent sub-parts of a program looked a lot like this - they'd do their own thing until another part discovered something interesting and broadcast it to everyone, and then they'd all update their models.  And it worked pretty darn well.

It sort of feels like the time I read Interaction Ritual Chains and realized I had been doing something significant without realizing it, and not being sure about the philosophical implications.   Or maybe looking behind the curtain and seeing that something I thought was significant can be characterized rather simply.  Little bit of future nausea maybe.

I do think this model isn't complete.  A lot of detail around the language being communicated between parts and how you'd actually build useful sub-parts isn't there yet.  And "the Model-of-the-World Long-Term-Memory maintains a model of the whole CTM itself" is doing a lot of work at making this self-aware rather than just sort of aware, but isn't fully developed here.  Still, how much self-awareness do you need to build a system at an animal level of consciousness?  How self-aware is my cat?

How self aware am I, really?

There's also the question of "Is this actually a useful tool for solving problems, or is it just a curiosity for consciousness researchers?"  It this just a hack for dealing with hardware constraints, and therefore increasingly irrelevant given hardware progress?  If you build a conscious machine, it will do what conscious things do - get distracted.  What you gain in responsiveness to changes in situation, you may well lose in the straightforward grinding on problems that computers excel at.  But it did seem to work well in that previous problem domain that I worked in.

I don't know what's more worrisome - the possibility of computers who get distracted, or the possibility that we will figure out how to build systems which are both conscious and provably correct (for their particular tasks).

So anyway, now I'm looking at all the technical problems I'm interested in and re-evaluating them in terms of this structure.  What would it look like to actually implement something like this?

If you built an idiot-savant mind just to build dungeons, what would its internal language look like?  What would its internal competing parts be?

When you build a dungeon, what does your internal dialogue sound like?  What are the concerns that you're balancing against each other, that put you in conflict with yourself, that make you hem and haw?

Is this dungeon level fully-connected / fully traversible?  If no, conscious dissatisfaction.
Is this dungeon level jayquayed / is its cyclomatic complexity greater than some threshold or lower than some threshold?  If no, weaker conscious dissatisfaction.
Does any single room have too many doors?  Dissatisfaction (maybe?  It could be a fun trick like once.  Maybe this is part of what it means to be self-aware, to choose to break one's own rules from time to time?).
Is a big enough fraction of the dungeon composed of open rooms versus just being a tight mess of hallways and corners?  Dissatisfaction.

So you have this set of Dissatisfiers, each of which is its own Long-Term Memory agent, and then you also have some set of Proposers (again, LTM agents), that generate proposed changes to the dungeon (a hallway proposer, a room proposer, a wall removal proposer, ...).  If a dissatisfaction is currently in short-term memory, they try to propose in response to that, and otherwise they just noodle around and some random Proposer's proposal gets applied?  And then each Dissatisfier updates its "mental model" of the dungeon based on the selected proposal.

To generate a proposal which could resolve a dissatisfaction, does each Proposer need sort of a model of each Dissatisfier?  At least enough to understand what it means when it complains?  Maybe Dissatisfiers should generate their own fix proposals with high priority instead of complaining globally and hoping someone else will fix it?  And then your Proposers are more explicitly for noodling when everything is already OK.  And maybe we run multiple copies of each Dissatisfier and have some nondeterminism in their proposed solution generation, so we get multiple proposed solutions to each problem and we can pick one at weighted-random.

Or maybe your proposers tag their proposals with "in response to dissatisfaction X, we propose Y", and a dissatisfier can accept or reject after forking its model and applying that change to it.  But then you're complicating your language, and you still sort of have the problem that proposers are proposing blind or need some sort of model of how to resolve different kinds of dissatisfactions.

Tabling temporarily the problem of dissatisfaction resolution - Because we have a bunch of different sorts of Dissatisfiers, each with their own model of the dungeon, they can look at the dungeon at different levels of abstraction and apply update proposals to that model in a way appropriate for that level of abstraction.

And then you have a timer / outputter, that eventually goes "OK guys it's been like a thousand cycles, if we're not currently deeply dissatisfied, can we output this to disk, wipe our memories, and start over?"

And maybe an inputter, where a human can go "hey can you drop what you're doing and generate a dungeon level with these thresholds on these dissatisfiers and output it to filename in say a thousand cycles?"  Or "can you generate a dungeon level tuned for these particular types of challenges?"

One thing I'm not clear on yet is how you'd do phases, like "OK this map is fine, time to start generating lairs and treasure."  Maybe you do something similar where you have a set of Stocking Dissatisfiers (in contrast with Mapping Dissatisfiers) and when they haven't seen any map-dissatisfaction in a while they start worrying about the contents of rooms?  Whether lairs are too close together, whether the fraction of rooms with monsters vs empty rooms vs rooms with treasure is right, etc.

...  it's probably telling here that my approach to this is so focused on dissatisfaction.

Monday, February 15, 2021

Reflections on Rimworld and Dwarf Fortress

This is not really a D&D-related post, except inasmuch as a lot of my OSR gaming has been Dwarf Fortress inspired.  It gets vaguely D&D / philosophy-of-games related below the bolded line.

I picked up Rimworld recently and it's almost very good.  My impression is that someone spent a lot of time playing Dwarf Fortress, thinking about all the things wrong with Dwarf Fortress, and how to fix them.  And then they went and did a very competent, moddable implementation job of it.

They're both sort of top-down city management games, where you have a set of characters who have their own likes, dislikes, skills, happiness, and quirks, who you can sort of manage but not really control.  In Dwarf Fortress, you start with 7 dwarves and your fortress can grow up to a couple hundred.  But I've always felt the sweet spot in Dwarf Fortress was closer to 30; with 30 dwarves, you can keep track of everyone's quirks, you have enough people to cover most of the necessary job functions and skills, and it isn't an insane amount to manage.  Rimworld compresses that population range, starting you with 3-5 people and capping out closer to the 30-50 range, right in that sweet spot.  Rimworld also makes this lower population viable by compressing the total number of available skills - in Dwarf Fortress, brewing beer is a separate skill from cooking is a separate skill from butchering animals; in Rimworld those are all just the Cooking skill.  So this means that you need fewer people to cover your needs competently and redundantly.

You also have a lot more control over when and how you get new guys.  In Dwarf Fortress, migrant waves arrive seasonally, and the number of migrants you get depends on your fortress' wealth.  They arrive with random skills and often they aren't what you need.  I have distinct recollections of getting waves of migrants that were like 60% fishermen or cheesemakers.  In Rimworld, you don't have this problem, because you recruit mostly by taking prisoners in combat and then convincing them they your settlement is actually a nice place to live.  If you capture an adversary whose skillset you don't want, you just release them.  Or let them bleed to death in the field.  Or make hats out of their skin to send as gifts to their tribe.  Either or.

(While Dwarf Fortress' developer has always been somewhat uncomfortable with the emergent atrocities committed by the playerbase, like capturing and farming mermaids to butcher because the value of their bodyparts was very high, Rimworld's dev seems to take a different view.  Rimworld makes it straightforward to do cannibalism, organ harvesting, and manufacturing addictive drugs to dump into native markets - but there are almost always consequences.  Most colonists are pretty unhappy about cannibalism and organ harvesting.  Some colonists have tags like Psychopath or Cannibal that let them ignore the happiness penalties from doing these things, but they come with their own penalties; Psychopaths, for example, don't get mood boosts from socializing.  As for drugs, some colonists have a tag that makes them ignore you drug policy and do drugs for fun, even when forbidden, so if selling meth to the natives is your business of choice, that limits your selection of colonists to adopt).

The graphics are an obvious change from Dwarf Fortress and part of the reason that I did not initially recognize it as Fortress-like.  They aren't ASCII.  They're not fancy, still just two dimensions, but they're a little fancier than even the fanciest of Dwarf Fortress tilesets, in part because the engine was built with them in mind.

There is no digging / vertical elevation component to Rimworld's maps.  This is a definite simplification and I'm mostly OK with it; it would be hard to make a simple 2d interface clear with elevation levels (and two dimensions with no z-axis was how older versions of Dwarf Fortress did things anyway).  Not being able to dig defenses is an interesting change and not one that I have really adapted to yet.

The combat system is better than I expected.  There is some weirdness in it (such as bolt-action rifles having only about 1.5x the range of a pistol).  Much of the anatomical detail of Dwarf Fortress combat is still there, but a lot of the jank around inventory management and ammunition is gone.  You also don't draft by squads, which is nice; every colonist is draftable independently, so if you just need one marksman to come deal with a rampaging alpaca you don't need to call up the whole crew.  It also isn't tick-based like Dwarf Fortress', but the slow/normal gameplay speed is quite slow so it's easy to pause, issue an order, unpause, wait for it to be completed, and then pause again before something else goes wrong (there are also some faster gameplay speeds, which are nice when you're waiting for stuff to happen, vs Dwarf Fortress' fixed clock).  The gameplay of moving your shotgunners and melee guys forward from cover to cover while your riflemen pin down enemy ranged units, or of moving your melee to intercept enemy melee while your riflemen try to evade, is quite good.  I do wish you could give your guys secondary weapons though.

The job management UI is excellent and a big part of why I feel like Rimworld's developer must have put some time into Dwarf Fortress.  It's a big grid, with a row per colonist and a column per job type, and you can put priorities in each cell.  It's very similar to Dwarf Therapist, a third-party tool that presents comparable grid-like UIs mapping dwarves to functions, but then edits the memory of running Dwarf Fortress processes to actually apply changes.  Managing large fortresses without Dwarf Therapist is excruciating.  In Rimworld it just comes stock, no memory-editing required.

One unpleasant surprise I had was around deconstructing buildings.  In Dwarf Fortress, when you demolish a workshop, say, you get all of the materials back that you put into building it.  This is not the case in Rimworld.  This is especially bad because there's a big bottleneck in the early-midgame economy around Components, little bits of precision-manufactured metal and circuits.  Many buildings need a couple of Components, and demolishing these buildings does not get you all of the Components back.  I found myself in a Components crunch in year 2 and had to take some risks to get myself out of it.  It was interesting gameplay, but lossy construction and deconstruction is an unforgiving surprise on new players in a game which is otherwise much more approachable than Dwarf Fortress (there's even a tutorial and then an in-game system to continue to show you tips for quite a while after).  Sure, you can savescum (another affordance present in Rimworld and absent in Dwarf Fortress), but did you save at just the right time in your construction effort?

In order to get out of my components crunch, I had to figure out how to use the caravan system.  This is actually rather neat; it lets you send out parties onto the world map, to go to destinations and trade with (or raid) them.  I had a good tailor, so I picked my colonist with the best speaking and shooting skills and sent him across the map to sell hats to the nearest friendly village and buy their components.  He did, in fact, get ambushed en route home, but fortunately was able to fight his way out.  I also set up an orbital trade beacon and was able to buy components from a passing starship.  This beacon cost me components to build, but paid for itself and more.  I like that I had to take some risks / make some calculated gambles here.

So what don't I like about Rimworld?

Rimworld has an AI "storyteller" system as basically part of its difficulty settings.  The storyteller setting (mostly) determines how often threats to your settlement appear.  Two of the three settings alternate between windows when major threats can appear and windows when major threats can't appear.  Under the third setting, all events are on the table at random at all times.

These "threat windows" became apparent to me after some time in game.  There's a graph you can look at of colony wealth that also shows when you were attacked by raiders, and there was a clear pattern, an interval, at which I usually got two raids in fairly close succession.  The only time I didn't get a second raid in that window was when my caravan was ambushed instead.  It wasn't tied to the logic of the game-world; it wasn't about in-game seasons, or having accumulated wealth (though that influences size of raiding parties I think), or having repelled the previous raid with different degrees of success, or having befriended particular tribes.  You can make friends with all the tribes but one, you can kill all their raiders every time, and they're just going to keep raiding you at the same frequency they always did.  It isn't like they figure out "oh this settlement is a hard target, we need to wait a while and gather our forces and then make bigger but less frequent raids rather than squandering our manpower piecemeal".  It just...  doesn't feel right.  It's very obviously artificial.  I found myself anticipating the trouble window and planning around it, and not enjoying it.

I get why it's there; the amount of strain you put on the colony is tightly-controlled and you don't get stacking catastrophes leading to cascading failure as much as you do in Dwarf Fortress.  But that graph annihilated my suspension of disbelief.  So say what you will about Dwarf Fortress' obscurantism, but the fact that there is no graph of when the goblins attacked might actually be a really important feature for sufficiently anal players (who are probably over-represented among players of this genre...).

It leaves me feeling like I can't expect Rimworld to yield reasonable consequences for any of my strategic / macro decisions now.  I was leery about settling near roads because I expected that having a site that is easier to get to would lead to more raids.  But now I'm pretty sure it doesn't (nor more visiting merchants).  I chose to settle near the headwaters of a river instead, because what sort of sensible person, given the choice, wouldn't want to settle near a nice clean water source, for drinking, for cleaning wounds, for irrigating crops, for fishing, for disposing of waste, for carrying bulk cargo downriver in canoes?  And who wouldn't be nervous about settling too near a river, due to possibility of flooding?  But it turns out that rivers don't do any of those things.  Rivers are good for 1) building water wheels for power, 2) slowing down melee enemies trying to cross it, so you can shoot at them more easily, and 3) giving your dudes the Soaking Wet mood penalty.  That's it.  There are mods to make rivers do most of the things that I expected them to do, but none of that is in the base game.  I can forgive when Dwarf Fortress omits things like that, because Dwarf Fortress isn't (and hopefully never will be) finished, and I have faith that the Toady One wants to do those things eventually; he just hasn't gotten to them yet.  But Rimworld is a complete, finished, game, and also not free like Dwarf Fortress.  It makes these obvious omissions less forgivable.

What I want from the "AI storyteller" subsystem isn't a predictable pattern of rising tension interspersed with breaks.  It isn't the total randomness of the third storyteller mode either.  I want it to take the state of the world as input and make sensible things happen.  If I settle up near a bunch of hostile villages, I should get raided more!  If I settle out in bumfuck nowhere, I should get fewer visiting merchants!

My other complaint is likewise around a macro mechanic: difficulty levels.  Besides the three storyteller settings, Rimworld offers a list of difficulty levels to choose from, which influence resource production, injury infection chance, baseline colonist mood, raid size, etc.  I can see why Rimworld has them - the existence of easy difficulty levels makes the game accessible, while hard difficulties exist for the deep fanatics.  But reflecting on Dwarf Fortress, I think I like its approach better.  Dwarf Fortress has no difficulty settings.  Instead it has a wider variety of biomes.  If you want an easy game of Dwarf Fortress to learn how to play, you settle in a mirthful (blessed) temperate forest far from goblin towers.  If you want a stupid-hard Dwarf Fortress game, you settle on a haunted glacier near a necromancer tower with no source of flux for making steel.  So the range of difficulty is there, but it's purely within the game-world; it isn't messing with things like infection chance or goblin raid size.  Or when it does mess with goblin raid size, that's because you settled near a goblin civilization and it's decoupled from everything else.  There's a certain...  reality to Dwarf Fortress.  Dwarf Fortress is opinionated.  It's not afraid to say "these are the rules of the game, the rules of the world; here is the minimum bar for any fortress in any biome."  It doesn't bend to you, and I think that's part of why people admire it (and its developer).  Part of the magic of Dwarf Fortress is that when you conquer Dwarf Fortress, even in an "easy" biome, it feels like an accomplishment, and you're like 80% of the way over the difficulty curve.

Maybe it's weird to say that you "conquer" Dwarf Fortress, since every fortress falls eventually.  There is no win condition.  But you can feel that you have put the fortress into a stable state, one where it can resist, say, any two concurrent shocks (like a goblin siege and a forgotten beast at the same time).  Such a fortress is likely to survive until you get bored.  Rimworld adds a win condition.  I haven't gotten there yet, but I'm not sure how I feel about its existence.  Dwarf Fortress was kind of a stoic exercise, or a zen garden; you spend all this time and care building this fortress and minding the troubles of all these little people in it with the full knowledge that it will eventually burn down.  And at a certain point in your life as a player of Dwarf Fortress, the burning down becomes the most interesting part.  That's where the surprise is; you have dealt with all the typical threats and then some combination of circumstances sneaks up on you and you go "Oh!  It's time!  I didn't expect it to happen like this!  Neat!  Let's watch it all unravel."  Having a win condition...  I don't know, it sort of feels like it changes the meaning of the game.  The Rimworld is something to be escaped, something to achieve a lasting victory over, rather than just something to be survived for a while.

Maybe that's suitable, really, for a science fiction game; the theme that things could be otherwise, that they could improve, as opposed to the fantasy of return to myth, of recurrence, the perpetual turning of the wheel of Armok.  I haven't actually played Dwarf Fortress in a long time; every now and then I open it, generate a world, pick an embark site, and then get to gear and skill selection for my dwarves and go "no, no I don't think I want to deal with this again today.  I stand reminded."  It is very much a cycle.

I suppose in ultimate judgement, it might be fair to say that Rimworld is probably a better game than Dwarf Fortress, but a worse simulation.  It thinks about things like narrative structure, rather than trying to simulate a fantasy world (in excruciating detail) and letting interesting stories emerge from the randomness.  It is certainly more accessible, more humane, more marketable, with finer attention to the core gameplay loop, but...  there's a certain elemental quality, a primal sincerity that Dwarf Fortress has that I think Rimworld lacks.  Dwarf Fortress strikes me as the better device for building character in its players, while Rimworld's focus on creating tuned challenges is more gamist, more like my thoughts on creating dungeons intentionally to be challenging, rather than to make sense in the world.  But if I have difficulty respecting it because it is too transparent about that game, maybe challenge dungeons are similarly misguided.

...  apparently it was Valentine's Day today.  Ha!

Monday, February 1, 2021

Probabilistic Mercenary Advancement

I like the idea of mercenaries going from 0th to 1st level through extended campaigning, but I don't like needing to have a spreadsheet of every mercenary unit's XP.  It occurred to me last night that maybe a low-fidelity approach would work.  At the end of a session where a mercenary unit earned XP from an adventure or campaign, compare that XP to the XP needed to level (for a 6-man squad of baseline 0th level infantrymen, a total of 600XP under ACKS).  If the XP earned is greater than the total required, great, the unit levels.  If not, convert it into a fraction of the XP required to level, then turn that into a probability and then into a die roll.  So if the unit earned 300 XP, that's a 50% chance to become veterans, or 4+ on a d6.  If the roll is failed, the XP is lost.

This works out about the same in expectation, but with a long tail; some units will level sooner, some later, some will get very unlucky and take forever to level.  But that is rare.  It does have the nice property that all units of the same type that got the same share during a single adventure will have the same probability of leveling, so you can just roll a big handful of d6s and count your successes.

You could probably also do something with casualties from veteran units giving a chance of loss of veteran status, as new recruits replace the old skilled ones, although as Von Schell notes in Battle Leadership, even a few veterans mixed into a green unit help a great deal in bringing it back up to veteran status.  So maybe taking a bunch of casualties and replacing them makes a veteran unit fight as a regular unit for one adventure or so, rather than risking permanent reversion.  Maybe if there are a bunch of casualties during that second adventure too, then it becomes a risk (but here we are again back at adding book-keeping, state, and memory across adventures).

Another potentially entertaining and even more ill-advised extension would be to have henchmen or even PCs level probabilistically, with the same procedure of "compare earned XP from this adventure to XP to next level, convert to fraction, convert that to a probability, and roll".  But PCs already have a bunch of state associated with them, so tracking one more (XP) is not a great burden.  It could be pretty funny for henchmen to level nondeterministically though; it would make "henchmen of equal or greater level than master" a more common occurrence.