16 May 2013

New Project: The Book Generator

Posted by joncooper

This week I’ve been working on a new project, and I’m pretty excited about it. Over the past year or so I’ve developed software that can generate character profiles, book titles, chapter titles, and even book summaries. Since all of that worked out pretty well, I’ve decided to take the next step and start writing a program that can generate entire books.

With that in mind, behold the Tom Swift Simulator:

This piece of software isn’t online yet, and it probably won’t be online for some time. There is a great deal of work that needs to be done before it’s ready for prime time. It is coming along well, but it is a huge project and it will take a lot of time to finish.

I think that I’ve found an approach that will work. when I first started thinking about this I thought that I could generate books the same way I generated chapter titles. To generate a Tom Swift title I just use a simple formula:

TOM SWIFT AND HIS $ADJECTIVE $NOUN

Once I had the formula it was just a matter of coming up with long lists of appropriate adjectives and nouns, and then sticking them together at random. That approach works great for titles – but it does not work for books.

So I’ve decided to take another approach: I’m building a simulator. As you can see in the screenshot, it simulates a bunch of different characters as they go about their days. Tom gets up, goes to work, works, and comes home. Each character is simulated (although the user only sees the actions of the character that currently has the focus). Over time, the simulation will get better and more detailed. Random events will occur during the day, and characters will react to them based on their profiles. Adventures will happen.

Once I have a good simulator I’ll be most of the way to a book generator. After all, a book in its most basic form is just a listing of events that happened to someone. Once I have the events, it’s just a matter of generating the right prose to describe those events, and that is a very doable task.

I’m not claiming that these randomly generated books are going to be Shakespeare or win any awards, but I think that if the simulation is good the books will be somewhat decent. It’ll be an interesting experiment.

Ultimately I would like to go beyond books and offer users an interactive experience. Instead of reading a story, you could experience it. You could make choices and see what happens next. Instead of reading the adventure you could have the adventure. What would really be neat is if you could take part in an interactive world that simply Keeps Going On.

All of that is pretty far away, though – but the first steps toward that have been taken. I am hoping that more steps will follow, in time.

Comments are closed.