-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goal-driven use of scenes and sequels for capers #155
Comments
OK, I got it working well enough (with hard-coded settings and a hard-coded world structure) to generate a novel. Here's the source: SceneSequel |
That's some speedy execution there. I have to confess, when you first started describing it, it sounded like a lot of work to pull together. I'm impressed. I really like how it turned out. It's really repetitive at novel length, but that's not a weakness of the structure so much as each section glosses over the details of carrying out the actions. Feels like there's scope to build on it. |
Also, it reminds me of a Donald E. Westlake caper. Needs more small time cons and drivers, though. |
I'm thinking of several possible improvements. One: for each goal, have a set of dependencies (with attached probabilities Two: for each goal and each complication, have some sort of human-readable Three: integrate a little multi-level templating system into the printmsg I'm also thinking that, in order to produce more various stories from the I was able to pull it together quickly only because I really did the bare On Fri, Nov 13, 2015 at 12:03 AM Isaac Karth [email protected]
|
So, I added improvement number two for goals and subgoals (texture will be This is the story of that time I decided to try and steal them jewels. *So, I thought, what if I tried to steal them jewels by trying to go to the *So, I figured, if I tried to steal them jewels by trying to sneak into the If I'm trying to purchase a grappling hook, what if in order to steal them *So, I figured, if I tried to steal them jewels by trying to purchase a If I'm trying to go to the ninja supply store, what if in order to steal *So, I figured, if I tried to steal them jewels by trying to purchase a *On the other hand, if I try to purchase a black leather catsuit it'll give *So, I figured, if I tried to steal them jewels by trying to purchase a *If I'm trying to get a museum uniform, what if in order to steal them *The costume shop was tucked into a strip mall down town, between a *So, I thought, what if I tried to get a smaller gun by trying to go to the So, I thought, what if I tried to get a smaller gun by trying to go to the So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to purchase *I totally succeeded in my attempt to go to the ninja supply store by *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to sneak *I failed to sneak into the museum at night while trying to purchase a *So, I thought, what if I tried to get a smaller gun by trying to sneak *I failed to sneak into the museum at night while trying to purchase a *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to go to the *I totally succeeded in my attempt to go to the ninja supply store by *So, I thought, what if I tried to get a smaller gun by trying to sneak *I failed to sneak into the museum at night while trying to purchase a *So, I thought, what if I tried to get a smaller gun by trying to sneak *I totally succeeded in my attempt to go to the ninja supply store by *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to sneak *I failed to sneak into the museum at night while trying to purchase a *So, I thought, what if I tried to get a smaller gun by trying to sneak *I failed to sneak into the museum at night while trying to purchase a *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to sneak *I totally succeeded in my attempt to go to the ninja supply store by *So, I thought, what if I tried to get a smaller gun by trying to purchase *So, I thought, what if I tried to get a smaller gun by trying to sneak *I failed to sneak into the museum at night while trying to purchase a *So, I thought, what if I tried to get a smaller gun by trying to sneak *I totally succeeded in my attempt to sneak into the museum at night by *So, I thought, what if I tried to get a smaller gun by trying to go to the *I also have to get a smaller gun. * *I failed to steal them jewels while trying to sneak into the museum at *So, I thought, what if I tried to get a smaller gun by trying to go to the *I totally succeeded in my attempt to steal them jewels by trying to sneak THE END On Fri, Nov 13, 2015 at 7:31 AM John Ohno [email protected] wrote:
|
Implemented a limited version of improvement number one (dependencies). On Fri, Nov 13, 2015 at 3:34 PM John Ohno [email protected] wrote:
|
Subtle. However, maybe when the global state changes, you could put in a line? Something like:
EDIT: also if this is really just displaying the minimax thought process, it would make more sense printing the tree in reverse order. For example, if the chain is "current state -> get uniform -> act as employee -> steal jewels", it now says
It makes more sense the other way:
Or if you want to go top-down, it needs different wording at least.
You could alternate between the two for interest. |
I could. I was actually thinking of adding description to 'complication' On Thu, Nov 19, 2015 at 11:16 AM Greg Kennedy [email protected]
|
Based on the story-compiler discussion, I wonder if a potential next step might be to feed the output of this generator into a scene generator. So this handles the high-level plot--the who, the what, the when, the where--and then you can switch to a separate approach for generating the how and the why. Of course, that's really just an expansion (or a different way to think about) your complication descriptions. |
That was actually one of the early plans I had for it -- the idea was based One road to expansion is to figure out some language for representing and On Thu, Nov 19, 2015 at 11:40 AM Isaac Karth [email protected]
|
Isaac's mention in #11 of Jim Butcher's 'scenes and sequels' model of story-writing got me thinking about a more straightforward and limited model for simulation-based plotting, basically borrowing elements from TaleSpin but also from markov chains. Since I might not actually code this, I'm going to try to clearly and completely document my ideas about it here.
Butcher suggests that scenes have, essentially, a two-bit result matrix. A scene is a situation in which the protagonist attempts to achieve a very specific goal, and at the end of the scene, the goal can either be achieved or not, and some other (often negative) attribute can be gained or not. He suggests that the tone of a story in terms of how uninteresting or cynical it seems falls mostly to the probability of these two bits: if goals are achieved too often the story seems trivial while if the goals are typically failures without complication the protagonist seems incompetent (Superman vs Worf); having added complications generates a 'hook' for later scenes as well as allowing for both successes and failures to seem more interesting, even though ultimately very little information has been added. So, I model a scene as an object containing a low-level/atomic goal, a bit indicating whether or not that goal was achieved, a bit indicating whether or not there was a complication, and the complication if it exists.
Butcher suggests that sequels, which occur between scenes, consist of an emotional reaction to the result of the scene plus a logical reanalysis of strategy. He suggests that the ratio of how much text is spent on the emotional reaction versus the logical reanalysis is important in terms of how warm versus cold the story seems to readers, and that the ratio of how much text is spent on sequels versus scenes largely determines whether the story is seen as slow and cerebral or fast-paced and action-packed. Ultimately, though, the actual information content of the sequel is fairly low: its elements are a re-statement of the result of the scene in emotional terms, and an explanation of the goal of the next scene.
So, I suggest the following model of a caper story.
We have a 'world model' or 'game model' resembling a markov model. It's a state machine, where each state has a value in terms of a variety of potential goals, and each state has multiple possible states it can lead to, each with attached base probabilities. Each state also has multiple possible complications which have attached probabilities.
We furthermore have a 'story model' which consists of tunable weights. For instance, the story model will contain a weight on the success probability: a superman-style story might have a weight of 90% so that only state changes with a base rate of less than 10% will have less than a 50% chance of succeeding, while a Pink Panther story might have a weight of 10% so that everything the protagonist tries to do is a failure. Likewise, the story model contains a tunable probability of complications. (A superman-style story would have a low complication rate, while a Pink Panther story would have a high one.) We then have at least two more tunable options: an average/target length for the emotional reaction portion of the sequel and an average/target length for the logical reanalysis portion. Tune up the former and get a romance novel; tune up the latter and get Sherlock Holmes.
At the beginning of the run of the program, we have a large-scale end goal. (For example, "steal the jewels".) We go through a series of scenes by choosing actions based on the success probabilities in the world model to our goal pool (which would be the large-scale goal averaged with a weighted array of complications), in a probablistic manner: we create new composite probabilities for our protagonist choosing different courses of action based on the probability of each for achieving each of our weighted goals in the goal pool, including iterating further ahead in the world graph. (As an optimization, we can actually precompute for each node the true base probabilities of all outcomes).
Once we have chosen our route, we produce a scene with that route as our immediate goal (say, "buy a disguise as a museum security guard"), the result (say, success), and the complication (say, "my gun can't fit in this uniform without bulging"). We then produce the sequel passage: the emotional reaction ("I'm so glad that this uniform was so easy to find!") and the logical reanalysis ("I should probably buy a smaller weapon so that I can hide it better"). We continue with the next iteration (goal: "buy a smaller weapon", route: "go to the gun store", result: "failure, gun store closed", complication: "mugger stole my wallet in front of gun store"), and iterate until either our large-scale end goal is achieved or there is no path with a base rate over some threshhold to achieve any of the goals in our goal pool.
The text was updated successfully, but these errors were encountered: