Code Monkey home page Code Monkey logo

the-swallows's Introduction

The Swallows

See also: NaNoGenLab (2014) ∘ MARYSUE (2015) ∘ 2017 Entries2018 Entries2019 Entries


The Swallows is a series of computer-generated novels meta-written for NaNoGenMo 2013 by Cat's Eye Technologies. Our submission issue can be found here.

The Swallows is also the name of the first novel in the series. It follows the madcap adventures of Alice and Bob as they both try to acquire the golden falcon, which is priceless, or at the very least irrationally desirable by all involved.

The Swallows of Summer, the sequel to The Swallows, revisits Alice and Bob's life three years later. They have a much bigger house now. They also own more things.

Swallows and Sorrows, the third book in the series, shows us another period in Alice and Bob's life, not much later. They have taken up drinking — at least when they are disturbed by things — to calm their nerves. And then they start arguing. Oh, and the narrator knows how to use pronouns now.

The fourth novel, Dial S for Swallows, probably takes place shortly thereafter, or possibly at the same time as Swallows and Sorrows but in an alternate universe. Alice and Bob are no longer psychic (although this may not have been apparent in the previous books, the fact is that they were easily able tell what the other was thinking. Now, they only have suspicions. Also, the previous editor was sacked, and a completely new editor installed in their place.)

All four novels can be found, in Markdown format, in the doc subdirectory of this distribution.

At 49K words (in 15 chapters of 33 paragraphs each,) The Swallows is not quite long enough to qualify for NaNoGenMo. At 53K words, The Swallows of Summer is. Swallows and Sorrows is just barely over 50K words. Dial S for Swallows is over 56K words.

All novels were generated by the Python script the_swallows.py in the script directory, at different points in time. See the repository history to get the version of the script used for a particular novel.

I invite the reader who is interested in how the script works to read the source code. It sometimes even contains comments.

the-swallows's People

Contributors

cpressey avatar michaelpaulukonis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

the-swallows's Issues

Posessives in dialogue

It would be nice (although less hilarious) if it was smart enough to know how to use the words "my" and "your":

Alice pointed the revolver at Bob. 'Tell me where you have hidden the golden falcon, Bob, or I shall shoot you,' she said. 'Please don't shoot!', Bob cried, 'it is in Alice's bed'.

Alice pointed the revolver at Bob. 'Tell me where you have hidden the golden falcon, Bob, or I shall shoot you,' she said. 'Please don't shoot!', Bob cried, 'it is in his bed'.

Topic queue (or priority queue) (or something)

Currently, when an Animate talks to an Animate, the receiving Animate's "topic" is set (and the next time they take a turn, they respond to that topic.)

When there are only two characters, this is not a huge problem.

But if there are three characters, and two characters talk to the third, the third will only remember (and respond to) the last one who talked to them.

Otoh, remembering and responding to everything every other character said to you isn't realistic either and could, I imagine, easily balloon out of control. The "best" solution would be to prioritize it somehow, based on what's most attention-holding to that character. (and I think we can assume that being held at gunpoint is fairly highly attention-grabbing, yes.)

"Bob was in the kitchen. Bob made his way to the kitchen."

This should be replaced by "Bob was in the kitchen. Bob wandered around for a bit, then went back to the kitchen."

This should be done, probably, by recording both start and end locations on events that involve travelling from one location to another. Then have an Editor pass that looks for events where start location == end location, and rephrasing them.

Depends on #5.

Dialogue is not character-dependent

That is to say -- you can't set conditions for a specific character to speak a certain way.

I don't mean "in French" (per se), but to use different words or phrases.

All dialogue seems to be handled by... different parts of the Character class

  • move_to
  • live
  • converse
  • discuss
  • decide_what_to_do_about
  • converse

... and are not externally exposed (are they?), so they can't be modified/extended without modifying core code.

At any rate -- these notes are for making your engine more generic for my potential purposes and not making it more useful for your definite purposes. So it goes.

Parse command-line arguments in driver scripts

Driver scripts (in script/ and eg/) can pass various options to the Publisher, and you can edit the script to pass different options, but it would be really nice to be able to just pass command-line options to the script (like: script/the_swallows.py --debug --chapters=1000) and have it pass those on to the Publisher.

Events should have "public" and "private" aspects.

Events should have both "private" and "public" aspects, although either aspect could be optional. When they appear in a paragraph, if it is written from the event-initiator's point of view, use the private aspect. Otherwise, use the public one.

Examples:

  • "It was so nice being in the kitchen again!" is private; the public aspect might be "Alice was clearly overjoyed to be in the kitchen again."
  • "Alice thought she heard something." is private; the public aspect might be "Alice moved her head suddenly, as if she had heard something in the distance."
  • "Bob saw Alice." is private; the public aspect might be "Bob looked at Alice."

Or again, just to emphasize, there might not be a public aspect for an event, in which case it should not appear if the paragraph is written from some other actor's point of view.

Rewrite Editor to use multiple passes over a paragraph

The first version of the Editor did look a lot like a peephole optimizer, but modern compilers are often written in a "broad" fashion, where (with the benefit of lots of resources like memory) they make multiple passes over the code, with each pass focusing on one particular transformation. The Editor could really use the same approach, since efficiency is not really an issue, and the current code is really pretty confusing, as it tries to make several transformations in a single pass.

Allow specific random seed to be chosen by user

...so that you can generate the same story over and over again. Mainly for debugging. Debug output should include the random seed that was used. In conjunction with #7, using this might look something like: script/the_swallows.py --seed=71521.

The Horror. The Horror.

Sometimes, running unmodified (or modified) the swallows++.py an error will be thrown having to do with a Horror object.

These error are intermittent.
I ran the output 11 times successfully before encountering this error:

D:\Dropbox\projects\The-Swallows\eg>"the_swallows++.py" > output.txt
Traceback (most recent call last):
  File "D:\Dropbox\projects\The-Swallows\eg\the_swallows++.py", line 45, in <module>
    publisher.publish()
  File "D:\Dropbox\projects\The-Swallows\eg\..\src\swallows\engine\events.py", line 212, in publish
    actor.live()
  File "D:\Dropbox\projects\The-Swallows\eg\..\src\swallows\story\characters.py", line 153, in live
    return self.converse(self.topic)
  File "D:\Dropbox\projects\The-Swallows\eg\..\src\swallows\story\characters.py", line 302, in conve
rse
    decision = self.what_to_do_about[topic.subject]
KeyError: <swallows.engine.objects.Horror object at 0x000000000231B240>

I was not able to get the error to occur when running with debug=True although maybe I could have run it more times; I ran it about 30 times and gave up; after commenting debug back out... I got the error in about 8 runs.

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.