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

Open
mattfister opened this issue Oct 27, 2015 · 17 comments
Open

Simulationist Fantasy Novel #40

mattfister opened this issue Oct 27, 2015 · 17 comments

Comments

@mattfister
Copy link

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

Repo is here: https://github.com/mattfister/nanogenmo2015
wordtools repo is here: https://github.com/mattfister/wordtools

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
@dariusk
Copy link
Owner

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
@mattfister
Copy link
Author

Goals

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.

Technologies
I have a git repo of Python tools I plan on using: https://github.com/mattfister/wordtools

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.

@ikarth
Copy link

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.

@mattfister
Copy link
Author

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
@dariusk
Copy link
Owner

dariusk commented Nov 2, 2015 via email

@mattfister
Copy link
Author

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.

@MichaelPaulukonis
Copy link

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.

@mattfister
Copy link
Author

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.

@mattfister
Copy link
Author

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'.

@MichaelPaulukonis
Copy link

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....

@greg-kennedy
Copy link

"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?

@mattfister
Copy link
Author

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.

@MichaelPaulukonis
Copy link

I adapted your reduced-concept-net code to NodeJs - https://github.com/MichaelPaulukonis/NaNoGenMo2015/blob/master/conceptnet/cnSearch.js

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' ],
  InstanceOf:
   [ 'album',
     'organisation',
     'film',
     'mountain',
     'album',
     'musical_work',
     'musical_work',
     'single',
     'band',
     'musical_work',
     'film',
     'film',
     'organisation',
     'cinder_cone',
     'television_episode',
     'single',
     'hollywood_cartoon',
     'musical_work',
     'musical_work',
     'cartoon',
     'band',
     'natural_place',
     'place',
     'album',
     'album',
     'musical_work' ],
  IsA:
   [ 'mountain',
     'single_broadcast_tv_show',
     'music_single',
     'movie',
     'album',
     'band',
     'either_cone_or_dome',
     'violent_force_of_nature',
     'mountain',
     'geography_topic',
     'physical_phenomenon',
     'land_topographical_feature',
     'book',
     'musical_composition',
     'mountain' ],
  RelatedTo:
   [ 'crater',
     'etna',
     'explode',
     'lava_spout',
     'melt',
     'mount',
     'tall_mountain',
     'erupt_magma',
     'geologic',
     'hot',
     'lave',
     'red',
     'spout',
     'violent',
     'violent_mountain',
     'ash',
     'bake_soda',
     'earth',
     'lava',
     'lava_mountain',
     'lava_spewer',
     'like',
     'mountain',
     'source',
     'throw',
     'very',
     'very_hot',
     'big',
     'explosion',
     'fiery',
     'fiery_mountain',
     'formation',
     'lava_source',
     'like_vulcan',
     'on_mountain',
     'saint',
     'throw_fire',
     'erupt',
     'erupt_lava',
     'explosive',
     'fire',
     'fire_mountain',
     'have',
     'hot_lava',
     'landscape',
     'lava_fire',
     'lave_mountain',
     'spewer',
     'tall',
     'lava',
     'magma',
     'ash_smoke',
     'earth_formation',
     'erupt',
     'explosive_lave',
     'magma',
     'mountain_like',
     'shape',
     'smoke',
     'soda',
     'vent',
     'gas',
     'moon',
     'active',
     'bake',
     'cone_shape',
     'crater_fire',
     'eruption',
     'event',
     'geologic_event',
     'have_magma',
     'melt_lava',
     'mountain_eruption',
     'vulcan',
     'yes',
     'planet',
     'active_mountain',
     'big_spout',
     'cone',
     'erupt_mountain',
     'hawaii',
     'vesuvius',
     'mantle' ],
  dbpedia:
   [ 'progressive_rock',
     'rock_music',
     'jimmy_buffett',
     'black_metal',
     'pop_punk',
     'indie_rock',
     'rock_music',
     'art_rock',
     'folk_rock',
     'alternative_rock',
     'post_grunge',
     'alternative_rock',
     'jimmy_buffett' ],
  CapableOf:
   [ 'form_new_island',
     'erupt',
     'form_new_land_mass',
     'release_toxic_gas_into_atmosphere',
     'send_lava_into_water' ],
  AtLocation:
   [ 'top_of_mountain',
     'surface_of_earth',
     'bottom_of_sea',
     'bottom_of_ocean' ],
  HasProperty: [ 'extinct', 'hot', 'dormant' ],
  ReceivesAction: [ 'fill_with_magma', 'cause_by_upwelling_magma' ],
  PartOf: [ 'crater' ],
  Antonym: [ 'dormant' ],
  MadeOf: [ 'lava' ] }

@mattfister
Copy link
Author

Nice! I'm glad it could help.

@mattfister
Copy link
Author

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
Copy link
Owner

dariusk commented Nov 28, 2015

Great! Completed tag added.

@mattfister
Copy link
Author

And here's my writeup.

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

No branches or pull requests

5 participants