dariusk / NaNoGenMo-2014

National Novel Generation Month, 2014 edition.
257 stars 17 forks source link

A tale of battles #37

Open slicedlime opened 9 years ago

slicedlime commented 9 years ago

I don't have a detailed plan - I do want to generate something with a story. Currently thinking I'll go for a Fantasy style, mostly because there's a lot of easy tropes and stereotypical stories to build on.

slicedlime commented 9 years ago

I do seem to have a Fantasy novel generator!

I'm going to write a more detailed blog post explaining the thoughts behind the whole thing, but here's how it ended up:

The framework sort of (;-)) works. The problem with it is to get enough variety - I have generators for skirmishes, travel and end battles, as well as the protagonist recruiting others for his/her party. In addition I also have a "quest" generator that will add a small conversation or thought foreshadowing something that happens later.

I am very happy with the way the location and character descriptions turned out. The action came out entirely jumbled though, probably because there's no real state... it's just the characters involved randomly doing things and those random actions possibly having consequences. It initially looked like a lack of variety was hurting action terribly, but adding variety to it turned it into a clusterfuck of epic proportions - and then November ended :)

The generator is also slow when generating long novels. 5000 words takes a few seconds, 50k words takes 30 minutes or so. I'm guessing this could be sped up by not constantly generating the whole thing, but I haven't had time to really look at that.

I'm currently generating a 50k novel, will return when it's done.

slicedlime commented 9 years ago

There we go. The source (python code & json data definitions) can be found in this archive. A sample novel can be found here. This is the output from running ./generate.py 1 50000.

slicedlime commented 9 years ago

Example of a passage I'm pretty happy with:

"Lynalod, Ilnoil and Yeil travelled from Pendito to Salotar plains. There was short grass on the plains that swayed in the wind. Old moss covered a few huge boulders that laid on the plains. A small river that flowed through Salotar blocked the way."

... and then there's lots of stuff with ratmen and orcs, since those are the only two monster types available.

ikarth commented 9 years ago

I like this. There's some good ideas in the approach, and you've discovered some of the pitfalls.

And I think this is one of the few generators to produce a novel-length plot, such as it is.

MichaelPaulukonis commented 9 years ago

Talespin, from the 1970s, started with endings then worked its way backward to the beginnings. They were pretty short stories, though. Involving animals, too.

http://wikis.sub.uni-hamburg.de/lhn/index.php/Story_Generator_Algorithms - scroll down to the 11th paragraph (they're marked).

Great job!


I originally read your comment as "lots of stuff with ramen and orcs" and visualized japanese campfire scenes.....

MichaelPaulukonis commented 9 years ago

Don't think I won't be stealing some of your ideas. No matter how many ratmen you send at me.

I can always brandish a special, magical Temporal-External-Positron-Dynamic Core or summat. Maybe it'll make the plains collapse. Who knows.

locations.json, 'monsters.json' and 'characters.json' are more in line with how I had envision certain objects, but never got around to implementing. So I will be staring at them more.

One thing I learned -- the longer and more varied your template text, the less repetitive-seeming is your output.