August 11, 2023

Physics Sage Abilities: LLM Edition

The other day, Alexis mentioned he was testing out ChatGPT to suggest sage abilities. I thought it might be interesting to apply this to my investigation of a Physics sage ability and see what came up.

To set the proper context, I pasted a good bit of text from the Authentic Gaming wiki so the model would know what sage abilities and knowledge points were in the context of this specific fantasy role-playing game. Physics has a description already, so I continued with that:

Physics is a sage study in the field of Reality by which the character learns the physical laws associated with the movement of bodies and objects, vibration, sound, optics and light, fire and heat, the movement of water, air and earth, flight, pressure, electricity, magnetism and many similar branches and topics that give the character insight into the way that energy (including magic) ebbs and flows through the environment. This knowledge provides opportunity for the character to understand and ultimately control, to some degree, these forces.

Suggest a list of 3 amateur abilities for Physics

And here we go:

Certainly, here are three amateur sage abilities for the Physics study within the Reality field, representing a basic level of understanding and manipulation of physical laws:

Elemental Insight: The character gains a fundamental understanding of the elemental forces—earth, air, fire, and water. They can identify the presence and effects of these elements in the environment, such as detecting slight vibrations in the ground, predicting changes in weather patterns, or recognizing the potential for combustion in certain materials.

Basic Optics: The character learns to manipulate light and understand its behavior. They can create simple illusions, manipulate shadows, and refract light to obscure or reveal objects. Additionally, they can evaluate and enhance the reflective and refractive properties of surfaces to create basic optical effects.

Kinetic Control: This ability allows the character to manipulate basic kinetic energy. They can exert force on objects to move them from a distance, give a boost of speed to projectiles, or dampen the energy of a moving object to reduce its impact. This manipulation is limited to small-scale effects and relatively simple movements.

These amateur abilities provide characters with a foundational understanding of the physical world and limited control over its basic forces. As characters progress and gain more knowledge points, they can unlock more advanced and intricate abilities related to the Physics study.

Not bad at all. So far, it tracks reasonably with my own Amateur level. Kinetic Control seems a bit more advanced, though.

Repeating this process for Authority:

Energetic Resonance: The character can tap into the underlying energetic patterns of objects and elements. By understanding their resonant frequencies, they can induce vibrations, causing objects to shatter, create harmonic tones, or even manipulate the structural integrity of materials through controlled resonance.

Thermodynamic Manipulation: This ability grants the character control over temperature and heat distribution. They can create localized zones of extreme cold or heat, extract heat from one area to warm another, or generate intense thermal energy bursts. Their mastery over thermodynamics allows them to shape temperature-based phenomena in their surroundings.

Field Mastery - Electromagnetism: The character gains a deep comprehension of electromagnetic fields. They can generate and manipulate electromagnetic forces, creating barriers that repel or attract metallic objects, distorting light paths, and even generating bursts of energy akin to electrical or magnetic pulses.

I would rename the last one to simply "Electromagnetism."

For Expert:

Spatial Distortion: The character has reached an advanced level of understanding of space-time manipulation. They can create localized distortions in space, altering distances, warping trajectories, and even generating temporary pockets of altered reality that affect the behavior of objects and energy within their vicinity.

Waveform Mastery: This ability grants the character control over various types of waves, including sound waves, light waves, and more. They can manipulate sound to create illusions, control the intensity and frequency of light to blind or illuminate, and generate complex patterns of waves to manipulate and interfere with energy flows.

Chronokinetic Command: The character gains mastery over the manipulation of time on a small scale. They can momentarily accelerate or slow down the passage of time for objects or themselves, allowing them to react faster, age or heal slightly faster, and exert a degree of control over the temporal aspects of their surroundings.

These are certainly reasonable. Waveform Mastery might overlap with Electromagnetism, so more specific rules might be useful to distinguish these, perhaps in terms of their actual in-game effects.

And finally, the Sage:

Dimensional Weaving: The sage's understanding of physics transcends conventional boundaries. They can manipulate the fabric of space-time to create temporary rifts between dimensions, allowing them to manipulate energy, matter, and even consciousness in ways that defy conventional physical laws.

Unified Energy Manipulation: This ability enables the sage to perceive and manipulate the underlying universal energy that connects all things. They can harness this energy to achieve remarkable feats, such as transmuting matter, temporarily altering the laws of physics in localized areas, or even tapping into cosmic forces to generate cataclysmic effects.

Quantum Entanglement: The sage can exploit the phenomenon of quantum entanglement to instantaneously affect distant objects or energies. They can manipulate the entangled states of particles to transmit information, energy, or even physical effects across space and time without conventional limitations.

I think this has a great deal of potential. There's certainly editing to be done here, and actual concrete examples assigned. For example, we might say that Chronokinetics can allow the character to double their AP for one turn per day or allow 20% more healing overnight. So it's not as if we can just copy/paste a study, but a significant portion of the initial thinking can be offloaded to these models.

July 6, 2023

Trade VIII: Pricing Abilities

DM's Escritoire says:

Been a while, but Alexis' recent post generated an interesting comment from you regarding using his Sage system to effect manufacturing and prices. Care to share the direction you're taking. I recently watched his (ten year old) youtube and caught something I missed in the last third regarding references for "service providers." I may try to revisit this approach unless the Sage abilities shows more promise.

I would care to share the direction I'm taking, thank you for asking.

Alexis' approach is to make the yearly income of a person with a certain skillset equal to the amount of time needed to train them to that level. I took a different approach, but I'm hoping his solution can inspire me to close some of my gaps.

My trade system still operates largely as described several years ago. My upgrades have largely been relegated to a better processing system: I no longer calculate each stage of good in turn. Instead, I overhauled the recipe system so that each good is calculated recursively based on the price of its ingredients. This also makes it trivial to add new items to the system, as no recalculation needs to be done for complex manufactured goods.

Raw resources are still assigned based on rarity calculations: I attempt to make these as accurate to the real world as possible, but I also keep a file to override those results in case I want to force a particular resource to occur somewhere.

Industries/labor was a different matter. I'd started out giving each industry a "support value" based on MDME: how many people are required to support the resource of an industry. Many people pointed out issues with MDME's support values, but I do think the core idea is sound. But that leaves us back at square one: what number for SV do we use? My answer so far, unfortunately, is do what I feel right.

  "item": "potter",
  "cpUnit": 10,
  "tech": 6,
  "SV": 300

Occasionally, a price will not make sense, and I'll reevaluate the SV. But this is the base number I use to determine whither and which. Let's take a population of 1000. We randomize the order of industries and begin with potter as above. $\left\lfloor\frac{1000}{300}\right\rfloor=3$. So there will be $1-3$ potter references here. Let's roll a $2$ (the actual roll percentage is also calculated from the SV and population). This means that $2\cdot300=600$ of the population is tied up in "supporting" the potter, leaving 400 for the next industry we consider. These base references are then spread across the trade network just like anything else.

This process results in a unique fingerprint of industries for each city.

It is no complex matter to extend this to sage abilities.

  "item": "hunting",
  "cpUnit": 2,
  "tech": 4,
  "SV": 50

Our fiat values are again cpUnit (the unit here being /day) and SV. Hunting ought to be a more common skill than most, so we begin with these numbers and see how it turns out. Because each ability is assigned independently, we can define all Amateur Logistics abilities to have the same base numbers, and the final output for a given market will still be unique. Authority/Expert/Sage abilities can be likewise scaled up appropriately from the Amateur values.

This lets the party acquire a hireling with a bespoke set of abilities and gives a total monthly price based on the specific set of skills they desire.

Future considerations:

  • Better understanding of how the various fiat numbers are derived, something more internally consistent like the price of training/apprenticeship
  • Replace some industries with appropriate skills, e.g., Potter can be replaced by Pottering. As mentioned above, I think this is probably a better approach overall, since it more directly ties the  market network into the sage system

March 10, 2023

Combat Simulation IV

I have made a great deal of process on the combat simulator, to the point where I was able to use it to run a simple combat for my party. That was a useful exercise, as it revealed a couple of places where I needed to clean it up. Two main uses for this tool have emerged more clearly in my mind: running a combat under various conditions to get a better idea of difficulty, and automating the choices of NPCs during a manual combat. Currently, it's not super easy to input PC actions without manually writing JSON - which can be done of course, but is not very scalable.

But it works! I'm trying to avoid premature optimization. I also haven't added some of the more complex effects yet, such as spells or difficult terrain conditions.

Among other benefits, the tool adds up all gained experience (and will work for hirelings and henchmen later on), and provides a useful double-check on the final disposition of health. I encourage players to keep track of their own health, but things slip through the cracks, and more so online.

This fight was rather simple and even blase; an orcish ambush (red) on the party (blue), who was inspecting the aftermath of yet another previous (and successful ambush). With so few combatants and evenly matched in numbers, there is little opportunity for much strategy once melee is met.

True, the display leaves a lot to be desired here. But I don't intend to spend a great deal of time on that, preferring instead to focus on usability and features.

January 6, 2023

Combat Simulation III

Let's continue with movement selection.

We're still only considering melee. I'll address ranged movement next, and then move on to the actual attack.

The following considerations are taken into account:

  1. Distance to target. A closer target is better, or considered a higher threat. For now, I'll consider all enemies to be of equal threat all things considered. I have a planned upgrade to allow creatures of higher intelligence to weight threats based on the enemy's HD
  2. Required AP. Again, closer is better, in this case because the character can move there with AP to spare and possibly attack
  3. Flanking. Could possibly make this available only to higher intelligence creatures also

This generates the following maps. I'm still using the constrained movement but I'm thinking through strategies for a freer (and therefore more efficient) system. The darker the hex, the higher the movement score. Notice in the second image that the preferred move would flank Blue.

Blue guy (right)

Red guy (top right)

This is probably fine for now. There's always more things that come up, but I'm in a move-fast-break-things mood so we'll fix those as they become problems.

January 2, 2023

Combat Simulation II

Previously, I discussed basic, unhindered movement. But movement is rarely unhindered, and so we'll need to add constraints and obstacles.

The trickiest part of this was figuring out how to represent a battle map in memory. I want to use an inefficient format like JSON because its human readable and we can check it into source control easily. As I was going over old combats, I realized that this tool could be very helpful to review both your own historical fights but also those of others, like a quarterback going over old game film.

For now, I'll try to use the simplest possible case. Map hexes are flat-topped and have an equal movement cost. To represent buildings or other structures, one of the sides of the hex is denoted "blocked": that is, no movement may take place through that side. If all 6 sides are blocked, the entire hex is impassable: perhaps a large tree. If two or more sides are blocked, the hex is considered a partial hex and movement/combat buffs may apply.

The following diagram shows two groups of combatants: blue and red. The thick black lines show the outline of a small keep, with several broken walls providing gaps.

Let us say that the blue combatant entering the keep at the bottom wishes to move elsewhere. He'll have to spend 1 AP disengaging from combat, leaving him with 1 or 2 AP for movement. His possible moves are then as follows:

For our purposes here, we'll ignore certain moves that would end in an opponent's hex, such as charging or overbearing.

Later, we can make the map more complex by introducing travel costs for each hex, but this will be fine for now.

December 29, 2022

Combat Simulation I

My party has just run through their first combat. It went well, especially considering this was their first combat in Authentic D&D. Over the holiday, I had some time to think about that combat, and whether or not I could use any algorithms to offload any of the work in running the NPCs, particularly dumb ones with simple motivations. In any case, an exploration of that project is sure to be enlightening in itself.

I'll make the code available here.

Another advantage of a system like this is that we can capture a combat in a repeatable (and version-controllable) way. At least to a degree: the beauty of D&D is that a rule system never fully captures the range of human ingenuity, and so to some extent the rule system must always be fluidly updated to match feedback from actual play.

We can break combat action at its simplest level down into:

  • move somewhere
  • attack something
  • interact with something

These actions can be done more than once per turn in any order, depending on the available action points and circumstances, with the goal of breaking the enemy's will through death or morale collapse.

Every action taken by an active participant in the combat should be in service of this goal. Participants who are more intelligent or better trained will select better options than others. [we can also invert this selection function to simulate the actions of PCs, who will choose the worst option in any possible circumstance]

I'll start by tackling movement, which I thought would be the easiest of the three actions. That turned out to not bode well for the others.

Let's consider a battlemap with no obstacles and two actors. We'll play with the actor on the right, giving it 3 AP and the ability to move according to the Authentic D&D rules. Without considering other constraints, this means that for each AP, the actor can move between 1 and 8 hexes in a straight line. This generates the following possibility space:

Movement possibilities: darker hexes mean more possible paths to reach that hex

However, there are several constraints we must add, which proved to be non-trivial to program. The actor can only change speed once, they can only rotate left or right 60$^\circ$ at the end of each AP, and they can't move through obstacles (in this case, that is only the other actor). That reduces our space to the following:

Possibility space with constraints added

The space is still mostly symmetrical, but we can also see the disruption caused by the presence of another actor. Keep in mind also that this is the possibility space for exactly 3 AP; in many cases our actor would only want to move one or two AP, or perhaps even look ahead multiple turns.

Movement in 1 AP, darker hexes are a higher stride

For example, if the actor on the right wants to attack the actor on the left, they will move at stride 2 for 2 hexes to enter melee and then have 2 AP left to attack. In this way, we can build up a desirability score for each possible hex, and take an optimal or near-optimal combination of actions as a result.

I'm not quite done with movement yet. Right now, we only avoid obstacles of other actors. I'll need to do some thinking on how to add simple static obstacles such as walls or buildings.

November 25, 2022

Physics Sage Ability, Initial Investigation

Ludwig Boltzman, who spent much of his life studying statistical mechanics, died in 1906, by his own hand. Paul Ehrenfest, carrying on the work, died similarly in 1933. Now it is our turn to study statistical mechanics. Perhaps it will be wise to approach the subject cautiously. - Goldstein, States of Matter

I am working to add another possible player to my game, and they have chosen (in what appears to be a theme) another backlog study, this time the Illusionist study of Reality $\to$ Physics:

Physics is a sage study in the field of Reality by which the character learns the physical laws associated with the movement of bodies and objects, vibration, sound, optics and light, fire and heat, the movement of water, air and earth, flight, pressure, electricity, magnetism and many similar branches and topics that give the character insight into the way that energy (including magic) ebbs and flows through the environment. This knowledge provides opportunity for the character to understand and ultimately control, to some degree, these forces.

There is a sense in which my background prepares me well to contribute to this study. On the other hand, the immense depth of this study presents a challenge. To begin with, therefore, I'll work from a framework as follows to start developing progressively more complex abilities, relying somewhat on how I remember my own training progressing.

Identification $\to$ Manipulation $\to$ Fabrication

These won't map directly to Amateur $\to$ Authority $\to$ Expert $\to$ Sage, but I'm finding it a helpful rubric nonetheless.

Based on the description on the Authentic Wiki, as well as the typical definitions of the broader fields of physics, we can line out four distinct areas of study: Mechanics, Electromagnetism, Thermodynamics, and Thaumaturgy (the physical study of magic). My gut feeling right now is that Thaumaturgy belongs in a "higher level" of ability, and so we can start to build out our abilities structure. I'll focus on Identification for now; there is plenty of time to mull on the rest.


  • Identify Mechanics. Recognize the physical laws governing the observed mechanical effects of the movement of bodies and objects, allowing limited prediction of their origin and future disposition. Examples include analysis of a potential landslide or the stability of a built structure, or the origin of a thrown or shot projectile.
  • Identify Electromagnetism. Recognize the physical laws governing the observed electromagnetic effects of natural and artificial sources of electricity, magnetism, and light. Examples include the identification of naturally magnetized lodestone deposits or the distance to a light source at night.
  • Identify Thermodynamics. Recognize the physical laws governing the observed electromagnetic effects of natural and artificial sources of fire and heat. Examples include determining the temperature of a heated metal by its color or the placement of proper ventilation when making a fire in an enclosed space.


  • Identify Thaumaturgy. Recognize the presence of magical energy and identify its likely intent. Examples include predicting a spell during its preparation but before its casting based on the ebb and flow of magical energy the spell's preparation produces.
We could even imagine an additional tier of identification for certain areas of physics which would be more difficult to learn, such as astrophysics (or even potentially anachronistic developments such as relativity or quantum effects).

I have more to think through on this but I feel this is a good start to the endeavor.

October 19, 2022

Detail XV: Farms in the Hinterland

What lies between the settled areas and the "true" wilderness? And how can we determine this from the wilderness maps?

Let's begin with an example region featuring two settlements. The settlement to the left is about 6000 persons, and the right much smaller, about 130. These numbers refer only to the urban population of the settlement proper. This population number is the source of infrastructure numbers, and for that reason is fixed.

lighter "wilderness" hexes can be considered cultivated

Of course, not everyone lives in the settlement, and so we consider that 85% of the 20hex's total population is rural. This comes out to about 15000, and then increases to 18000 due to market spread. Already we have a problem: how are all these people fed?

As a note: the intent is not to micromanage the result such that every individual of hundreds of thousands of people each have their determined job, place, and caloric intake. However, we do want to ensure that our results are consistent and coherent. The players are not interested in the type of detail produced by slavery to the numbers. They want to know (usually) how far outside the town is the dungeon? It is unlikely that a typical dungeon (as understood by most parties) would remain uncleared within several miles of the farming hinterland. We must make the numbers serve us instead.

For some reason, the online worldbuilding community is convinced that a square mile of farmland can support 180 people. I'm not sure what the origin of this number is, and I can't exactly say that it's wrong, but it certainly ignores the incredible variability of arable land and agricultural technology. But let's pretend it's a viable average at least, so we can see where we land.

Our total population of ~24000 people, then, will require some 153 1hexes of farmland outside the city (each 1hex is 0.866 sq mi). The 20hex itself is only 400 1hexes. That certainly reduces the tight feel of the map above into something essentially cleared of all trees and wilderness.

Alternatively, we can take the 6000 as the total population. That requires about 41 1hexes to feed. There are 26 1hexes on the above map which are adjacent to settled hexes. So let us assume that the heavy cultivation of those hexes (including farming, orchards, timber management, and hunting) added to any small-plot cultivation of the denser settled hexes yields the caloric requirements of the 20hex.

Quite a lot of work to end up back at the same square. However, there are some key takeaways from this experiment nonetheless.

  1. The adjacent wilderness hexes are not pure wilderness, and in fact are probably heavily farmed. No orc lairs here.
  2. For this map in particular, the smaller settlement, although tiny in comparison to the larger, controls a slight majority of the productive land (which it likely sends a few miles down the road to the larger settlement). This is probably a collection of holdings of 1-3 knights who are tied in some way to the larger settlement.
  3. As a corollary, the smaller settlement will have about the same number of agricultural class with a much smaller merchant/elite class. They will depend heavily on the larger settlement for military protection and most market services.
  4. There are about 75% fewer people in these hexes than I'd previously thought. That will have significant implications if questions arise about hex wealth or the mustering of an army.

October 14, 2022


Turning and turning in the widening gyre

The falcon cannot hear the falconer;

Things fall apart; the centre cannot hold;

One of my players wants to begin with a focus in Falconry. I will try my hand at expanding out the rules for the Amateur status. As an ancient and on-going pastime, there is no shortage of real-world information regarding the training and behavior of these birds.

Bird Companionship is an amateur-status sage ability where the character gains personal satisfaction and increased experienced bonuses from the presence and use of falcons. For any combat where the falconer's bird participates in the fight, the falconer receives an additional 5% experience bonus. If the falcon is killed in combat, this bonus is not awarded.

Rouse to Hunt is an amateur-status sage ability where the character may send the falcon to hunt for game food. Refer to the Hunting sage ability for the time necessary to locate a target.  A successful hit which results in a stun or kill will allow the bird to grip the game up to its own bodyweight in its talons and return to the falconer. Heavier prey which is stunned or killed must be killed or retrieved by the falconer.

Train Falcon is an amateur-status sage ability which allows the falconer to educate a young bird so that it will perform as desired. Training a bird is a long and complex process which requires near-constant attention. The process begins with either capture or hatching. A wild hawk under a year of age (a passager) is suitable for training. These can actually be easier to handle than a fletching (called an eyass) obtained either from a hatchery or a wild nest, since an older bird has had time to develop some natural instincts. Falcon training proceeds through three stages: Manning, Behavior, and Hunting. These stages are attained by a series of ability checks (using wisdom, intelligence, or charisma) made by the falconer. One roll may be made per day; the ability stat attempted on a given day cannot be the one used the day before. Each stage requires that a total of 10 successful rolls be made out of a minimum of 15. The last four rolls of the 15-roll sequence must be successes (or the last three rolls in the case of a passager). The falconer receives a +1 bonus to the check for each 20 points possessed in Falconry. Once trained, the bird may be used by the falconer or sold; however, a purchased bird will require 1-2 weeks of acclimation to its new owner before its benefits can be realized.

Manning is the process of acclimating the bird to society and in particular to the falconer. 

Behavior trains the bird to respond properly to necessary equipment such as gloves, perches, hoods, and leashes, and to follow simple vocal or visual signals. While falcons cannot be trained to the same degree as dogs, they can nonetheless learn to obey commands such as returning to glove, perching, or hovering.

Hunting trains the bird to attack ground and air prey, and to retrieve prey for the falconer when possible. The falcon will rely on its own instincts and the body language of the falconer when choosing a target while hunting or in combat.

Waken Regard is an amateur-status sage ability which affords the falconer opportunities to meet and conspire with persons of local authority. An authority not more than one rank above the character may extend an invitation to join them on a hunt.

I am not yet satisfied with Waken Regard. Perhaps it may also grant a bonus when making a request of an authority figure. However, it will need to differ at least in degree from Waken Admiration, the Expert-status sage ability.

I'm sure there are other considerations and issues which will arise, but that is part of the iterative process of design.

September 15, 2022

Trade VII: Why Can't I Find What I'm Looking For?

The market system is based on rarity, a calculation derived from the local availability of a good and the total available amount of that good (or at least, the amount that is reachable). Goods are arranged hierarchically into stages, from "raw" materials all the way up to complex goods which require many precursors which themselves are often manufactured.

The system I've written to handle these complex goods works great. I can add "recipes" to a master file and calculate a price for any good I can dream up (and properly research).

A core concept of the system is that of a reference, which represents the amount of a good which can be purchased by 1500 oz of gold (approximately 3,125 gp). For small goods, like crops, a single reference can represent tons of material.

The question I am currently working through is: how to take the bits of information I have and translate them into an availability metric.

The market and price list provide two important functions to the party: they generate striving (to aspire towards a piece of equipment they can't yet afford) and scarcity (equipment that is not available for any cost).

We can, of course, allow the price itself to perform both of these functions. However, all equipment should not be available at all times simply because it exists somewhere in the system. The question is then how to determine how often a good will appear in a given market.

My initial thought is to use the local number of references to determine this rarity. If less than a single reference exists in the local market, then there is a good chance it'll not be available that week (or similar period of time). This means that we can recursively build up a local reference amount for manufactured goods based on the local references of its components.

Once I have this number, I can either use it as a probability straight up, or mitigate it a bit by comparing it to the rarity constant (itself a function of the size of the market). For now, I'm simplifying the final product by taking the log of that number and using that to determine a "rarity score."

\[\mathit{rarity} = \left\lceil-\log_{10}\left(\mathit{ref}_\ell\right)\right\rceil\]

Example: for a good with a 0.002 local references ($\mathit{ref}_\ell=0.002$), the rarity score is 3. That can be further used for a roll as needed. We could say that an item with a rarity of 3 will be available in a market on a 1 in 1d30, for example. This makes rare items difficult to find, but not impossible. The party could either hang around until some were available, or travel to another (and perhaps more favorable) market.

The simplest method to determine local references is to use the minimum of all constituent components, without regard to the amounts needed. I'm not super comfortable with this, because my conception of references is tied more tightly to actual production numbers (which I generate from the working population availability). But it has led to some bizarre cascades. Fodder, for example, is very cheap, but a lot of it is needed to raise a foal into an adult horse. This also means that the number of fodder references needed per horse is very very low. Both of these can quickly get out of hand as very small or large numbers are passed through several iterations of the recipe parser.

I tried dividing local references by the amounts needed, or comparing the local references available to the number needed. Neither are really satisfactory. I think I will use the simple method described above, and if I get a lot of complaints in play then I will revisit it.

The recipe system is built and effective. There are a lot of recipes to write, however.