Giter Club home page Giter Club logo

Comments (6)

slicedlime avatar slicedlime commented on July 3, 2024

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:

  • Start with a story end.
  • Add and extend pieces towards the beginning of the story, keeping track of state.
  • Location and character descriptions are driven by a data definition format based on JSON.
  • Action is also driven by an extended version of the above.
  • Repeat process until word count exceeds desired length

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.

from nanogenmo-2014.

slicedlime avatar slicedlime commented on July 3, 2024

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.

from nanogenmo-2014.

slicedlime avatar slicedlime commented on July 3, 2024

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.

from nanogenmo-2014.

ikarth avatar ikarth commented on July 3, 2024

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.

from nanogenmo-2014.

MichaelPaulukonis avatar MichaelPaulukonis commented on July 3, 2024

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

from nanogenmo-2014.

MichaelPaulukonis avatar MichaelPaulukonis commented on July 3, 2024

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.

from nanogenmo-2014.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.