četvrtak, 31. ožujka 2016.

MagicRealismBot - A dictator owns a rose bush that allows her to smell everything in Venice at the same time.




twitter.com/MagicRealismBot


Suludo dobre tweet-priče koje stvara softver (bot). Svakih 2 sata stiže novi tweet.
Sto godina samoće: skraćena verzija.






A Scottish diary describes a world where everyone is a beauty therapist.
A duchess discovers that letters of the alphabet do not exist, and is secretly pleased.
A math teacher is proposing marriage to an Egyptian god in a nightclub. The Egyptian god is extremely wealthy.
A serene president hatches a plan to destroy income inequality.
A grandmother looks at Klimt's The Kiss and sees her grandmother in the background.
By thinking of a glass paperweight, a sexually frustrated field marshal is able to create Facebook.
A novelist finds a leather-bound book containing instructions for building a supermarket out of cockroaches.
By eating an apricot, you can reach another dimension. It is like Switzerland, except everything is made of amethysts.
A blonde king builds a city made of capitalism.
An apple causes anyone who eats it to think they are a camel.
An Armenian HR manager goes for a walk in a forest and discovers a pine tree made of bisexuality.
A coven of popes do battle against a diamond ring.
A novelist opens a shop which sells planets.
An economist is murdered. The killer is revealed to be philosophical.
You read in an ancient book that you are actually a clown.
A countess decides to catalogue every prime number in the Bay Area.
A South African physician has a sixth sense: she can sense the presence of moons.
A pharmacist is being chased by a giant custard apple.
Just before sunrise a message appears above a Parisian merry-go-round. It reads: "Don't be powerless."
A triangle made of the weather appears in Madagascar.
An Australian man writes a textbook that is made out of starlight.
Sixty-four doctoral students imagine a brain into existence.
A schoolmaster in Bangkok fantasises about having sexual intercourse with pianos.
A lawyer is writing a shopping list. It has three items: the global financial system, English literature and a stomach.
A famous duchess decrees that everyone must be made of rose petals.
A crucifix levitates over Miami. A nurse knows why it has come.
A homeless queen finds out that her giant clam is her father.
A sorceress is eating a cupcake in a platinum cornfield.
A 99-year-old innkeeper is exacting revenge upon lettuces.
A teenage empress falls into an ocean filled with rectangles. Nobody misses her.
A Mexican literary critic plays a game of cards with a chrysanthemum.
A cathedral covers the whole of heaven. A jade face is in the centre.
A dictator owns a rose bush that allows her to smell everything in Venice at the same time.
A Portuguese poet listens to an accordion that plays the music of sleep.
A Madagascan fisherman hears of an opera house located inside a volcano, and devotes his life to finding it.
A chocolate five-star hotel whispers to a sailor: "I feel so serene."
A Somali university professor is sentenced to death by a duke for writing an essay about eight balls.
In Silicon Valley there is an opera house that is made of lizards.
A naturopath searches for a tiny crystal that lets him see the alphabet.
A Caribbean courtesan proposes marriage to chess.
A fraternity of metaphysicians imagine a pine forest into existence.
In Bengal there is a dentist who has a photograph instead of a kidney.
Every single midwife in Germany is hugging piglets.
A Renaissance dissertation describes a cup filled with your father.
An ancient book describes a game in which the contestants must destroy ambiguity.
A congressman watches a movie about a unicorn that can destroy postmodernism, and devotes his life to finding it.
There is an opal in Mumbai that is infinitely beautiful.
An American departmental committee holds a meeting about a poem that continues for 276 billion years.
A staircase in Portland is made of atheism.
In Baltimore there is a lily that is the colour of light.An Austrian queen wakes up before dawn to have sexual intercourse with optimism.
A Basque sultan bans people from owning clocks.
A Bavarian sociologist discovers a 5000-year-old mirror which only reflects acrobats.
A sous chef discovers that everything is being controlled by a black hole.
A Belgian congresswoman takes a photograph of an enormous sea snake.
In Nepal is a pear tree whose every leaf is an octopus.
An entrepreneur realises that she is a centaur. Nobody notices.
An Alaskan necromancer owns a pair of spectacles which lets him see every clock in London.
An albatross lays an egg. Inside the egg is a baroness.
A stonemason steals gravity and hides it inside a crystal labyrinth.
A lion is dancing all night with sleeping in.
A sculptor dedicates his life to making a list of every act of love that has taken place in Utah.
A cypress tree as beautiful as moonlight grows in a Macedonian garden. A scholar writes a poem about it.
A crystal lighthouse causes anyone who enters it to turn into a parallelogram.
There is a tidal wave in Dar es Salaam. It is full of willow pattern plates.
A Russian congressman murders an astrologer with an unusual weapon: a cloud.
A woman owns an opal which allows her to become an island.
An Afghan cook bakes a birthday cake for a cemetery.
A baron yearns to have sexual intercourse with every doll's house in Hawaii.
A math teacher finds a long lost book containing instructions for building a temple out of orchestras.





"A famous librarian discovers a painting that depicts every single owl in the world."
In his 1940 essay “Theses on the Philosophy of History” Walter Benjamin tells story of a chess playing automaton. Dressed as a Turk, with a turban and the obligatory hookah in its mouth, the machine would impress with feats of competitive ingenuity. Unbeknownst to the crowd, a dwarf was hidden within its workings. An excellent chess player, he guided the automaton’s hand by means of stings. Originally meant as a critique on materialist theories of history, Benjamin’s allegory has been extended to critique automatism in general. In this enlarged formulation, the internet, for instance, is not a self-directed entity with a fixed set of properties but rather an aggregate of people and institutions using computer networks to advance a divergent set of very human agendas. Beyoncé might periodically win it, but the internet is no more a sufficient reason for human phenomena than any other factor, or so the argument goes. No matter how sophisticated the automaton, the human is always in some sense at the controls.
But how would the allegory change if the Mechanical Turk wrote instead of played chess? This is not idle speculation. Last year, the Associated Press used automated processes to write quarterly earnings reports for 3,000 companies, roughly ten times the number produced by human counterparts previously. Automated writing is not limited utilitarian forms like business news and product descriptions. The results, however, are decidedly more mixed. NaNoGenMo, the programmer’s version of National Novel Writing Month, was started 2013 by the Portland, OR based web artist Darius Kazemi. The object of the project is to complete a 50,000 page book by the end of November, only it must be written with software rather than the human hand. The computer generated novels are, as their programmers freely admit, mostly unreadable. Sustained narrative remains a problem.
Automated writing of the creative variety becomes much more convincing on a small scale. One standout example is Magical Realism Bot, an automated text generating program on Twitter, developed by the brother and sister team of Ali and Chris Rodley. Magic Realism Bot generates a different 140 character story every two hours, using random combinations of the various elements that define the genre: academic characters, mythical creatures, philosophical disputations, etc. The output can be amusingly absurd, such as “A fortune teller turns over a tarot card with a Gummi bear on it. Your destiny is to become a psychiatrist,’ he says to you.” But it can also resemble the work of real authors, at least in summary. “A learned society of mathematicians meet once a year inside a ruined synagogue to decide the fate of life on earth,” reads more like the scene from an Umberto Eco novel than the instantiation of a simple computer program.
Magic Realist Bot points toward a complimentary relationship that can exist between the modernist experiment in literature of the 20th century and the digital culture of the 21st. Both modes of thing involve subjecting language to intense analysis, natural language or machine language, taking apart its most basic components in the search for new modes of representing reality. Identifiable people still remain at the controls of these writing automatons, working as programmers rather than puppeteers, but the speed and sophistication by which these automatons fulfil their commands represents a difference in kind from past experiments in replicating human culture. Perhaps a new allegory is needed to replace the Mechanical Turk. Magic Realism Bot might very well generate one.  
Ali and Chris talked to Asymptote about the technical basis for the Magic Realism Bot how that relates to how they engage with the practice of writing.
***
Matthew Spencer: Give us some background on yourselves. Specifically, I’m interested in how your efforts in social media, computer science and literature came to intersect.
Chris Rodley: I’ve wanted to be a writer since my early teens, and my literary heroes were the great experimental modernists like Woolf, Joyce, Brecht. Of course many contemporary writers of fiction and playwriting have turned away from this kind of bold, free-wheeling experimentation, maybe in part because where do you go after Finnegans Wake? This would sometimes frustrate me!
Recently I’ve come to see that the intersection of literature and technology, including social media, is a really exciting locus of experimentation in writing. But although it’s been around for decades, electronic literature still isn’t a field that huge numbers of conventional writers consider working in, though that’s slowly changing. One reason, perhaps, is that creativity at the intersection of literature and computing requires breaking the mould of what authorship looks like: either in that it can mean learning to code or in my case collaborating with someone who can (though there’s a great third option too, which is using platforms like Twine). Collaborating maybe seems weird for writers steeped in the romantic ideal of the solo creator. But, I think, increasingly, interesting literature will be the product of collaborative efforts. Not just collaboration in the sense of working with programmers or graphic artists, etc, but also in the sense of working in and with social media (for example, remix, recontextualisation and digital “conceptualism”).
Going back to my own development, since 2013 I’ve co-created a series of electronic literature works with media artist Andrew Burrell. One of these was “Everything Is Going To Be OK”, which constructed a short play script in real time out of remixed tweets from Twitter. A more recent project with Andrew was “Death of an Alchemist”, which was our attempt at creating a novel generated in real-time from online data (tweets, gifs from Tumblr, weather reports, etc). So as a result of that work I was already in the territory of looking at how lit and social media can be brought together.
The other influence for me is that I’m also a PhD candidate at the University of Sydney where I’m studying the impacts of social media on digital writing. Partly this is about avant-garde literature but it’s also about how the availability of social data is changing journalism and vernacular writing practices.
So I guess Magic Realism Bot was a product of those various influences!
Ali Rodley: I have a background in special education, and I’m now a computing studies teacher here in Sydney. At the moment I’m completing a computing studies degree. The bot was a great opportunity to get to know the programming language Python a bit better and apply it to a new challenge.
MS: Briefly describe how you built the bot. Please do include details about the relevant code if it takes a different approach than what is usual with these types of programs.
AR: I wrote the code from scratch in Python with a MySQL database, specifically for MagicRealismBot. Basically, there are a number of tweet templates we call bases. Each base has some hard coded text interspersed with placeholders for various parts of speech.
The placeholders can also carry tags which are used to filter the possible words that could be used in any position. For example, a placeholder for an object could be $ob-thing-concept-structure. The script collects all the objects with those tags then chooses one at random.
Part way into the process we introduced a new kind of ‘special’ placeholder to add variety to some of the bases. These generally contain short phrases rather than single words and always contain additional placeholders of their own. Objects, verbs, adjectives and people can also contain placeholders. This nesting often turns out to be quite deep, increasing the variety of results.
I included a few additional routines to polish the output a bit. There’s a mechanism for altering the verb when something like ‘prime numbers’ or ‘opposites’ turns up in a spot that would normally be singular. All person nouns are marked she/he/either to avoid using ‘they’ all the time. When a pronoun placeholder is encountered, a function searches for the person in the story and uses the appropriate pronoun or a random one. Functions from the Python library inflect.py take care of a/an and pluralisation. These kinds of details help the bot not sound so “bot-like”.
CR: Two of the key writing tasks were to create the bases or templates, and to collect a large vocabulary to populate them with. You could compare this to coming up with the two types of cards in “Cards Against Humanity”: the black “fill in the blank” cards and the white cards which supply nouns, including gerunds. Well, that was the job early in the bot’s development, anyway: we had a more or less rigid sentence structure populated with some nouns and an adjective or two (eg “an Assyrian queen writes love letters to darkness”, “a lonely prince discovers a tree made of prime numbers”). As it has gone on, we’ve progressively made these syntaxes much more complex and stochastic, because after a while those recurring templates get boring. So now there are all kinds of special variations, second sentences, even lists. Also, the verbs often now vary, which completely changes the premise of the tweet: instead of “writes love letters to”, it might be “tries to destroy”.
Deciding on a suitable vocabulary was also obviously important. Initially I put in lots of quintessentially “magic”, other-worldly words: swans, moons, labyrinths. As it’s developed, I’ve added a bunch of ordinary, everyday words as part of an ongoing process of trying to ensure it has lots of day-to-day variation and unpredictability.
MS: What are your thoughts on the relationship between coding and natural language? What are the important similarities and the important differences? Specifically, do you see coding as being able express the full range of literary expression (for lack of a better term)? Or will some essential element within natural language make that goal impossible?
CR: Actually I think there are closer ties between bots and conventional writing than there might appear. There is, for example, a website you can visit called Bot or Not which invites you to guess whether the poetry is generative or written by a human. And it makes it hard to tell which is which, and many people misidentify robot poems as being authored by humans. However, I think it’s important to recognise how conventional literary output has long depended, and will increasingly be dependent, on technology and networks, including social networks to some extent. In the past, this might have been the technology of the typewriter, the book (dictionaries, encyclopedias), the library catalogue, the postal system. Currently, it’s things like Google Search, autocorrect, spell checkers, online thesauruses, social networks like Twitter or Facebook where writers source inspiration and discuss their ideas. Moreover, bots and other generative writing usually (except perhaps in the case of machine learning) rely on human creativity in the code itself, in the syntax, in the vocabulary, and in the case of Markov bots, the original creation of text that is algorithmically remixed.
If I had to put money one it, I would wager that relatively automated processes will at some point lead to really compelling forms of literary expression across many different genres. Currently, it’s good for quite specific forms of expression I think (like putting together hitherto unconnected concepts as in Magic Realism Bot). Twitter as a platform is great for bot writing, of course, because the retweet function helps “successful hits” get more widely seen.
MS: Why magical realism? Did you think about using other genres?
CR: Nope, not really. I’ve always loved stories that rely on big ideas, high concepts and strong “hooks”. Kafka, Borges, The Twilight Zone, plays like Friedrich Dürrenmatt’s The Visit, the classic Stephen King short stories and novellas and classic detective fiction too (think Agatha Christie’s Murder of Roger Ackroyd). In other words, a story that is engaging as a narrative but also original and interesting as an idea, conceptually or even philosophically. So partly Magic Realism Bot comes from having an interest in these, coming up with these types of premises in the conventional way, and wanting to find a way to generate them programmatically.
Jorges Luis Borges is famous for this kind of literature of ideas, and I’m a huge fan. I realised a while ago that many Borges stories tend to follow a specific pattern: the telos underlying a particular idea or structure is exaggerated ad absurdum, so that it overfulfils it. (A library, a maze, a map…) This led to the idea to create a “BorgesBot” which would generate Borgesian story ideas. After a while, it became clear that the particular affordances of the Twitter bot are best suited for  magic realist story ideas much more broadly defined (a book inside someone’s heart, a rainstorm of cathedrals). In other words, keeping it to Borgesian ideas (which are quite dry, rather than colourful and visual, and also metafictive) was too limiting. Currently the bot draws inspiration from a bunch of magic realist authors as well as other genres (fantasy, children’s lit, YA, detective fiction).
Another reason why the bot is a good fit for generating magic realist premises is that it can create links between ideas and concepts that aren’t normally connected, that are totally divergent, in a way that humans don’t easily do. We can imagine of someone drowning in a lake filled with water, or maybe lava, but it’s less likely we’d easily think of a lake filled with clocks, tigers or prime numbers.
A third reason for choosing magic realism is that Twitter maybe isn’t particularly amenable to long-form narrative, but it can do microstories and particularly premises or loglines well. (See also Nora Reed’s @thinkpiecebot). So I think this is a format that works well for it.
MS: What are some of your favorite entries written by the bot?
AR: A depressed archduke builds a swimming pool that is filled with optimism came up during testing back when it was still BorgesBot and is still one of my favourites.
CR: A few weeks ago we added some templates that include direct speech and I think they’re working pretty well:
A pine tree whispers to a princess: “I wish I was a rose bush”, and
A beehive whispers to an opera singer: “I wish I was an opera house.”
A few others I have liked are:
A 14th century queen passes a law against opposites.
A famous librarian discovers a painting that depicts every single owl in the world.
A hen lays an egg. A fox is inside it.
A schoolteacher invents a new kind of astrology based on the movements of swans.
I also like the particular template that devises magic realist detective novels, like “A murder mystery in which the killer is revealed to be Velazquez’s Las Meninas.” -   Ali Rodley, Chris Rodley, and Matthew Spencer    www.asymptotejournal.com/blog/2016/03/30/in-conversation-with-chris-and-ali-rodley-the-creators-of-the-magical-realism-bot/