Friday, June 29, 2012

Novel.js


About five months ago my amazing wife told me to write a novel about asteroid miners and publish it through the Kindle store, which I thought was a great idea, but every November I try and fail to write a novel for NaNoWriMo, so I knew that going about things from the usual angle wouldn't cut it.

So I started working on a tool that would do some of the heavy lifting for me. 

There are lots of things that have to come together for a novel to work. Some of these (like writing good sentences) are really hard to get a computer to do well, and some (like keeping track of the interactions of a cast, organizing biographical information, and making assertions about how characters with different personalities will interact) a computer can do...decently...

So I wrote Novel.js to do some of the things that computers do well, so I could spend my time doing the things computers don't. 

The app will give you a basic outline of a story, essentially a series of writing prompts, and you - the real writer - fill in the interstices (or put together the puzzle) with the story you want to write. 

It's not a blank page, and I like that.

P.S.

The mystery stuff isn't terribly intuitive, so a brief explanation: each important element in the story gets a secret (you'll have to come up with the secrets) and over the course of the story, there's the potential for these secrets to be disclosed. 

"Mystery: declaration" reveals to the reader that there's something more to the character/ship/company/foundation/church than meets the eye. 

"Mystery: clue" gets you closer to the truth, while "mystery: deception" misdirects.

"Mystery: revelation" discloses the secret, while "mystery: inversion" means the not only was the secret not what you thought it was, the way you asked the question was exactly backwards, and led the reader away from the truth.

I might get into the details of how I put all this together in a later post, and I definitely want to polish it a bit more, but after working on it (and going down so many blind alleys) for the last 5 months, I just wanted to finally make it public.

Enjoy.

Tuesday, June 26, 2012

Saturday, June 9, 2012

Darwin Among the Colors



I'm kind of in love with evolutionary algorithms. They're a great way to extend human creativity beyond the scope of what we're familiar with to the exotic places beyond; they're like kids without assumptions or preconceived notions about how things should be, and when you build one to solve a problem, it will always surprise (and often confuse) you with the solution it comes up with.

It does me, at least.

Darwin Among the Colors is a very narrow ai, built around an evolutionary algorithm that learns what colors you like, and composes color schemes based on progressively refined combinations of those colors.

Developers can use it to get around the need to understand color theory, designers (internet and otherwise) can use it to explore parts of the color terrain that may be unfamiliar to them.

The great/odd thing about Darwin (and these sorts of programs in general) is that they don't require you to be creative to produce creative products, they just respond to your sense of taste.

Not everybody's an artist, but (whether you like it or not) everybody's a critic, why not use that to your advantage?

On a technical note, I wrote Darwin in Javascript with jQuery and a library called jStorage to handle the limitations of HTML 5 local storage. It's probably the most elegant code I've written so far, with a more explicit MVC in the back, and none of my custom stuff's been minified, so it should be easy to understand if you want to take a peek or even copy the whole thing.

I plan to write a second edition that doesn't just consider the individual colors themselves, but the differences between the rgb values within a preferred color scheme, just in case you want to scoop me.

Have fun.