NaNoGenMo / 2021

National Novel Generation Month, 2021 edition.
44 stars 8 forks source link

Recursive story simulation; Þys Maddock #33

Open hornc opened 3 years ago

hornc commented 3 years ago

Repo: https://github.com/hornc/maddock

This year I am attempting a simulated story generator. In previous NaNoGenMos I've focused on methods of text generation through code, where any resulting 'story' is a happy accident, or secondary to some feature of the code or quantity of text. This year I want to focus on generating story rather than just words...

Inspiration

This story is to be a recursive storytelling simulation, inspired variously by:

See the repo for more specific goals and ideas....

~17K words so far.

Sample at the end of session 1:

Twenty-four brave travellers make their way by ocean going vessel towards The D_ Q Inn. It is barely foggy. First is the sincere but miserable real estate broker followed by the youthful but suspicious physician assistant, followed by the elated but stern wood patternmaker, followed by the wishful but not so lame bill and account collector, followed by the shunned but not so warm dental laboratory technician, followed by the tepid but not so quick meter reader, followed by the spunky but competent clinical laboratory technologist, followed by the suffocated yet drowsy life scientist, followed by the stressed -cum- well-rounded musician, followed by the bold and stern psychiatric aide, followed by the perplexed -cum- quiet craft artist, followed by the replaced and drowsy geography teacher, followed by the neurotic and serious stock mover, followed by the nasty nonetheless insensitive hand laborer, followed by the ignored ambitious ceiling tile installer, followed by the faithful but not so cowardly traffic technician, followed by the manipulated yet serene tour guide, followed by the burned-out but flashy hunter, followed by the ashamed and arguably maternal mining safety engineer, followed by the pensive and crafty tool sharpener, followed by the enriched but circumspect forestry teacher, followed by the disgraced but not so blue forester, followed by the innovative and lively automotive glass installer, followed by the sunk but not so attentive foreign language teacher,. The intrigued but stern physician assistant, O__ interacts with the crappy and arguably cynical tool sharpener, C__ It is a neutral interaction. The trembly but not so drowsy craft artist, T does not understand . The impatient but well-behaved physician assistant, O__ interacts with the threatened and stupid ceiling tile installer, F It is a neutral interaction. The glorious and obliging meter reader, Y does not understand . As they near their destination, they notice the Inn's sign depicts a Q__ which appears exceedingly D___. The sign is covered with a slow moisture in the fog. The group feels forgotten as they approach the entrance to the inn.

The trapped but not so sensitive craft artist, T_ enters the inn first {description}. The obligated and arguably drunk real estate broker, L___ reacts {reaction}. {supplementary reaction from a third individual or the group} Inside, the inn is really awesome and well described. The travelers interact with the Inn in an interesting and satisfying way. Close by, or far away, a horse makes a sound, is seen, or unobservedly does something characteristic yet poignant. "Oh look, over there by the counter; there is the innkeeper, looking rather lethargic. Let us talk to him!" says the foolish nonetheless great ceiling tile installer, F_. The innkeeper, G____, has a lethargic personality, and some worldly advice to impart (if the mood takes him). "Grab yourselves a table, and I'll be with you shortly to take orders..." The weary travellers sit at a knowledgeable table. They have some interactions, and remark upon their situation. The amazed and short-tempered wood patternmaker, E___ interacts with the hateful and cordial tool sharpener, C It is a positive interaction. The persecuted but not so timid life scientist, M is amused . The trustful -cum- egotistical traffic technician, I interacts with the okay nonetheless stable clinical laboratory technologist, F____ It is a negative interaction. The insecure nonetheless well-rounded forester, S looks on in disgust . Possibly, something notable happens. What is the outcome? Someone may be called away, or storm off, or otherwise be excused. Presently the Innkeeper (or possibly another staff member such as the bar-staffer or pot-scrubber) scoots over to take their orders. Available yummies are listed, questioned, and chosen, comprising and/or consiting of food and / or drinks. There is indecision, and certainty. Once all orders are made, the group settles in to wait. Drinks may arrive, but the food takes time to prepare. Something happens in the main room. In order to entertain themselves, as is their custom on this journey, they decide to pass the time telling stories, and chose from their number one person to tell this evening's tale... The delicate yet unmotivated bill and account collector, Q____ waits for the chatter to subside and begins her tale...

The Bill And Account Collector's Tale

Twenty-three optimistic travellers make their way by carriage towards The I__ L___ Inn. It is very stormy. ...

hornc commented 2 years ago

Code repo: https://github.com/hornc/maddock Output (50901 words): Þys Maddock: a simulated, recursive tale.

I think I'm done. If I were to make it 'better', among other things, I'd make it into a rail-click 'game', possibly with generated woodcut style illustrations or something. Any improvements from here won't increase the word count, and the basic story is told. Story was my main goal here, and there is one that might take a while to see. This still feels like a WIP, but hopefully anyone looking at it gets the idea of what it's trying to do, and some entertainment from it.

Having put some effort into telling a (very simple) story, I realise now there is another aspect to writing these that is (potentially -hah!) important -- the quality of the words and the way the story is told. That's quite hard (to do with algorithms), and a different challenge. At one point it became clear that it would probably be less effort, and produce a much better result to just write 50k words of story. Many of the things that could happen in this simulation don't in any one run through. And some of the stuff that does, isn't that obvious. I did abandon going deeper into personality simulation because for the purposes of the story and text, after a point, randomness seemed to produce equal results. The basic character dispositions work and are useful. There are too many characters to track everything as a reader though... which was kind of intentional. Some of the bad colliding phrases are funny, and add novelty.

Fixing up all the grammatical issues would take a long time, and probably make things more dull. The story as it is has a certain character. I'd probably design things better next time, and focus on a more specific goal. This was a bit of a grab bag of ideas and experimentation, so I'm going call it successful for that, and for hitting the 50k word limit in the time frame.

Running the code tends to produce around 28k words, but will occasionally goes over 100k. It's the long recursive weapon story which can push it to this length. It is meant to be a long boring interlude story-within-a-story which could literally go on for ever.

I had an idea to describe the paintings over time, but that would have just been a longish story I would write and spread out between the other generated content. It didn't seem very 'generated', so I didn't bother.

My favourite part of this was working on the recursive, almost fractal, endless descriptions of linkable things which could run for ever. In a re-do, I'd think about those more, and generally structure the code far more sensibly.

This was fun. I can't believe the month is up already....