Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI-designed, AI-generated novel-length story generator #6

Open
cpressey opened this issue Oct 16, 2024 · 6 comments
Open

AI-designed, AI-generated novel-length story generator #6

cpressey opened this issue Oct 16, 2024 · 6 comments
Labels

Comments

@cpressey
Copy link

cpressey commented Oct 16, 2024

People have in past NaNoGenMo's used LLMs to generate novels, but this plan is different. Coding-assistant AIs are now good enough that they can generate substantial amounts of runnable code. I plan to talk Claude Sonnet 3.5 into designing and generating a program that will generate a story, and then, without making any manual changes to that program, run it to generate a 50,000+ word novel.

@nmifsud
Copy link

nmifsud commented Oct 19, 2024

Previously: NaNoGenMo/2022#15

@cpressey cpressey changed the title AI-generated novel generator AI-generated novel-length story generator Oct 19, 2024
@cpressey
Copy link
Author

Previously: NaNoGenMo/2022#15

Thank you. I've made some small edits to this issue, to emphasize how much this space has changed since 2022.

@cpressey
Copy link
Author

Meanwhile, from the "cheating non-entry" department, based on an idea that I've had for ... a number of years now, I threw together this:

https://static.catseye.tc/lab/LiveMarkov/

The relevancy to this issue, is that its code was 99% generated by Claude Sonnet 3.5. I made only a few tweaks to it by hand. I probably could have made those tweaks by prompting. But having already run down a number of blind alleys, I didn't really have the patience. If I'm planning to do this novel generator entirely by AI, with no hand tweaks whatsoever, then I'm going to have to deal with this effect.

@cpressey cpressey changed the title AI-generated novel-length story generator AI-designed, AI-generated novel-length story generator Nov 4, 2024
@cpressey
Copy link
Author

cpressey commented Nov 4, 2024

I'm about ready to make a progress report on this, but first, I've edited the issue again to clarify the approach, which I didn't really consider thoroughly before starting. I made the mistake of giving the darned thing creative control. At the outset, I asked it to design a program to generate a novel - and of course it took "novel" to have its usual meaning, not its NaNoGenMo meaning - and to produce an architectural document describing the design. And then, to follow that document to create the implementation.

So this is not just an AI-generated novel generator; it is an AI-designed novel generator too.

And of course this turns out to not really be a "mistake" at all - it's been quite entertaining to see what its idea of a novel generator involves.

So far it has generated 3481 lines of Python code in 36 source files. (Well, actually, rather more than that; these are just the ones that survived.) This is the result of 11 conversations consisting of 21821 words in total (according to wc -w).

And this code does run, and does produce output. Here is the novel it currently generates, in its entirety:

The Conflict

Chapter 1: Chapter One

Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue"

Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue"

Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue"

Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue" Basic description. Basic action. "Basic dialogue"

@cpressey
Copy link
Author

cpressey commented Nov 5, 2024

Hey, this is great. I should just stop here.

The Conflict

Chapter 1: Chapter One

The background noise creates a typical scene Nearby, The default_location is filled with everyday sounds Protagonist takes a moment to contemplates Then, After pausing, protagonist reviews protagonist spoke, "Let's review what we know about our position."
In a neutral voice, protagonist spoke, "What do you make of our position?"

A chair sits prominently in view Nearby, A light sits prominently in view After pausing, protagonist organizes Without hesitation, After pausing, protagonist reviews protagonist replied, "Tell me more about our position."
Breaking the silence, protagonist spoke, "What do you make of our position?"

The background noise creates a typical scene Nearby, The default_location is filled with background noise Protagonist reviews the calendar Gradually, After pausing, protagonist contemplates protagonist replied, "What do you make of our position?"
In a neutral voice, protagonist spoke, "Tell me more about the situation."

The background noise creates a typical scene Throughout the space, A chair sits prominently in view

Protagonist takes a moment to discovers Suddenly, Catalyst_character takes a moment to encounters

protagonist hissed, "What do you make of this discovery?"
Breaking the silence, catalyst_character hissed, "What do you make of these irregularities?"

A light sits prominently in view At the same time, A light sits prominently in view

After pausing, catalyst_character discovers Without hesitation, Protagonist takes a moment to encounters

catalyst_character hissed, "Let's review what we know about these irregularities."
After a pause, protagonist whispered, "Let's review what we know about these irregularities."

A chair sits prominently in view At the same time, A light sits prominently in view

Protagonist takes a moment to encounters Then, Catalyst_character realizes the light

protagonist whispered, "Tell me more about what we found."
Finally, protagonist hissed, "What do you make of this discovery?"

The default_location is filled with ambient light Meanwhile, A desk sits prominently in view Protagonist takes a moment to struggles with In response, Mentor takes a moment to decides about protagonist stated, "What do you make of our options?"
Breaking the silence, protagonist replied, "Let's review what we know about our next move."

The default_location is filled with background noise Meanwhile, The default_location is filled with ambient light Protagonist takes a moment to decides about In response, Protagonist decides about the chair mentor spoke, "Tell me more about what this means."
After a pause, protagonist spoke, "Let's review what we know about our options."

A light sits prominently in view At the same time, The default_location is filled with background noise After pausing, mentor reflects on In response, After pausing, mentor reflects on protagonist stated, "What do you make of what this means?"
Finally, protagonist stated, "What do you make of what this means?"

The background noise creates a typical scene Meanwhile, The ambient light creates a typical scene

Protagonist takes a moment to confronts In response, After pausing, antagonist faces

antagonist whispered, "Tell me more about what we know."
Finally, protagonist muttered, "Tell me more about our evidence."

The background noise creates a typical scene Meanwhile, The default_location is filled with ambient light

Protagonist takes a moment to faces Then, After pausing, antagonist faces

antagonist muttered, "Let's review what we know about the truth."
After a pause, protagonist whispered, "Tell me more about our evidence."

The default_location is filled with tense silence Nearby, The ambient light creates a typical scene

After pausing, antagonist faces In response, Protagonist challenges the door

protagonist whispered, "Let's review what we know about the truth."
Breaking the silence, antagonist muttered, "Tell me more about the truth."

@cpressey
Copy link
Author

Hey, this is great. I should just stop here.

I was right. I should've just stopped there.

This is not fun. Or, idk, maybe it's some sort of non-Euclidean fun that I, as a mere human, cannot appreciate.

The occasional glimpses of seeing it work at a very high level...

(i.e. "You are a best-selling novelist working alongside an expert software developer. Here is a novel generator and here is a novel it generated. Critique the novel and recommend ways it can be improved. Pick one of those improvements and propose changes to the generator that would implement it." ... and it just goes and does that...)

...are outweighed by it taking days to talk it into fixing simple things like calling the protagonist by their name instead of calling them "protagonist" or figuring out why it suddenly stopped formatting text into sensible paragraphs and is now glomming it all into two giant paragraphs per chapter.

I am in the midst of that last thing and I'm not exactly thrilled to be spending my time (and the energy consumption of probably roughly 2 household A/C units) this way.

So here is are some updated results that date from a few days ago. 8539 lines of code in 72 source files. 53076 words in 34 conversations (though I have reason to believe that word count is an overestimate for technical reasons). Sample output:

The Resolve

Chapter 1: Chapter 1

The scene reveals: the coffee_shop is filled with natural lighting. Beneath the surface, The scene reveals: a calendar sits prominently in view. To begin, james brown takes a moment to approaches. After careful consideration, To begin, james brown approaches the chair.

The consequences become clear: the situation grows more urgent. Among the careful arrangements, The consequences become clear: tension fills the air. Finally, james brown realizes implications. With methodical precision, Finally, morgan williams shows growing concern. Piecing together the evidence, Finally, thinks about this is more serious than we thought. With methodical precision, Finally, thinks about we need to act quickly.

The scene reveals: the coffee_shop is filled with ambient light. Among the collected evidence, The scene reveals: the ambient light creates a typical scene.

To begin, james brown considers the desk. After careful consideration, To begin, james brown takes a moment to examines.

The consequences become clear: the situation grows more urgent. Among the collected evidence, The consequences become clear: tension fills the air.

Finally, james brown realizes implications. Following the clues, Finally, morgan williams shows growing concern. With methodical precision, Finally, thinks about this is more serious than we thought. After careful consideration, Finally, thinks about we need to act quickly.

@hugovk hugovk added the preview label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants