


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CantRemembrances &#187; ai</title>
	<atom:link href="http://blog.cantremember.com/tag/ai/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cantremember.com</link>
	<description>Memes of a technical vein discovered during CantRemember.com implementation</description>
	<lastBuildDate>Tue, 16 Feb 2010 06:36:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What Would a Wookie Do?</title>
		<link>http://blog.cantremember.com/what-would-a-wookie-do/</link>
		<comments>http://blog.cantremember.com/what-would-a-wookie-do/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 20:05:56 +0000</pubDate>
		<dc:creator>dfoley</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.cantremember.com/?p=173</guid>
		<description><![CDATA[Yes, I had to ask myself that question a lot recently, at least from the perspective of how he would use the Twitter service.  As much as this is a theoretical question, I believe I came up with some answers, and they are made manifest in the @cr_wookie Personality Engine.
Base-line Aesthetics
The first step in [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, I had to ask myself that question a lot recently, at least from the perspective of how he would use the <a href="http://twitter.com/cr_wookie">Twitter service</a>.  As much as this is a theoretical question, I believe I came up with some answers, and they are made manifest in the <a href="http://wiki.cantremember.com/Twitter/Wookie"><strong>@cr_wookie Personality Engine</strong></a>.</p>
<h3>Base-line Aesthetics</h3>
<p>The first step in bringing a Wookie to life was to establish a basic <strong>phoenetic dialect</strong>. So I came up with a set of candidates &#8216;words&#8217; along the lines of; <em>auhrn</em>, <em>rghrn</em>, <em>gahrn</em>, <em>hraur</em>, <em>urau</em>, <em>ehruh</em>, and <em>nrauh</em>. Hey, they sounded good. There&#8217;s about 60 of them total, comprised of the letters A E G H N R and U. After having watched <a href="http://starwars.wikia.com/wiki/Empire_Strikes_Back">The Empire Strikes Back</a>, where Chewbacca seems to get most of his good lines, I expanded into a few W words as well (<em>wahr</em> seems to work particularly well). <a href="http://www.mcsweeneys.net/links/lists/chewbacca.html">Many folks postulate</a> that he was capable of speaking Os and Ks, yet I myself do not subscribe to that opinion.</p>
<p>I then used <a href="http://rubyforge.org/projects/madderlib/">MadderLib</a> to construct simple word generators which allowed the phoenemes to stretch appropriately for different <strong>word lengths</strong>. Long vowels, double Rs and Hs, whatever looked good. And with a little compositing logic, I came up with some sentence patterns that were quite fun to read out loud:</p>
<blockquote><p>
rauhr nruuuhh raghr uhr rghrrnnauhrnaauuuuuurhhh<br />
nrauuh euu gauuhrr ruhr<br />
urhn ehrraaah rhhreuhraahhrrrrnn gaurrh
</p></blockquote>
<p>Those are rather plain-looking though. In order to make the Wookie&#8217;s statements seem more like <strong>txt argot</strong>, some variety was needed. Punctuation was obvious, both terminating and delimiting (commas, semicolons). Plus there&#8217;s the proper use of txt idioms, the LOLs and WTFs that are so popular with the youngsters these days (AFAIK). Throw in a nice little collection of emoticons, and behold; the Wookie has charm:</p>
<blockquote><p>
LOLZ! uhrrn euueuuhhaur, eruh hraur nrauururhnehrrraaah auhrn harn aurreruhaaarruuuhh rraaghrrr ^_^<br />
hraur rghneruh nuh waahhr???<br />
rhhhnnghn uhrrrnn ehrah. euu urau ehuuurrr urrn aurheuuuh haarn uhrrrn k?&#8230; haauurrr nruharuhuhhrrh hruaaaauuh ghrn rghn nrruuhh
</p></blockquote>
<p>Well, yeah, they still look sorta flat. Real people quote and capitalize portions of what they type, and there are other <strong>non-verbal components</strong> to the average sentence. So, the Wookie was taught to inject numbers, times, abbreviations, and even Star Wars calendar years into his sentences:</p>
<blockquote><p>
gahrn rghhr ghrrnehur rghhrrn hruauh raghrehurauuuuuuhrn gahrn?? hrraaauu: hrrraaauu rauhr ;) _ehruuh_ &#8216;Rahr Ehrrraaaah&#8217;<br />
raauh hrau Ehrahurrrrh *rauhr* gruh<br />
auhrneuuhr. harnuhrrnuhrrr uhr &#8211; raauhneuuu 1:30 gahrn raauuughrrr *nuuh* aahhrruuuunn uhr. wuurh harn rhr?
</p></blockquote>
<p>Once the Wookie was at this point, he could talk for quite some time and produce diverse aesthetic results. Reading them out loud is a <em>hoot</em>! Thus was born the first Personality Engine bot (the Wookie is comprised of four of them). But he still wasn&#8217;t really tweeting until he could follow some of the <strong>core Twitter memes</strong>.</p>
<h3>Twitter Memes</h3>
<p><a href="http://hashtags.org"><strong>Hash tags</strong></a> were the first obvious choice, since they were easy to fake. To this day, the Wookie can simply prepend a # to any word or composite that he speaks. But to make this feature really zing, I added support for Twitter&#8217;s <em>trending searches</em>. This allowed him to use real-world releveant tags, injecting them into his sentences, or appending them to his tweet (as is common convention). It turns out that one of the joys of a nonsense grammar is that anything which isn&#8217;t nonsense magically becomes the <em>&#8216;meaning&#8217;</em> of the sentence:</p>
<blockquote><p>
Harn ehureruheuuu &#038; ahrn rrghhhn! AAAHHRRNNAUHRN EHUUR! #itsnotgonnawork<br />
WAHR NUUUH RAUHRR!!! euu &#8216;aauurr nraur&#8217; haaauurrurau! #fact<br />
GRRUUUH! uhr hraheuuuuhhr aauurh #ChargersSuck rrhnn aur! gauhr aaurh haurerruuuhh! !! #aurh
</p></blockquote>
<p>Of course, no Twitter user can resist posting <strong>shortened URLs</strong>. They&#8217;ve been a cornerstone to the explosive growth of the service, maybe because there&#8217;s just so much interesting fast-moving crap out there on teh Internets. The Wookie follows several aggregation services &#8212; <a href="http://feeds.digg.com/digg/popular.rss">Digg</a>, <a href="http://feeds.technorati.com/">Technorati</a> &#8212; and a smattering of other popular blogs &#8212; <a href="http://www.tmz.com/rss.xml">TMZ</a>, <a href="http://feeds.theonion.com/theonion/daily">The Onion Daily</a>, <a href="http://feeds.feedburner.com/ICanHasCheezburger">LOLcats</a> &#8212; etc. He pulls out links to recent content and shortens them with the <a href="http://bit.ly">bit.ly</a> API. Again, since the Wookie is totally faking it, the results just cannot be accounted for. The best he can hope for is that the emotional texture of his tweet sometimes support the referenced source:</p>
<blockquote><p>
nrauh rrhn hrauuur ehrruhauhrnurrh. nrraauuuhh IMHO. hraur grraauhurhnauhrn rauh http://bit.ly/mjOD7<br />
Ghrn euuhrr? haarneruuuhh urrn aruh rghrnn aaur, uhr hruh urrr :) http://bit.ly/1a9j1K
</p></blockquote>
<p>And no tweeter lives in a vacuum; their posts are replete with the <strong>user handles</strong> of friends, comrades and mentors.<br />
The Wookie wasn&#8217;t about to make up handles, so his likely choices were his followees and followers.<br />
Rather than take the name-dropping approach here &#8212; more on that later &#8212; the Wookie chooses to occasionally reference his most recent followers:</p>
<blockquote><p>
OMG! _rrrhnnneuh_ euh: urr wuuurrh rghnurrnh urhn hruhn @sleepbotzz rhagn ghrn rrhn waaahhr hruauhehuraghrrrrrnnn rhagn harrnaurh </p></blockquote>
<p>After these features were implemented, the Wookie&#8217;s posts started to look almost real-ish. And whenever he tweets on his own, that is his range of capabilities. But he&#8217;s still not a real member of the Twitter community until he could play some other tricks. Thus began a completely separate effort; how to <strong>translate</strong> English into Wookie.</p>
<h3>Mocking</h3>
<p>Did I say &#8216;translate&#8217;? What I meant to say was &#8216;<strong>mock</strong>&#8216;.  After all, what can you really do with a nonsense grammar except make it <em>look</em> like it has meaning.</p>
<p>So, the Wookie was taught to mock existing sentences into his own dialect. He simply matches the initial letter (vowel / not) and preserves the word&#8217;s length and non-alpha characters (for contractions and the like). Special mappings were also added to deal with short words (the dialect only generates words 4-letters and above). And within a given tweet, he re-uses the same fake word for each instance of the real one. It&#8217;s an obscure feature, but it makes a <em>helluva</em> difference in some specific cases.</p>
<p>The totally awesome part of effort is identifying the words that <em>don&#8217;t get mocked</em>. There was no way I wanted to deal with semantic grammar detection, since tweets are often wildly non-grammatical. So as per usual, the Wookie fakes it. It mainly comes down to a weak analysis of <strong>quoting and capitalization</strong> patterns. He also keeps hash tags, links, handles, many acronyms, and argot &#8212; to the best of his ability.</p>
<p>And just for fun, he also recognizes a rather large <strong>lexicon of terms</strong> from the Star Wars universe. Well, except for the term &#8216;Star Wars&#8217; that is. He doesn&#8217;t know what that means.</p>
<p>It took a lot of experimenting to get it right, and he still makes mistakes, but he&#8217;s getting smarter all the time. One of the interesting things I learned during development was how staccato the English language is, as compared to the long smooth yawls of Wookie. Reading back a mocked sentence out loud is a sublime experience.</p>
<p>You may ask, how can this awesome power best be used to serve the Good?</p>
<h3>Re-Tweeting</h3>
<p>Darn right the Wookie <strong>re-tweets</strong>! He simply selects a few users that he follows, derives their recent tweets, and mocks one of them up. There are some users &#8212; <a href="http://twitter.com/darthvader">@darthvader</a> for instance &#8212; which he will always re-tweet if the user has posted anything fresh. Otherwise it&#8217;s a simple random selection, after avoiding repeats (there&#8217;s extensive repeat-avoiding code all throughout the Wookie implementation). There is the slight hint of name-dropping here, since he tends to follow a lot of popular accounts, but that&#8217;s just the nature of this beast.</p>
<blockquote><p>
RT @warrenellis Rauuh&#8217;r @neilhimself ehr #neilfail ar hruun rraaauuuuhrrr? Au. #warrenfail. http://bit.ly/16IiUE<br />
RT @KurzweilAINews: First Close Look At Stimulated Brain: Aghhrrrrnn gaauuuhhrrr ar hrrauur aauuuhrrn u gahrrn &#8230; http://bit.ly/17dg34<br />
RT @cnnbrk Hruh. Urrnn nrrauuuhh Ted Kennedy ur &#8220;rrrhhrrr ghr rauhn hru rau wahr; wahr au Democratic Party; &#8230; http://bit.ly/3FmLyq
</p></blockquote>
<p>It turns out that injecting the re-tweet &#8216;header&#8217; will often push longer ones past the 140ch barrier. He will attempt to preserve as much of the original tweet as possible, focusing on trailing URLs and hash tags. And if the tweet is short enough, he posts a shortened link to the original post, primarily to show off his mad skills. He is much inclined towards tweets which have a good blend of mockable and preservable words, again, to show off his mad skills.</p>
<p>This became the second Personality Engine bot. Yet still, re-tweeting is a one-way street, and <strong>interaction</strong> is the real key to user engagement.</p>
<h3>Playing Well With Others</h3>
<p>The third Personality Engine bot was borne of the need to perpetuate the following cycle of fun. On a regular basis, the Wookie will <strong>search for references</strong> to relevant words &#8212; <em>wookiee</em>, <em>kashyyyk</em>, etc. &#8212; and will respond to the user with a generated tweet. This is much less invasive and cruel than auto-following, a botting practice which I find to be quite <a href="http://dictionary.reference.com/browse/gauche">gauche</a>. I can only imagine the surprise on these user&#8217;s faces:</p>
<blockquote><p>
@amynicole21 WTF! aruh nrauuhehruhaaauuurr rraaahhhrr nruuh urrrrn ghrn wurh: euu haarrn nuuh grruhuhrnuhhrrn erruuuuhh :)<br />
@DZ1641 gauuuhrr??<br />
@vfigueroa1 rghrurr waahr! rrhneuuuhr urr nruuh hrauh &#8211; *ehrraaah* nrauh ^_^ nraur hruun rrrghhnn
</p></blockquote>
<p>However, before he goes searching, he first looks at his <strong>recent mention history</strong>, specifically at tweets starting with <em>@cr_wookie</em>. If one is found, he will mock and publicly respond to it, linking back to the original post when length permits. So if you talk to the Wookie, there&#8217;s a reasonable chance that he&#8217;ll republish you. To minimize abuse of this feature, he doesn&#8217;t follow quite the same word preservation rules as he does for follower re-tweeting. But he&#8217;ll keep Star Wars words, and that opens up a <em>vast</em> realm of potential amusement.</p>
<blockquote><p>
. @kindadodgy Nurh U hraaauuuu rghn Wookie rauuhrr wau&#8217;r hruh nrh ghrn hrun &#8216;rhngn ruhrn uhr wurh rn nuuh gh, ahrn au nrruuuuhh gauurh.<br />
> @adamlampert Ar. U hru nrh raaghrr gh HR&#8217;N! Rghn ruuhr au! http://bit.ly/591qW<br />
.@Lillput Nrh, rhag&#8217;n rauuhr nurh ghr haurr au a rghhnn ur a rghn.
</p></blockquote>
<h3>Greeting New Followers</h3>
<p>The fourth and final Personality Engine bot is the <strong>greeter</strong>. When you follow him, he&#8217;ll DM you. Short and to the point.</p>
<h3>Summary</h3>
<p>Whew! All in all, the project required about 6 weeks of spare time. My only hope is that much hilarity will ensue from these efforts.</p>
<p>If you want to read a bit more about the Wookie &#8212; and who wouldn&#8217;t, right? &#8212; you can check out his <a href="http://wiki.cantremember.com/Twitter/Wookie"><strong>Wiki page</strong></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cantremember.com/what-would-a-wookie-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
