The goals we set for the system are heroic, and demand heroic test cases.
— Sheldon Klein (1976)
Overview
Features
Usage
Simple Example
Here’s a simple, yet potent, Viv action that shows off a bit of the syntax.
This action is initiated by a character who searches over their own memories to find evidence of another character repeatedly mistreating them, and it can only be performed if such memories exist. As a result of the action, the initiator will lower their affinity toward the character in question—and may even plot revenge as a result.
// A character processes their repeated mistreatment by another characteraction contemplate-mistreatment: roles: @thinker: as: initiator @subject: as: character, anywhere // Not physically present @mistreatments*: // 3-5 past actions where @subject harmed @thinker as: action n: 3-5 from: search query harm: // Defined elsewhere: a query for finding harmful actions over: @thinker // Search over @thinker's memories with: @perpetrator: @subject @victim: @thinker effects: // Affinity isn't modeled in Viv, but you can read and write arbitrary sim data @thinker.affinity[@subject] -= #BIG reactions: if @thinker.personality.vengeful: // More arbitrary sim data (from Viv's view) queue plan plot-revenge: // Defined elsewhere: a plan for orchestrating the actions of a revenge scheme with: @plotter: @thinker @target: @subject endAs these events unfold, Viv will work behind the scenes to automatically track all the causal threads: the @mistreatments* actions → contemplate-mistreatment → the plot-revenge actions. This happens automatically behind the scenes, via Viv’s mechanism for causal bookkeeping. Later on, the emergent storylines embedded in this graph can easily be detected via Viv’s facilities for story sifting.
All the while, the Viv author has not been tasked with explicitly marking these links—they simply wrote down what kinds of past actions might lead someone to perform contemplate-mistreatment, and what kinds of follow-on actions might happen as a result of its performance.
For a more extensive example of Viv code, see the working example here.