dariusk / NaNoGenMo-2015

National Novel Generation Month, 2015 edition.
341 stars 21 forks source link

Simulationist Fantasy Novel #40

Open mattfister opened 8 years ago

mattfister commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

mattfister commented 8 years ago

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:

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 commented 8 years ago

Nice! On day one it's reading like my 2013 entry, Teens Wander Around a House: http://tinysubversions.com/nanogenmo/novel-2.pdf (pdf)

mattfister commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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.

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 commented 8 years ago

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 commented 8 years ago

"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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Nice! I'm glad it could help.

mattfister commented 8 years ago

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 commented 8 years ago

Great! Completed tag added.

mattfister commented 8 years ago

And here's my writeup.