Skip to content
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

Simulationist Fantasy Novel #40

mattfister opened this issue Oct 27, 2015 · 17 comments

Simulationist Fantasy Novel #40

mattfister opened this issue Oct 27, 2015 · 17 comments


Copy link

@mattfister mattfister commented Oct 27, 2015

Change of Plan - Going to go with a simulationist approach to generating a fantasy novel.

Repo is here:
wordtools repo is here:

This is complete
Access a random novel here!
Read my writeup

@dariusk dariusk changed the title I'm In A novel of fake facts Oct 27, 2015
Copy link

@dariusk dariusk commented Oct 27, 2015

Hi, I'm going through and updating the titles on issues to make them more specific. Feel free to edit my edit if it's not to your liking. This is to make browsing issues a lot more pleasant.

@mattfister mattfister changed the title A novel of fake facts Simulationist Fantasy Novel Nov 1, 2015
Copy link

@mattfister mattfister commented Nov 1, 2015


I'm going to try to generate a fantasy novel with the general structure of Lord of The Rings. A group of adventurers are going somewhere to do something. I'm going to take an approach of high level to low level via an outline, like chapter 1:
Chapter about setting
Chapter about character 1
Chapter about character 2
Characters talk
Dangerous situation occurs
Characters overcome dangerous situation
Characters travel to new setting.

This will probably be pretty tedious. I'm going to capture a sense of history by storing what has previously happened to characters in the past and try to generate some sentences and paragraphs based on that to give a sense of continuity. Also doing some sort of simulations for characters trying to resolve conflicts.

I have a git repo of Python tools I plan on using:

This includes an offline version of ConceptNet that I made, some vocab lists, and some general linguistic tools I've been working on.

All of my code will probably be in Python.

Copy link

@ikarth ikarth commented Nov 1, 2015

I'm going to be following this with interest, since I'm curious about how different simulationistic approaches work for novel-writing.

Copy link

@mattfister mattfister commented Nov 2, 2015

Day 1 Update

Check out my day one sample, The False Story of Glory.

Today I added the baseline for my novel generator. I had a skeleton of a setting describer in place so now I'm generating some characters and moving them from setting to setting. Each setting is described using data from ConceptNet and some added props. I also added a markdown and html formatter so I can actually get something published. I found pypandoc was great for my purposes.

The main accomplishment today was setting up the infrastructure to carry the state of the story so I can continue filling in the details as I go. Up front I'm generating a state which consists of a series of settings and the primary characters. As the novel progresses the characters are moved from setting from setting. Each setting has a chapter generated about it. The chapter generates its paragraphs (just one for now about the setting).

Remaining goals:

  • Many more kinds of paragraphs
  • A beginning and end of the novel
  • Primary characters that enter and exit the novel
  • Secondary characters
  • Characters that change over the course of the novel

What could help me the most:
Right now I have a really disorganized approach to sentence generation. I'm going to get to the point where I want sentences about a certain thing, but my current approach is manual and unadaptable. I think I would be well served with some sort of easy intermediate format for sentence generation that could be translated to English. This would probably take the form of a recursive templating expression.

@dariusk dariusk added the preview label Nov 2, 2015
Copy link

@dariusk dariusk commented Nov 2, 2015

Copy link

@mattfister mattfister commented Nov 2, 2015

Thanks! Teens Wander Around a House is awesome. I still have long way to go to get it actually seem like a fantasy novel, for sure.

Copy link

@MichaelPaulukonis MichaelPaulukonis commented Nov 2, 2015

This is my favorite:

Roman Abraham, Graig the lonely, and Basil the successful traveled to a dragon's lair. There was a drawer inside the dragon's lair. The dragon's lair was a computer game. Graig considered how a dragon's lair is a software object. The dragon's lair was a software object. The dragon's lair was a computer game. The dragon's lair was a computer game. Graig considered how a dragon's lair can be a computer game. The dragon's lair was a computer game. The dragon's lair was a computer game. There was an amulet inside the dragon's lair.

I had hoped to make use of ConceptNet last year for things, but got so bogged down in all of the boring templating and proppian-plotting that I never got back to it. I've been thinking about using it for a problem this year. I love where you're going.

Characters travel to new setting.

Maybe "different" instead of "new" -- meaning they could travel to a previously-visited setting, and thus encounter it differently. Reflect upon what they thought/did before, etc. This would require geographic building/tracking. Even just a grid.

Copy link

@mattfister mattfister commented Nov 2, 2015

Thanks! I really like ConceptNet and think I could do some great things with it. It obviously has some shortcomings, both specific to world-building non-modern non-Earth worlds, and general data sanitization problems, but I think it's fun. I'm willing to take the hit on having some anachronisms and weirdness in exchange for the humor and unexpectedness.

Definitely like the idea of the party returning to previously visited settings. Also I've been thinking of having forks in the road with the characters weighing the options between different paths.

Copy link

@mattfister mattfister commented Nov 9, 2015

Day 8 Update

Sample: The Implicit Story of Ages

Another update. It was a crazy week so way less progress than I hoped for.

Still I got a bunch of new features done, so I'm happy.

  • Attributes are now being tracked on characters. Think d6 sort of role-playing system. Each character has attributes for lore, survival, and combat, but it's really simple for me to add other attributes.
  • When generating setting paragraphs, lore challenges are conducted to have character discuss the history of the place.
  • Food and energy are now being tracked for the party. If they are low on food, a character will go fishing, hunting, or gathering. This is a new paragraph that is appended to the chapter.
    *Characters have memories from their youth. If they face a challenging situation, like hunting, they may recall when they went hunting as kids or something.
  • If characters have a success or failure, they may have their current 'quality' replaced by a new negative or positive quality. So Darren the Devious may become Darren the Dependable (alliteration unlikely).

I'm happy with the hunting, fishing, and gathering paragraphs I'm generating, but I realize the templates for them really show. I'm not going to pursue another text generation strategy for this year's nanogenmo at this point, but maybe next year I'll have something that allows for some more variety.

One thing I just ran out of time on today was generating camping paragraphs. I want to deliver the sense that the night is dangerous and a time of strangeness so you'll get weird dreams and sounds in the darkness. That should be easy to do and coming up soon.

Here's my favorite sample chapter from today's output.

The Windmill

Joaquin the profound, Billie Nicholson, and Darin traveled to a windmill. Joaquin the profound exclaimed, "I hate this place." There was a cow inside the windmill. There was a button inside the windmill. The windmill was a windpump. The windmill could power entire town. Darin Schuler stated, "This is a very dangerous windmill." The button was an artifact. Joaquin Hart mentioned, "This place was once known as 'Iaaemlbaehh Ladodwi'." Joaquin thought about how a button was similar to a foil. Darin proclaimed, "Let's move on."

Billie the innocent mentioned, "Our food should last a bit longer." Billie decided to go hunting. Billie remembered hunting with her best friend as a child. She searched the windmill for signs of caribous. But she failed to find any caribou signs. Billie returned to Joaquin empty handed. Billie the innocent exclaimed, "We will have to just keep going, there was no food to find here." Because of this great failure Billie the innocent became known as 'The Interfering'.

Copy link

@MichaelPaulukonis MichaelPaulukonis commented Nov 9, 2015

I like how this is coming along.

I also have some sympathy for the characters in that they seldom seem to find food. No doubt because they search specifically for avocados, caribous, and the like - totally overlooking the smaller wild game and grains that surround them.

Staring at your "reduced ConceptNet" implementation....

Copy link

@greg-kennedy greg-kennedy commented Nov 9, 2015

"Kandace discovered a hook inside the glacier. The glacier was a topographical feature. Marybeth considered how a hook is a golf stroke."
Adventurers who crack puns... is this Automated Terry Pratchett?

Copy link

@mattfister mattfister commented Nov 9, 2015

Actually, when I first discovered conceptnet, I think I was planning on searching through all English words for potential puns. Never got anything working though.

Copy link

@MichaelPaulukonis MichaelPaulukonis commented Nov 10, 2015

I adapted your reduced-concept-net code to NodeJs -

I haven't figured out how I'm going to be using it in my project, but it's a great resource....

It translates the relations into json, so we get back something that looks like this:

> search("volcano")
{ HasA: [ 'violent_eruption', 'crater', 'very_distinctive_peak' ],
   [ 'album',
     'musical_work' ],
   [ 'mountain',
     'mountain' ],
   [ 'crater',
     'mantle' ],
   [ 'progressive_rock',
     'jimmy_buffett' ],
   [ 'form_new_island',
     'send_lava_into_water' ],
   [ 'top_of_mountain',
     'bottom_of_ocean' ],
  HasProperty: [ 'extinct', 'hot', 'dormant' ],
  ReceivesAction: [ 'fill_with_magma', 'cause_by_upwelling_magma' ],
  PartOf: [ 'crater' ],
  Antonym: [ 'dormant' ],
  MadeOf: [ 'lava' ] }
Copy link

@mattfister mattfister commented Nov 10, 2015

Nice! I'm glad it could help.

Copy link

@mattfister mattfister commented Nov 28, 2015

Since we're almost at the end of the month and I'm almost out of time, I'm going to call this complete. I generated 77 simulationist fantasy novels overnight. You can access a random one at this link.

I'll do a bigger writeup soon. I missed some of my bigger goals, but at least it's spitting out really tedious novels :)

@dariusk dariusk added the completed label Nov 28, 2015
Copy link

@dariusk dariusk commented Nov 28, 2015

Great! Completed tag added.

Copy link

@mattfister mattfister commented Nov 30, 2015

And here's my writeup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.