More Wacky Programming Experiments

Aaron Logue 2003

This is a simple Belief/Desire/Intent agent system to run characters around combined with a primer-style sentence generator. The idea was to try to generate simple random stories using an actor AI mechanism a little like what The Sims use to drive their characters around.

Examples of some of my finer randomly-generated literary works:

The Never-Ending Adventures of Ig And Mo
By a Million Monkeys

Mo is a black and white cat.
Mo walked to the kitchen.
There was a water dish in the kitchen.
He drank.
He sauntered to the bedroom.
Mo hid under the blanket.
He slept.

The end.
    
Halliburton's Big Contract
By George W. Bush

Joe served in the Iraq war.
He remembered the Iraqi girl.
Joe remembered the shooting.
He stumbled to the gutter.
He threw up.

The end.
    

A sample run of the command line version of the story generator...

$ ./story
A character can be in the kitchen.
A character can be in the bedroom.
A character can be under the blanket.
A character can be on a lap.
There is a water dish in the kitchen.
There is a blanket in the bedroom.
A character can purr or be purring: The character purred.
A character can jump or be jumping: The character jumped.
A character can hop or be hopping: The character hopped.
A character can walk or be walking: The character walked.
A character can wander or be wandering: The character wandered.
A character can saunter or be sauntering: The character sauntered.
A character can meander or be meandering: The character meandered.
A character can burrow or be burrowing: The character burrowed.
A character can crawl or be crawling: The character crawled.
A character can hide or be hiding: The character hid.
A character can drink or be drinking: The character drank.
A character can sleep or be sleeping: The character slept.
A character can fall asleep or be falling asleep: The character fell asleep.
Characters may take action if they feel thirsty.
Characters may take action if they feel sleepy.
Characters may take action if they feel cold.
If a cat is drinking near a water dish it will feel less thirsty.
If a cat is sleeping it will feel less sleepy.
If a cat is falling asleep it will feel less sleepy.
If a cat is under the blanket it will feel less cold.
If a cat is under the blanket it will feel more thirsty.
If a cat is on a lap it will feel less cold.
A cat is affected by 6 things.
A cat believes jumping onto a lap while in the bedroom will make it less cold.
A cat believes hopping onto a lap while in the bedroom will make it less cold.
A cat believes walking to the kitchen will make it less thirsty.
A cat believes sauntering to the kitchen will make it less thirsty.
A cat believes meandering to the kitchen will make it less thirsty.
A cat believes wandering to the kitchen will make it less thirsty.
A cat believes drinking with a water dish near will make it less thirsty.
A cat believes walking to the bedroom will make it less sleepy.
A cat believes walking to the bedroom will make it less cold.
A cat believes wandering to the bedroom will make it less sleepy.
A cat believes wandering to the bedroom will make it less cold.
A cat believes sauntering to the bedroom will make it less sleepy.
A cat believes sauntering to the bedroom will make it less cold.
A cat believes meandering to the bedroom will make it less sleepy.
A cat believes meandering to the bedroom will make it less cold.
A cat believes burrowing under the blanket with a blanket near will make it less sleepy.
A cat believes burrowing under the blanket with a blanket near will make it less cold.
A cat believes crawling under the blanket with a blanket near will make it less sleepy.
A cat believes crawling under the blanket with a blanket near will make it less cold.
A cat believes hiding under the blanket with a blanket near will make it less sleepy.
A cat believes hiding under the blanket with a blanket near will make it less cold.
A cat believes sleeping while under the blanket will make it less sleepy.
A cat believes falling asleep while under the blanket will make it less sleepy.
A cat believes sleeping while on a lap will make it less sleepy.
A cat believes falling asleep while on a lap will make it less sleepy.
A cat believes purring while on a lap will make it less thirsty.
A cat believes purring while on a lap will make it less cold.
A cat believes 27 things.
Ig is is a black cat that lives in Storyland.
Mo is is a black and white cat that lives in Storyland.
The Never-Ending Adventures of Ig And Mo
By a Million Monkeys

Mo is a black and white cat.
He sauntered to the kitchen.
There was a water dish in the kitchen.
Thirst drove him to drink.
He meandered to the bedroom.
He hid under the blanket.
Mo fell asleep.
Ig meandered to the kitchen.
A water dish was nearby.
Thirst drove him to drink.
Ig walked to the bedroom.
He hopped onto a lap.
He fell asleep.

The end.
$