The Teller - Experiments with Computer Generated Sex Stories

by Will Somers

Describes some experiments in the late 1980s and early 1990s that tried to automate the production of erotic stories. The experiments unexpectedly involved AI, automated reasoning, and knowledge representation.

From

Everybody has their own hot buttons. I enjoy the sight a woman dressed in a loose fitting blouse and short, flared skirt with lacy lingerie peeking from underneath. Or the way her pretty breasts woggle under a silk charmeuse nightgown as she slides into bed with her man. Silky fabrics can arouse both partners as they get down to the serious stuff.

Of course erotic stories, pictures, and videos, are all fun. But anything gets boring when you know it by heart. A story about some guy eating his girlfriend through the crotch of her nylon panties might be a turn-on the first few times you read it (if you like that kind of thing) but not after you’ve memorized it. Sure, the wistful model in the Victoria’s Secret silk chemise is lovely, and the subtle points made by her nipples beneath the soft fabric are incredibly erotic, but not after the image has melted into your brain.

Eroticism thrives on variety. The new and different story grabs our interest, like the redhead replacing the blonde in the photo spread.

Once I got my own computer (they were called home computers back then), I started writing my own erotic stories. Most of the time I took stories I'd read in magazines and, later, stories picked up off the Internet, and change them to suit my taste at the moment. I chose to edit stories instead of, say, editing pictures or video, because personal computers couldn't do a decent job of it back then. Text editing was no problem, of course.

After a while I realized that I didn't really want to write stories like that, I wanted to read them. And I realized this was something I could teach the computer to do. When I was caught in a boring job for a few years, I entertained myself by writing the Teller: a program to write erotic stories for me. I took a collection of erotic stories, I annotated and arranged them so the Teller could understand what was happening, more or less, and then I had the Teller generate similar stories which featured different girls with different hair wearing different clothing or lingerie.

The Teller was a challenging bit of programming. At first I thought I could do something akin to "mail merge" in which I just substituted a girl's features in a story with randomly selected new features. Left to its own devices, however, the Teller would often tell the same old stories. As I tried to make the storytelling more flexible, I first ran into problems with stories being told out of sequence: starting with the heavy stuff and "progressing" to foreplay. Then I ran into problems with getting the girls in and out of their clothes - the Teller's stories were either bizarre or ridiculous until I explained how womens' clothing worked. This led me to use techniques from artificial intelligence: symbolic reasoning, inferencing, and knowledge representation. The results were better, but then the Teller started producing stories with mixed points of view: one paragraph would be the girl in first person, then the guy in third person, then the guy in first person, and then the girl in third person. That took even more tinkering.

It's been about fifteen years since I last worked on the Teller. I've pieced together this description from fragments of the original software, from handwritten journals I kept, and from pieces of a draft paper I started. I saved some sample story output, but those examples give only snapshots of what it achieved, depending on what was working. At times I can't quite believe the claims I see in the draft paper, or the commentary in my journals. I'm not the sort of person to make up things like this.


Introducing the Teller

If it's not already clear from my tastes, let me admit it: I'm a boomer. I grew up in the '50s and '60s when the topic of sex went from total suppression to total freedom. My dad had a stash of Playboys, but I mostly relied on lingerie ads for adolescent arousal. I discovered the erotic power of the written word while babysitting for a neighbor who subscribed to Eros, Ralph Ginzburg's trailblazing "art magazine of love and sex." Unlike Playboy, Ginzburg focused more on sexually charged stories and articles than on photos. I was mesmerized.

The magazine Penthouse appeared around the time I started college, and I developed a strong taste for their "Forum," which was a monthly collection of “letters from readers.” Thinking back, I suppose that most of the stories were pure fantasy, but they were very entertaining fantasies. I’d treasure the good ones, saving them to enjoy time and again. I loved reading a story about about some guy seducing his pretty cousin in her summer nighty or about a date with some foxy chick who had waist length black hair and a dynamite miniskirt.

And, of course, the same old stories got old after a while. Why couldn’t the pretty cousin wear something else, like that silk chemise in the Victoria’s Secret catalog? And why couldn’t she have blond hair like the lingerie model? Before I knew it, I was writing my own stories, mostly by rewriting other ones I’d seen and enjoyed.

Writing and rewriting stories was fun for a while, but it was the wrong kind of fun. It was too mechanical. So I turned to my computer.

In college I took a lot of programming classes. I learned all about symbolic substitution - where you'd take a script like you might use for mail merge and write a program to substitute symbols or tags in the script with actual names and addresses. I learned about symbol manipulation and - best of all - I learned a few things about "AI" - artificial intelligence. AI tried to make computers do things that seemed distinctly human, or at least non-mechanical. One of the problems we studied was how to get a computer to write fictional stories. The high end researchers wanted to produce high quality writing, of course, and that was a real challenge. But then I thought about porn.

During a summer job the year before, I had encountered cheap, low quality porn novels. The night time security guards kept a stash of porn in their desk, and I borrowed bits of it when I could. I fondly remember a particularly naughty little paperback called Daddy's Girls: a tale of preteen, teen, and adult sex, mixed with a heavy dose of revenge. No, I wasn't impressed by the depth of the characters, or the intricate plotting, or the quality of the descriptive prose. This wasn't Shakespeare, or even Jane Austen. Quite the opposite: I was astonished at how excited I could get from such incredibly bad writing.

I was sure a computer could do at least that well. But I wasn't sure how to do it, and I didn't have the skills till I finished grad school.

I eventually finished grad school, and a few years later I was caught in a boring job for a government contractor. They didn't have any real work for us, so we just worked on "internal R&D"  projects of no particular value while the management cast around for a government contract. Sitting on my desktop was a fairly powerful workstation with the latest version of Common LISP, the lingua franca of artificial intelligence.

Idle hands will always find something to do, and I started working on "The Teller."

The goal was for the Teller to generate new erotic stories from old ones, and dress the girls up in interesting clothes. It would automate the work of rewriting old stories to make them newly interesting. I wanted the girls to to wear sexy things from fashion advertisements I'd seen, and step into stories that turned me on. The Teller would let me choose the girl's clothing all the way down to the fabric and color of her panties (cream colored nylon satin with lace inserts, by Lily of Paris). I could specify the girl's general age, bust size, hair length, hair color, and so on.

I didn't worry too much about the quality of the writing since, as I'd learned from reading Daddy's Girls years ago, I'd probably get excited even if the writing was awful. I wanted to be able to say who the story was about, and what she was wearing, but beyond that, I figured any badly-written sex play would be entertaining.

Even assuming bad writing, this posed a bit of a challenge.


How I built it

Here is what I did:

  1. I collected a bunch of erotica I'd written, rewritten, or copied from other sources, and I formatted it in a special way. The Teller used the special format to replace the girl in the story with someone else, or at least with a different name, hair color, clothing, and so on.
  2. I broke the stories up into individual steps, or actions, according to the sex play that was going on. This allowed me to substitute, say, a blow job description in one story for a blow job description in another, so that stories would seem different even when the same old things were happening.
  3. I built some procedures to stitch together a series of sex scenes in a plausible order. In other words, I had to teach the computer about sex.
  4. I built procedures to rewrite the erotic stories so the girls in the story could wear different clothing. Sometimes I wanted to choose the clothes myself and other times I wanted the Teller to choose for me. Basically, I had to teach the computer about womens' clothing.
  5. After some experiments, the computer got the actions right in general, but occasionally repeated things in weird ways. So I had to teach the computer even more about sex.
  6. Some of my favorite stories involve making out with a partially (un)clothed woman. To make this work, the Teller had to really understand how clothing worked. The girl would start out with some, or most, of her clothes on, and would lose this bit or that as the action progressed. This turns out to be a full-fledged problem in artificial intelligence, symbolic reasoning, inferencing, and knowledge representation. Basically, I had to teach the computer about stripping.

Teaching the computer about sex

First, I had to teach the Teller about sex. Well, at least it had to know something about erotic stories.

I started by giving the Teller a collection of sex stories (mostly fantasies, I have to admit) that I’d either adapted from elsewhere or written about girls I had known over the years. Each story was different: sometimes the couple indulged in oral sex, sometimes the girl was on top, and she was often (but not always) wearing some clothes or lingerie when they really got it on. I arranged the stories in "paragraphs" so that each paragraph involved a different lovemaking activity like kissing, fondling breasts, fondling genitals, sixty nine, intercourse, orgasms, and so on. The first paragraph of each story would put the guy and girl in some comfortable, secluded spot. In the next paragraph they’d start kissing and start some foreplay. Each time the action shifted gears I’d start a new paragraph.

From there the Teller could almost print out erotic stories by picking paragraphs from its collection and stringing them together. But not quite. It still didn’t know what order things belonged in. Naturally, we all know that the Big Orgasm should happen near the end rather than the beginning, but the Teller didn’t know that yet. In fact, there was nothing to keep it from creating a story with paragraph after paragraph of kissing (or orgasm) descriptions and nothing else. Or a story where the participants screw their brains out in the first paragraph, start kissing in the next, and are introduced, fully clothed, later on.

I solved the problem by programming the Teller to look at the stories in its collection and follow the story lines it found there. This worked rather well at first. The Teller would start a story by picking an introductory paragraph from its collection. The paragraph would suggest the type of action that should occur next (usually kissing or light foreplay at the beginning) and choose that type of paragraph from its collection. As the story progressed, the choices of action got heavier and heavier. Each time, however, the Teller was only allowed to follow a story line from its collection. For example, none of the stories I wrote start right off with intercourse, or with the girl immediately going down on the guy, so the Teller never told such a story.

Given below is a typical story line from the Teller's story collection. Each bullet summarizes a paragraph of action in the story:

The Teller couldn't tell anything useful about the stories by just analyzing the raw prose. To simplify its job, I marked each paragraph with a brief phrase describing action taking place, an action phrase. For example, I described the story line above with the following action phrases:

The action phrases are the key to making the Teller work. Each story in the Teller was broken into paragraphs, and each paragraph carried an action phrase. The Teller used the action phrases two ways:

The Teller built its stories one paragraph at a time. Every story started with some sort of introduction. For example, the first paragraph might describe how the couple goes back to the girl’s hotel room. Then the Teller asks itself, “What might happen next?” As experienced humans we all realize that foreplay often begins with kissing, but the Teller doesn't have our knowledge. All it has to go on is its built-in collection of stories.

To choose the next paragraph, the Teller looks at every introductory paragraph in its collection and sees what kinds of actions might come next. It sees that kissing action generally follows the introduction, so it randomly chooses a paragraph about kissing and uses it as the second paragraph. There were a lot of kissing paragraphs to choose from, since most stories started out with kissing. All the Teller had to do was look at a paragraph's action phrase to see if it was about kissing. Then it randomly chose one of the paragraphs with kissing action to be the next one in the story.

Now things start getting complicated. The Teller didn't just follow the story line from one of its stories. Instead, it used the stories as guides to help it navigate from one sex action to another. The Teller might start with a "cousin" story set in a boy's bedroom, but the next paragraph (about kissing) might come from the story about the teen girl working part-time at the office. The third paragraph could also come from any story, but only as long as the paragraph's action "makes sense" to the Teller. To "make sense," the Teller has to have a story where the paragraph's action follows a paragraph of kissing.

To choose the third paragraph, the Teller looks at every paragraph of kissing action in its collection and sees what kinds of actions follow kissing in its stories. Let's assume that the Teller has stories in which kissing is followed by the following actions:

We know, of course, that there are lots more possibilities, but let's assume that the Teller has a limited set of stories, and these four actions are the only ones that follow kissing in the Teller's collection. If that's the only information the Teller has to go on, then the Teller will only tell stories in which those four actions follow kissing.

Once the Teller has made a list of the actions that follow kissing, it searches its stories and makes another list containing every paragraph describing one of those four actions. Then the Teller chooses the story's next paragraph from that list of paragraphs. The Teller picks the paragraph randomly; so if it is a description of breast fondling, it probably comes from a different story than the first paragraph. This lets the computer tell a variety of stories instead of repeating the same ones over and over.

The Teller faced more and more choices as a story got longer. In some stories breast fondling was followed by feeling the girl up, and sometimes by her feeling him up, and sometimes by cunnilingus. Each time, the Teller made a list of plausible paragraphs and then picked one at random to add to the story. This process repeated until there were no paragraphs that can follow the current one; usually after both partners have come. (I don’t have many stories in which the lovers come twice: I’m usually exhausted after their first orgasm).


Teaching the computer about womens' clothing

Of course, it wasn't enough to just mark the paragraphs with the action being performed and string them together. It wouldn’t make sense to fondle Dorothy’s breasts through her lacy nylon nightgown in the one paragraph and then lift the hem of Robin’s pleated green cheerleader skirt in the next. The Teller needed to select clothing for the girl to wear and it had to insert those clothes into the story.

To do this, I reformatted the stories, replacing names, articles of clothing, references to hair, and other changeable features, with textual "tags." Today such a thing might be done with XML; I was using LISP (which stands for "Lots of Idiotic and Silly Parentheses") as shown in the example below. Parts of the story were placed in parenthetized expressions. Actual text showed up in quotation marks and things to be replaced appeared as little symbols I called tags.

When the Teller began a story, it could randomly choose a girl’s name and general appearance. When it chose a paragraph to put into the story, the Teller would also choose appropriate clothing for the girl to wear from a built-in “wardrobe." Items of clothing from the selected ensemble would be filled in to the story as the Teller built it.

For example, one sentence might say:

(require skirt)
(text "With all of their wiggling and squirming, " hername "'s " skirt " was riding up her thighs.")

To generate this paragraph of the actual story, the Teller would substitute tags like hername and skirt with appropriate text. If the Teller (or the user) selected the name "Sally" for the story, then the Teller would substitute "Sally" for hername throughout the story. The tag (require skirt) warns the Teller that the girl needs to be wearing a skirt in this paragraph, and the (require skirt) tag is not included in the text of the story. The Teller substitutes skirt with descriptive information based on the skirt chosen for the girl from the wardrobe.

The stories found a variety of pretty clothes to choose from in the wardrobe. It was a hot girl's closet with no high-necked flannel nightgowns or sweat pants. Instead there were low-cut minidresses, revealing sundresses, babydoll nighties, and lingerie. There was lots of silk, satin, and lace. The general appearance, color, fabric, and feel of each item was fondly described for the Teller’s benefit. Each item had at least one descriptive sentence that tried to relate the article of clothing to a real one. Items came from fashion magazines, Victoria's Secret, Frederick's of Hollywood, and other mail order catalogs. Some items came from my wife's closet.

Whenever it began a story, the Teller had to dress the girl in clothing that went along with the story’s first paragraph. Each paragraph is marked to show what kinds of clothing the girl wears in it. If the first paragraph needs the girl to wear a top, the Teller chooses something that hangs from the shoulders. It might choose a blouse, a camisole, a dress, or a nightgown.

The paragraph says so if it needs a particular kind of blouse, camisole, or other top; otherwise the Teller can dress the girl in anything that includes a top. Below are two examples of a paragraph that required a top and panties. In the first, the girl is named Anne and she wears a camisole and string bikini. In the second, the girl is named Amy and she wears a dorm shirt with tap panties.

Standing in front of the mirror, I had just lifted my razor when I caught sight of Anne out of the corner of my eye. She wasn't dressed yet, and was only wearing her teal blue nylon camisole and string bikini. I sighed inwardly. We were going to be late. She couldn't go dressed in her camisole, no matter how pretty she looked. Her lace edged camisole had tiny spaghetti straps.

Standing in front of the mirror, I had just lifted my razor when I caught sight of Amy out of the corner of my eye. She wasn't dressed yet, and was only wearing her mint green cotton dorm shirt and tap panties. I sighed inwardly. We were going to be late. She couldn't go dressed in her dorm shirt, no matter how pretty she looked. The worn nightshirt had a round neckline and little capped sleeves. The breathtakingly short hemline barely covered her bottom, and there was something undeniably sexy about the way the dainty but threadbare fabric clung to her curves.

Clearly, there's a lot more going on than just substituting top with "camisole" or with "dorm shirt." But that basic substitution was the essence of the problem. The rest was easy to do once the initial problem was solved.

Clothing choices were the most subtle decisions the Teller had to make, especially when they involved several items of clothing. Many paragraphs simply required a skirt and a top so the Teller could dress the girl in almost any outfit: a dress, a blouse and skirt, a teeshirt and miniskirt, or a nightgown. But the Teller generated several bizarre and hilarious stories before this worked correctly.

The Teller had a built-in model of how different articles of clothing were related. There were certain basic articles of clothing, like the top, skirt, and panties, and most articles of clothing were described in terms of those 3 pieces. A dress, slip, or gown consisted of both a top and skirt, and a teddy or 1-piece swimsuit consisted of a top and panties.

A skirt and top could be different articles of clothing, but not always. It was easy to fill things in with a randomly chosen skirt and blouse, but dresses and gowns were tricky. If the Teller chose a nightgown to be the top it couldn't choose a different a dress to be the skirt. Choosing a particular style, like a dress or nightgown didn't end the problem: if the Teller chose the scoop-necked blue nylon Miss Elaine nightgown for the top, it couldn't choose the cream satin Givenchy nightgown for the skirt.

The clothing choices got more complicated as a story progressed. Whenever the Teller chose the next paragraph in a story, it looked at what the girl had to be wearing in that paragraph. If the story so far had the girl dressed in a nightgown, then the next paragraph couldn't clothe her in a dress. The girl's clothing had to remain consistent. The Teller had to choose a paragraph in which the girl could at least start out wearing a nightgown.

Sometimes a paragraph talked about clothing the Teller hadn’t considered yet. For example, the story might not have said whether the girl wore panties under her nightgown. If the chosen paragraph needed to talk about her panties, the Teller would happily choose panties for her to wear. The Teller wouldn’t object to putting on panties under the girl’s nightgown since it was a plausible way for her to dress. Dressing the girl in an extra item of clothing was almost the same as picking her clothes at the beginning of the story. The only difference was that the Teller always checked its final choice against what she was already wearing. This prevented the Teller from dressing the girl in a teddy if she was already wearing a camisole.

What the Teller gave the girl to wear, the paragraphs could take away. After all, girls must take clothes off in erotic stories sometimes - that's part of the fun. Each paragraph ended with a list of clothing that the girl was no longer wearing. If the paragraph described the girl tearing off her blouse in a moment of passion, the detail would be dryly noted at the end of the paragraph for the Teller’s benefit. The Teller kept track of what the girl was wearing throughout the story and paid especially close attention to what she took off. It wouldn’t let her put things back on unless it was really part of the story.

The Teller eventually developed fairly good judgment about choosing clothes to match the needs of paragraphs, except for one detail: it had a hard time understanding layers of clothing. The Teller understood “wearing” and “not wearing” something, but the notion that the bra was “under” the blouse was a little too tricky for it. I gave up completely on allowing girls to wear slips with dresses, even though slips are a favored fantasy of mine. The Teller believed that the lower part of a dress was always a skirt and the lower part of a slip (or a half-slip) was also a skirt, and concluded it was silly to wear both at once.


Teaching the computer even more about sex

When I was a kid, we talked about sex play in terms of baseball:

The essence of computing is to give the computer a procedure to follow, and the baseball metaphor distills sex play into a 4-step procedure. Though sex play is more complex these days because of oral sex (thank you, Linda Lovelace, for showing us The Way), the Teller usually got the basics right by following the story outlines.

But not always.

One weirdness was that the Teller would sometimes get caught in a "loop." For example, one story might go like this:

while another story goes like this:

Given those choices, the Teller could readily produce the following story:

While a little of this might be ok, the Teller could easily construct a story that repeats the same paragraphs, essentially rehashing scenes that already appeared in the story. I toyed with a couple of different solutions. At one point I made lists of which actions could follow which, essentially saying that the guy (or girl) had to go first in some instances, just to prevent loops like that. This became a collection of story sequences that kept the action moving forward, as it were.

The story sequences had the benefit of ensuring that all stories made sense. Never again would a guy break off from fucking a girl to reclothe her and start licking her breasts. On the other hand, it limited the range of possible stories, since the action steps always followed a selected sequence. The girl usually got the best of it in my stories, since excited, happy girls make me excited and happy.

The Teller implemented story sequences using a state transition model, a computer science technique that's at the bedrock of computer circuit design and programming languages. The technique essentially reduced the plausible sequences to a formula that, while complicated at some level, wasn't hard to create. Click here to look at the model.


Artificial Intelligence and Clothing in the Teller

It was a lot easier to make sense of sex acts than to make sense of clothing. Lots of stories follow formulas, and it was relatively easy to cast sex into a formula. Clothing was much, much more complicated. Before I was finished, I had to solve problems in knowledge representation and automatic inference checking - fundamental concepts from artificial intelligence, or AI.

The Teller's approach to dressing girls was not an arbitrary decision. It was the result of about two years' worth of experimentation. It was easy to insert details about a girl's clothing into the stories, like what color nightgown she was wearing. The hard part was to get her properly dressed in the first place, and to let her disrobe in a sensible fashion as an erotic story unfolded. Here are some of the mistakes that popped up as the Teller evolved:

Essentially these problems reflect the mechanical complexity of clothes. It's not impossible to figure clothing out, but it's not trivial either. I tried various trivial approaches, and found that they really didn't work.

At first I assumed that the Teller would just construct a story out of a series of paragraphs, and not bother with choosing specific clothing until the story called for it. This is called late binding in the realm of computer science. I liked the idea because it promised me the most flexibility in constructing an unfolding story. That's when I started running into the problems listed above.

It was clear to me how to solve the problem: the Teller had to have a built-in understanding of how clothes work. I had to give the Teller the critical details about how elements of clothing worked, like each dress implicitly including a skirt and top, just like each one-piece swimsuit incorporated both a top and pants. There was the notion of one item covering another, and that some items could be lifted from the body, like a skirt's hem.

These properties all hooked into a story's action in one way or another. If a paragraph involved lifting a skirt so the guy could fondle the girl's crotch, then the Teller could use the information about clothing to realize that it could use a skirt, dress, or gown, since all included a skirt. Moreover, if the girl's crotch was covered by panties in the story, then the choice of skirt or dress didn't really affect that choice: panties formed a separate article of clothing.

To make this work I implemented an AI technique called inferencing. The technique works by providing structured information about a topic, like clothing. If the Teller knew that a girl was wearing, say, a dress, it could automatically figure out that the garment included both a top and skirt. This relied on a software procedure called an inference engine that analyzed facts to verify their consistency.

For example, imagine that a story is unfolding about a girl in a hotel room being visited by her boyfriend. It's morning, and she's still wearing the short little nighty she slept in. I've explained to the Teller that a nighty is like a dress: it has a top and a skirt. It has also been told that you can lift the hem of the skirt, but you can't lift the nighty's top all by itself. Along comes another paragraph in which the boyfriend lifts her top, reaches underneath, and caresses her breasts. The inference engine would see that the nighty is a type of dress, and that you can't lift the top of a dress, at least not like that. So the Teller would use its inference engine to realize that the paragraph won't fit the story, since there's no way to lift the nighty's top independent of its skirt.

At first, I gave the Teller information about clothing in a hierarchy. An example appears below. The hierarchy makes it clear that a nightgown includes both a skirt and a top. The inferencing engine would start with the fact that the girl wore a gown, and traverse the hierarchy to determine that the girl wore some clothing, that the gown included both a skirt and a top, and that the girl couldn't wear other skirts or tops while wearing the gown. I didn't have to explain this to the Teller about every gown and dress it owned. Once it was made clear what gowns and dresses were, and which articles of clothing were gowns and dresses, the Teller could figure out how to work them into the story.

The words in bold indicated facts that could be asserted as true, false, or unknown. True and false were denoted (+ fact) and (- fact), respectively. Unknown facts were simply not noted at all. If a girl wore a schoolskirt (+ schoolskirt), then we knew implicitly she was wearing clothing (+ clothing) ,and could not also be wearing a kilt (- kilt). We made these decisions by traversing the tree. If a girl was nude (- clothing), then she was wearing nothing that appeared in the hierarchy.

This is not the sort of AI that yields HAL 9000, not by a long shot. It's a pretty simple mechanism, and it was the first small step.

The whole point was to let the Teller choose a girl's clothes to match the early paragraphs in the story, and then to choose subsequent paragraphs based on what she was already wearing. To do this, each paragraph had special notations to indicate what the girl had to wear and the sex action that was going on. These notations were sorted into two lists: one described conditions at the start of the paragraph and the other described conditions at the end.

The conditions at the start were called preconditions, another term often used in AI and computer science. They summarized what had to be true for the paragraph to make sense in the unfolding story. These conditions were stated as a list of “facts” about the story: assertions as to what sex action was going on and exactly what clothes the girl was wearing. It also indicated things that were unknown (i.e. if the story had not yet indicated whether she wore panties or not, then that fact was unknown).

Once a story got going, the Teller kept a running list of facts about the story. When choosing the next paragraph for a story, the Teller checked the paragraph's preconditions. The preconditions told what facts had to be true for the paragraph to make sense if added to the story. If any of the preconditions contradicted a fact in the story, then the paragraph could not be used. For example, if the girl in the story was wearing a nightgown, but the paragraph required a camisole and panties, then the paragraph would be rejected.

The process of choosing the next paragraph often turned into a fairly lengthy search. The Teller would generate a list of every available paragraph. Then it would go through them and discard every paragraph that contradicted the current conditions in the story. For example, if the girl was not wearing panties (having taken them off) then it would discard all paragraphs that required her to wear panties. It would then choose the next paragraph from whatever ones were left.

In effect, the Teller was trying to guess how the reader would understand the story. It would try to guess what the reader expected regarding the girl's clothing and which sex acts made sense. If a paragraph said that the girl took off some clothes, or had an orgasm, then the story's facts had to change to reflect the story's action.

When a paragraph changed facts in the story, and they always did, these changes were collected in a list called the postconditions, another AI/computer science term. If the girl took off some clothes, the change appeared in the postconditions. Inevitably, each paragraph would yield progress in the process of seduction, and the postconditions would indicate any significant changes, like orgasms.

In many cases, a paragraph would introduce a fact that had not previously been established. To revisit an earlier example, a paragraph might require the girl to be wearing panties, and the story might not yet have noted whether or not she wore panties. If the new fact doesn't contradict an existing fact, then it gets established when the paragraph is added to the story.

This is where a lot of trouble arose.

Human beings who work a lot with logic have a clear notion of what a contradiction would be. A computer has no clue whatsoever, unless you give it a way to identify such a thing. So this was another place where the inferencing worked its way into the Teller. It's a lot easier to traverse a hierarchy and derive one from another than it is to identify a contradiction.

At first I thought it would be easy to find contradictions. The Teller would construct a list of known facts about the story, traverse the hierarchy to infer related facts, and then look for cases that say both X is true (+ X) and X is false (- X). It may sound easy, but it was a lot harder in practice. Inferences work differently when you're looking for contradictions. This led to girls finding themselves totally naked after removing only a single article of clothing, or their panties reappearing after they'd alrady taken them off once.

The solution was to use a different strategy to describe clothing. This delved into the AI topic of knowledge representation, I moved the Teller away from the simple, but misleading, hierarchy towards a frame-based knowledge representation that worked a bit more like an expert system. Although the interrelationship between frames (i.e. one each for skirt, top, dress, and for other specific garment designs) followed a hierarchy in some cases, the structure was a lot more complex than a simple tree. Also, the inference engine could interpret different interrelationships differently, and understand that some relationships implied shared facts (also called inheritance) while others might not share facts.

At this point, I realized I had something akin to a STRIPS route planner, a system developed in the 1970s at Stanford to help a robot named Shakey navigate through a suite of rooms. The difference was that the Teller was navigating through the very different geography of womens' clothing.

While I derived a bit of grim satisfaction from this analogy, it didn't mean I'd solved the problem. Quite the contrary. See below for a review of the Teller's real performance.


The Teller in Action: Experiments and Results

This section provides some details of the Teller's actual performance. First, we look at its reliability: how often did it crash versus how often did it yield a plausible story. Next, we look at actual examples of generated stories.

Reliability

When I did an experiment generating stories in mid 1990, here is what happened:


Story Title/Theme Successes Failures
Stuck at Work 2 stories in a mint green nighty 1 story in daywear
1 story in a pink nighty
Hotel Scene
4 stories
Tanned Legs 5 stories
Dropped By
4 stories

The Teller scored a success if it generated a complete story and the story made sense. It scored a failure if the story included some logical blooper or if the Teller failed to generate the complete story (i.e. all the way to orgasm). As the statistics show, the Teller wasn't even breaking even.

To make the logic work at all, I found I had to simplify, simplify, and simplify again. Ultimately I eliminated layering of clothing, which meant dresses had to be worn without bras (I didn't especially like bras anyway), and dresses could not be worn with slips (that was a disappointment). I organized all clothing around three major elements: the skirt, the top, and the pants. A girl could wear no more than one of each. This made it easier to add or remove the clothes, since the Teller didn't have to figure out the implications of layering, and possibly remove a slip before removing the dress covering it.

Example stories

In 1991, I started working on an article describing the Teller. I wasn't sure if the target publication would be an adult magazine, a science magazine (OMNI, a science magazine started by the publishers of Penthouse seemed like a good choice), or some sort of computing magazine. As part of the research for the article, I planned to generate a collection of stories and send them to several different mens' magazines, like Penthouse, that published letters of readers' experiences. I wanted to see how many Teller-generated stories, if any, would be accepted for publication.

I generated seven stories for the article:

demo01 | demo02 | demo03

demo04 | demo05 | demo06 | demo07

[Note: people familiar with the traditions of the Alt.Sex.Stories Text Repository (our esteemed patron) will recognize that these files are not formatted the way ASSTR stories should be. They appear exactly as they were generated by the Teller with nothing added or changed. They are intended to be technical examples, not stories.]

The good news was that the stories were different enough to show that a lot of the Teller was working.

The bad news was that the stories were not great stories.

Also, some of the demo stories were too similar to other demo stories to be sent to different magazines for publication. Ultimately I never sent the stories to magazines, nor did I finish and publish the article. I recycled bits of the article's draft to produce this description of the Teller.


Swan Song - The Teller Sleeps

Ultimately the Teller succumbed to a combination of bit rot and neglect. I kept working on it, on and off, after leaving the boring job where I had started the work, but I was stuck having to pay for software upgrades to keep the programming environment up to date. Eventually I got tired of paying for upgrades, and the software languished. By then it was more entertaining to look for new stories on the Web than it was to try to generate my own. I still work for a government contractor, but nobody uses Lisp for real work around here any more.

And that's how things stand today. Sometimes I download someone else's story and entertain myself by clothing the girls in something I like better, or changing hair color. Other times I write my own stories from scratch, but that's a different kind of entertainment entirely.

Someone will undoubtedly ask if it's worthwhile to try to ressurect the Teller and make it work. The answer is this: It depends on what you want it to do! If you want to generate stories similar to the demo stories above, then it might not be too difficult, that is, if you are proficient in Common Lisp and want to wade through a few thousand lines of someone else's Lisp code.

It will take more work, mostly clerical, to give the Teller more stories to work from. You will have to take existing stories, reformat them to fit into Lisp "s-expressions" in which the text is in quotations and symbols, like character names and clothing descriptions, have symbolic names. It's laborious and a pain in the neck, but it's possible.

If you want to change the model of sexual activity to include a broader range of possibilities, like the man coming first, or anal sex, or gay sex, then you'll have to be creative. The model is specified entirely in terms of s-expressions, so it's easy to modify, assuming you know what changes will make sense.

Personally, I believe it makes more sense to look on ASSTR for appealing stories written by live humans than to try to get a computer to spit them out for you. Humans are much, much better at this sort of thing. Once you've read a few of the Teller's stories, you'll realize how much alike they'll all sound.

Creative Commons License
These works by Will Somers are licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

click here for more information on reproducing or reusing Will Somers' work

Warning Page (link here!)

Will Somers Index (adults only!)