selfish meme bow down before metatron Wed, 31 Aug 2011 10:24:00 -0700 Earth from home <p> <p>An equirectangular projection of the globe, but this time centered on my hometown of Johannesburg* instead of the normal +0 +0. Countries are random colors.&nbsp;</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Recentered-globe" height="222" src="" width="500" /></a> </div> <span style="font-size: x-small;">*Yes, I'm homesick!</span></p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Sun, 28 Aug 2011 21:18:00 -0700 Geopolitical graph <p> <p>These days I have graphs on the brain.&nbsp;<div class='p_embed p_image_embed'> <a href=""><img alt="Geo-graph" height="407" src="" width="500" /></a> </div> </p> <p>Nodes are countries, edges are borders, and the legends are self explanatory.&nbsp;</p> <p>Programming time was about half the duration of <em>Inception.&nbsp;</em></p> <p><em></em>That is all.</p> <p>Edit: here's what the graph looks like if node positions correspond to the center co-ordinates of each country.</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Screen_shot_2011-09-27_at_1" height="286" src="" width="500" /></a> </div> </p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Sun, 14 Aug 2011 13:00:00 -0700 Poems and dreams <p> <p>A few days ago I had an argument with my friend and colleague <a href="">Mike Sollami</a> about poems and how to write them. We have pretty different ways of approaching it.</p> <p>He takes great pleasure in the construction of his poems, and they are very clever, and also meticulously trimmed and fitted. But for various reasons I don't approve of poems that I've written this way. Mine turn out, invariably, to be grandiloquent.</p> <p>So since about two years ago, I've taken a different tack. Now, when I do write poetry -- which is very rarely, and when I feel like I need to get something out of my system -- I try to unstopper my normal filters and just <em>write</em>, with no attempt at all to make sense.</p> <p>Says Karl Pilkington, that unwitting, spherical beacon of wisdom: "I find that if you just talk, your mouth comes up with stuff". Spot on Karl.&nbsp;But unlike Karl, when things become too incoherent, I pull back and regroup my thoughts -- the narrative equivalent of that tripping sensation that startles you awake when you're on the border of a dream.&nbsp;</p> <p><span>So here is one of those stream-of-consciousness poems, for all 2000 of you mysterious strangers who for some reason occasionally read my blog. Or maybe it's just a stalker pressing&nbsp;</span>↺<span>&nbsp;again and again.&nbsp;</span></p> <p class="p1" style="padding-left: 30px;"><em>Soaked through in all that human stuff,</em><br /><em> marinated between your ribs.</em><br /><em> Tickling to prepare the meat for eating,</em><br /><em> the sun spilling out in smashed eggs.</em></p> <p class="p2" style="padding-left: 30px;"><em>Something rustling in the bushes:</em><br /><em> It's the start of our game;</em><br /><em>the first spear thrown;</em><br /><em>a rock dropped in a pond,<br /></em><em>sinking as it forgets.</em></p> <p class="p2" style="padding-left: 30px;"><em>It's concrete digesting in a slack grey pool;</em><br /><em>crescendos of foil,</em>&nbsp;<em>fluxing and mirroring on too many scales;</em><br /><em>nails cracking open...&nbsp;</em><em>forgotten ages of wood.<br /></em><em>It's an unbearable weight of dead tissue<br /></em><em>whispering beneath vellum.</em></p> <p class="p2" style="padding-left: 30px;"><em>Dull metal and proud edges and a sandy transparent flux,</em><br /><em> all that precious order sucked clean.</em><br /><em> Boxes, stacks and arches,</em><br /><em> between them holes and spaces<br /></em><em>feeling the patter of feet like endless waves on a beach,</em></p> <p class="p2" style="padding-left: 30px;"><em>Rotted of use, they are now dead,<br /></em><em>they are sheltering skeletons<br /></em><em>licked by shadows that roll under<br /></em><em>and over<br /></em><em>and through all angles...</em></p> <p style="padding-left: 30px;"><em>But also they are steeped in our breath;<br /></em><em>they remember all passage.<br /></em><em>They are immune.<br /></em><em>Like regenerating coral they are safe<br /></em><em>in our crooked reef.</em></p> <p>If you have anything to say about what poetry means to you, if and how you write poetry, or even just whether you find this particular poem boring, witty, lazy, incomprehensible, evocative or even, gasp, <em>pretentious</em>, please say so in the comments.</p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Sun, 24 Jul 2011 16:48:00 -0700 The structure of a Mathematica package <p> <p>I like to build tools to make programming easier.</p> <p>One of my latest tools is a useful function that plots the "call graph" of a <em>Mathematica</em> package: each vertex is a function, and each represents the fact that the one function calls another. It's a neat way to understand the structure of a large body of a code without "chasing down" function calls by hand.&nbsp;</p> <p>For example, the graph below* shows the structure of a machine learning package I'm writing. The size of the disks show function code size -- bigger disks for more complex functions. Interestingly, <em>Mathematica</em> allows me to measure this directly, rather than using the usual proxy of the number of lines in the source code for a function. By taking&nbsp;<a href="">LeafCount</a>&nbsp;of the <a href="">DownValues</a> of a symbol, I get the number of independent parts in the <a href="">abstract syntax tree</a> of a function.</p> <p>Other visual elements also communicate important details: red disks are public functions -- functions that the package exports to external code. White disks, conversely, represent functions <em>imported</em> from other packages. And lastly,&nbsp;recursive functions (by definition) are those vertices with a circular edge that loops back to thesmelves.&nbsp;</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Callgraph" height="480" src="" width="500" /></a> </div> </p> <p><span style="font-size: x-small;">*In case you're wondering, the star in the lower left corner is a set of functions that deal with measuring the error of a classifier on a given data set -- this functionality is independent enough that it doesn't need to call any of the other code in the package.&nbsp;The triplet on the lower right is a set of utility functions.&nbsp;</span></p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Sun, 17 Jul 2011 10:02:00 -0700 What if Shakespeare had been a composer? <p> <p>At the <a href="">NKS summer school</a>, during which I was an instructor, I helped students from diverse backgrounds to implement their ideas in <em>Mathematica</em>. One of the my&nbsp;favorite projects was working with the artist <a href="">Elizabeth Latta</a>&nbsp;to visualize and computationally explore the famous play&nbsp;<a href="">The Tempest</a>, by&nbsp;William Shakespeare.</p> <p>Among the many promising ideas we investigated, two in particular were interesting enough that I'd like to show them off.&nbsp;The beautiful drawings are Elizabeth's work, and I planned and wrote the code.</p> <p>The first was a&nbsp;technique&nbsp;that used a network of the major characters in the play to indicate the relative importance of their interactions. In this visualization, each character is a node in the network and each interaction is an edge. To be precise, the <em>thickness</em> of the gray bond between two characters represents how often they speak lines in the presence of one another. The <em>size</em> of each portrait indicates the total number of lines each player has. So main characters should appear large, and have strong connections to their frequent stagefellows.</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Screen_shot_2011-07-17_at_10" height="278" src="" width="500" /></a> </div> </p> <p>The second technique isn't quite a visualization, its an "auditization". The idea is that each character is assigned a note, and the play is simply, um, <em>played</em>&nbsp; -- every time that character speaks, a note is played. A note is sustained for an amount of time proportional to the number of lines he or she is saying. One last tweak is that I use <em>Mathematica's</em> pattern matching to ensure that long streams of repetitive, boring note patterns are elided somewhat. The general effect is passable music, or at least quite different from most algorithmic music. Take a listen! Just remember, you're listening to the play at about 30x speed!</p> <p><div class='p_embed p_audio_embed'> <a href=""><img alt="" src="" /></a> <div class='p_embed_description'> <span class='p_id3'>Tempest.mp3</span> <a href="">Listen on Posterous</a> </div> </div> </p> <p>One of the things that I think makes this idea work is that a play must <em>already</em>&nbsp;conform to a particular grammatic, scene, and dialogue structure -- a structure that leaves traces on the way the players share the stage. The rhythm of back and forth between two sparring characters cannot be too lop-sided. Multiple characters have to be orchestrated carefully to move the plot forward. Scene changes must permute the characters if there is to be any extended tension. Characters and motifs recur throughout the play is plans are hatched and executed. All of these forces, and others, make the non-local structure of the dialogue interesting -- simultaneously familiar, and unpredictable -- the very same properties a score must have if it is to be interesting to the ear.&nbsp;</p> <p>I'm going to try this idea out on other Shakespeare plays, and other plays in general, to see if I can discern major differences in the music they can generate.&nbsp;</p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon - Sun, 12 Jun 2011 16:58:00 -0700 QuickSort in 61 characters <p> <p>My friend Mike Sollami, a programmer and mathematician, loves&nbsp;<em>concision</em>. A cute expression of this ideal is a very short implementation of the QuickSort algorthm that he wrote:&nbsp;<span style="font-family: Helvetica; font-size: 12px;">&nbsp;</span></p> <div class="CodeRay"> <div class="code"><pre>quicksort = # &amp; @@@ {# //. x : {__} :&gt; (## &amp; @@  Reverse /@ GatherBy[x, (# &lt; x[[1]] &amp;)])} &amp;</pre></div> </div> <p>Of course this is a little opaque, looking perhaps more like <a href="">APL</a> than modern code. To make it easier to parse visually, I've used one of&nbsp;the many small utilities I've written for internal use here at Wolfram|Alpha, called <code>SyntaxPlot</code>, to lay out the abstract syntax tree of <code>quicksort</code></p> <p><div class='p_embed p_image_embed'> <img alt="Screen_shot_2011-06-12_at_7" height="310" src="" width="398" /> </div> </p> <p>Not as short, but arguably more pretty!</p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Fri, 20 May 2011 10:18:00 -0700 GMail analytics <p> <p>I've been playing with the <a href="">JavaMail</a> library, which is a friendly and clean API that abstracts a range of common email protocols like POP, SMTP, and IMAP. Targeting my own Gmail's IMAP account, I downloaded the headers of all 2700 of my sent messages from the last 5 years and loaded them in Mathematica.</p> <p>There is also manner of stuff one can do with this kind of data, but a fun starting point for my explorations was a punch-card type visualization that shows my proclivity to send emails at different times of the day and days of the week (inspired by github's version of same for <a href="">commits</a>).</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Screen_shot_2011-05-20_at_4" height="296" src="" width="500" /></a> </div> </p> <p>What's special about 4am on a Tuesday morning? No idea!</p> <p>Another simple statistic is the volume of emails that I've assigned to different GMail labels. I picked four interesting labels: emails between me and my family, my friends, my university, and work-related emails.</p> <p>It's interesting how directly the structure of my life is visible in these email counts. Take a guess when I finished my degree and started working in industry, and when I moved to the United States.&nbsp;</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Email-volume" height="308" src="" width="500" /></a> </div> </p> <p>There are loads of other things to try. For example, I have all the header text, so along with message IDs I can infer the thread structure of all my email conversations. How complex are my conversations with different people? Who do I have the most intricate conversations with? The simplest?</p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Thu, 21 Apr 2011 01:08:00 -0700 Graphing your social graph <p> <p>Everyone <em>talks</em> about social graphs and their value to large companies and advertisers, but where are the actual pictures for individual users<em>?&nbsp;</em>I got to thinking how one could visualize the "local" part of online social network -- just your friends and followers and their relationships -- and after a few weekends of tweaking and fiddling, I've got a nice <em>Mathematica</em> notebook that does all this and more.</p> <p>For example, here's what my <a href="">Twitter user account</a> looks like:</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Screen_shot_2011-04-22_at_6" height="317" src="" width="500" /></a> </div> </p> <p>You'll notice that&nbsp;<strong>I do not appear</strong>&nbsp;in the graph<em>.&nbsp;</em>I already have an explicit and implicit relationship to everyone in the graph, and so to include me would to distort the graph layout without adding any information at all.</p> <p>Okay, what do all these visual elements communicate?</p> <ol> <li>lines indicate users relationships to each other: <strong>solid lines</strong> indicate mutual relationships, whereas <strong>dotted lines</strong> indicate one-way relationships -- the dotted end is the party who <em>doesn't follow back</em>.</li> <li><strong>disk size</strong> shows tweet frequency: the bigger the disk, the more frequently a user tweets.&nbsp;</li> <li>color indicates a user's relationship to <em>me:</em>&nbsp;<strong>gray</strong>&nbsp;for users I follow that follow me back, <strong>blue</strong>&nbsp;for users who&nbsp;don't&nbsp;follow me back, and <strong>pink</strong>&nbsp;for losers, I mean users, whose overtures <em>I</em>&nbsp;don't return. Just kidding about the loser part.</li> </ol> <p>Or, if you prefer a visual dictionary, try figure this out (hint: I'm green)!</p> <p>&nbsp;</p> <p><div class='p_embed p_image_embed'> <img alt="Screen_shot_2011-04-21_at_6" height="71" src="" width="315" /> </div> </p> <p>In <em>Mathematica</em>, it's really easy to create <strong>interactive</strong>&nbsp;visualizations. It's extremely easy to annotate the graph nodes with tooltips that describe an individual user, showing their latest load-on-demand tweets, avatar, and follower information. Here's what one of these tooltips looks like:</p> <p><div class='p_embed p_image_embed'> <img alt="Screen_shot_2011-04-23_at_3" height="313" src="" width="253" /> </div> </p> <p>But this is only the tip of the iceberg. One can easily visualize conversations <em>between</em>&nbsp;users by simply mousing over the edge that connects them. One can click on a user to tweet at them or to go straight to their twitter page. One can weight edges with the frequency of message exchanged between two users. And so on. With a powerful functional languages like <em>Mathematica </em>and its rich set of dynamic UI elements, it's very easy to take an UX or UI idea and just <em>prototype it</em>, often going from an idea to an implementation in a matter of minutes.</p> <p>I'll leave you with a gallery of some of the my Twitter friends:</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Screen_shot_2011-04-22_at_5" height="463" src="" width="500" /></a> <a href=""><img alt="Screen_shot_2011-04-23_at_12" height="265" src="" width="500" /></a> <a href=""><img alt="Screen_shot_2011-04-22_at_4" height="421" src="" width="500" /></a> <a href=""><img alt="Screen_shot_2011-04-23_at_2" height="248" src="" width="500" /></a> <a href=""><img alt="Screen_shot_2011-04-22_at_2" height="428" src="" width="500" /></a> <div class='p_see_full_gallery'><a href="">See the full gallery on Posterous</a></div> </div> </p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Tue, 19 Apr 2011 22:45:00 -0700 University spawning rate <p> <p>Mental fish food: timeseries of the number of educational institutions established each year. Two massive dips happened around the time of the Great Depression and the Vietnam War, which is interesting. My source is&nbsp;<a href="">wikipedia category lists</a>.</p> <p><div class='p_embed p_image_embed'> <img alt="Screen_shot_2011-04-20_at_1" height="246" src="" width="418" /> </div> </p> <p>&nbsp;</p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Sat, 16 Apr 2011 22:26:00 -0700 The Riemann surface of arctan <p> <p><div class='p_embed p_image_embed'> <img alt="Image" height="425" src="" width="425" /> </div> </p> <div> <div><span>Riemann surfaces. We all know and love them.&nbsp;</span></div> <p /> <div>The <a href="">complex logarithm</a> is easy enough, but until now I was in the dark about how the complex arctangent "looked".&nbsp;</div> <p /> <div>Until I found <a href=",%20Numbers%20in%20Space/Entry%20Level/Jeffrey%20Corless%20-%20Graphing%20Riemann%20surfaces.pdf">this paper</a> and was enlightened.&nbsp;</div> <p /> <div>Tonight I will dream of infinite blue staircases.</div> </div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Wed, 23 Mar 2011 07:31:00 -0700 Video games or something more? <p> <p>Below, screenshot from the&nbsp;<a href="">Molle Industria</a>&nbsp;game&nbsp;<a href="">Leaky World</a>, a "playable theory" --&nbsp;loosely based on Jullian Assange's <a href="">original essay</a> on the apologetics of information transparency.</p> <p>From the same series we have strategy game&nbsp;<em><a href="">Oiligarchy</a></em>&nbsp;(for aspiring State Department employees one guesses) and the spare and haunting game&nbsp;<em><a href="">Every Day the Same Dream</a>&nbsp;</em>about, well, the genetically engineered end-of-the-world (the music is especially beautiful). To top it off the <a href="">Catholic Church</a> and <a href="">McDonalds</a> also come in for some playable satire.&nbsp;</p> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Leaky" height="352" src="" width="500" /></a> <a href=""><img alt="Eday" height="204" src="" width="500" /></a> <a href=""><img alt="Eday2" height="194" src="" width="500" /></a> <a href=""><img alt="Macdonalds" height="335" src="" width="500" /></a> <a href=""><img alt="Oily" height="260" src="" width="500" /></a> <a href=""><img alt="Oily2" height="195" src="" width="500" /></a> <div class='p_see_full_gallery'><a href="">See the full gallery on Posterous</a></div> </div> </p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Mon, 14 Mar 2011 17:43:00 -0700 Function composition, visualized <p> <p class="p1">I've been dwelling on the kinds of intuitions developed by anyone who studies mathematics. They're&nbsp;often simple rules of thumbs and ways of thinking about mathematical objects. In fact, they are <strong>so</strong> obvious that once&nbsp;you've internalized them, it often doesn't occur to&nbsp;you to articulate them again.</p> <p class="p1">For example, one very basic component of real analysis is<strong> function composition</strong>, something that is probably taught early on in high school -- although <a href="">technically I wouldn't know</a>.</p> <p class="p1">What does it mean to compose functions? How does one reason about a compound function? I got thinking about how&nbsp;one might go about helping a student to develop their intuition about these questions.&nbsp;It occurred to me that there is a simple visualization technique that answers this exact question <em>without any words at all</em>.&nbsp;</p> <p class="p1">How does this work? Let's say you want to visualize the following compound function:</p> <p class="p1"><div class='p_embed p_image_embed'> <img alt="Func1a" height="49" src="" width="118" /> </div> </p> <p class="p1">First, let's consider the syntax tree of this expression. This is a tree in which the <em>root</em>&nbsp;is the entire expression and the <em>leaves</em>&nbsp;are linear or constant functions&nbsp;like <em>x</em>&nbsp;and <em>1/3</em>. Luckily, with&nbsp;<em>Mathematica</em>&nbsp;it's pretty easy to present an arbitrary expression directly in this tree representation by using the formatting construct&nbsp;<a href=""><span class="s1">TreeForm</span></a>:</p> <p><div class='p_embed p_image_embed'> <img alt="Treeplot" height="295" src="" width="402" /> </div> </p> <p class="p1">My idea is to produce actual function plots for each<em>&nbsp;interesting</em> node in this tree. By moving up the tree we can show how these sub-expressions fit together to compose the entire expression<em>.&nbsp;</em>It turns out that it takes about 15 lines of <em>Mathematica</em>&nbsp;to compile the syntax tree, recognize and extract the interesting nodes, and synthesize the corresponding plots into a graphical diagram.</p> <p class="p1">Wrapping this all up into a function called&nbsp;<strong>FunctionTreePlot</strong>, we can now visualize our example like so:</p> <p><div class='p_embed p_image_embed'> <img alt="Func1b" height="325" src="" width="361" /> </div> </p> <p class="p1">This technique seems to work quite well. You can easily chase visual features of the corresponding plots up and down the tree to answer questions like&nbsp;"why does this function have a pole here"&nbsp;or "what will be the effect of changing this co-efficient?" No doubt this functionality would be a great addittion to Wolfram|Alpha's already strong support for <a href="">visualizing mathematical functions</a>.</p> <p class="p1">Here are a few more examples from my experiments:</p> <p class="p1"><div class='p_embed p_image_embed'> <img alt="Func2" height="326" src="" width="341" /> <img alt="Func3" height="333" src="" width="286" /> <img alt="Func4" height="332" src="" width="293" /> <img alt="Func5" height="337" src="" width="288" /> <div class='p_see_full_gallery'><a href="">See the full gallery on Posterous</a></div> </div> </p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Wed, 23 Feb 2011 09:38:37 -0800 Cubelets <p> <div> <span>The cutest animate cubes you ever saw:</span></div><p /><div><span><iframe src="" frameborder="0" height="283" width="500"></iframe><p /></span> </div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Sun, 06 Feb 2011 00:04:46 -0800 Hans Rosling, Jr <p> I just finished writing a <i>Mathematica</i> function to help me with some Alpha-related visualizations challenges.&nbsp;<p /><div>It takes multi-dimensional data and projects it down onto pairs of axes to help one better understand correlations between the different dimensions.<p /><div>I tested it out on a 4-dimensional data set consisting of the per-capita GDP, life expectancy, poverty fraction, and birth rate&nbsp;for 132 different countries.&nbsp;</div><p /><div>This isn't a serious attempt at working out the relationships between these observables (see&nbsp;<a href="">Hans Rosling</a>&nbsp;for that, or if you're a fan of Swedish sword swallowing).</div><p /><div>But it did strike me as quite pretty:</div></div><p /><div><div class='p_embed p_image_embed'> <a href=""><img alt="Multi-dimension" height="501" src="" width="500" /></a> </div> </div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Wed, 26 Jan 2011 12:32:00 -0800 Comparing search engine performance on Jeopardy! questions <p> <p>I recently completed a week-long project to analyze the performance of today's dominant search engines when presented with questions from the famous&nbsp;Jeopardy! game show. The originator of the idea, Stephen Wolfram, used the results in a blog post about the similarities and differences between&nbsp;<a href="">Wolfram|Alpha</a>&nbsp;(where I work), and IBM's intriguing new&nbsp;<a href="">question-answering system</a>.</p> <p>If you have already seen one of IBM's television spots, you'll know that in mid-February the system (dubbed "Watson") will compete on a special episode of Jeopardy against the two top Jeopardy champions Ken Jennings and&nbsp;Brad Rutter.&nbsp;</p> <p>This event is likely to go down as an iconic example of the advance of AI technology into a realm previously reserved for human judgement, a touchstone that is similar in many ways to IBM's successful challenge to the reigning chess world champion with its&nbsp;<a href="">Deep Blue</a>&nbsp;computer in the late 90s.&nbsp;</p> <div>For my part, I looked at how well traditional search engines allow one to narrow down the vast corpus of online information to just a page of potential answers to a Jeopardy clue. Not badly, it turns out, although Watson will surely advance the state of the art in text-corpus question answering.&nbsp;</div> <p /> <div>You can find more information on&nbsp;<a href="">Stephen's blog post</a>, but I'll reproduce the main bar chart here, along with a fun little word-cloud I made (with the help of&nbsp;<a href=""></a>) of the types of entities that occur as the answers to roughly 200k&nbsp;Jeopardy clues. For one thing, it's interesting how close all the major engines are now becoming, as powerful web search increasingly becomes a commodity we take for granted.</div> <p><div class='p_embed p_image_embed'> <a href=""><img alt="Search-engine-performance" height="349" src="" width="500" /></a> <a href=""><img alt="Jeopardy-word-cloud" height="319" src="" width="500" /></a> <div class='p_see_full_gallery'><a href="">See the full gallery on Posterous</a></div> </div> </p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Wed, 27 Oct 2010 23:07:18 -0700 My favorite Shepard Fairey parody so far <p> <div class='p_embed p_image_embed'> <img alt="Verygradualchange" height="500" src="" width="335" /> </div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Thu, 21 Oct 2010 01:24:00 -0700 Game theory, meet cellular automaton <p> <p>The inventor of <a href="">game theory</a>, probably also one of the greatest mathematicians of the 20th century, was a rather astounding character named&nbsp;<a href="">John Von Neumann</a>. When he wasn't throwing fabulous parties in Princeton or working on the atomic bomb, Von Neumann was laying some of the groundwork for the science of the late 20th century. Among his many creations was one of the first electronic digital computers, and associated with it the stored-program architecture that still underlies computers today.</p> <p /> <div><img src="" height="281" alt="" width="420" /><br /> <p /> <div>A slightly less well known creation of his was the so-called&nbsp;<a href="">cellular automaton</a><em>.</em>&nbsp;Something of an&nbsp;<em>alter ego</em> to the digital computer, the cellular automaton is a distributed computational device composed of an array of many simple processors instead of <a href="">one central and powerful processor</a>, as in the computer. Unlike Neumann's other ideas, which continued to flourish, cellular automata&nbsp;fell into obscurity until the late 70s, when they experienced something of a renaissance after the <a href="">work</a> of <a href="">Stephen Wolfram</a> (who happens to be the CEO of the <a href="">company</a> I work for).&nbsp;</div> <div><div class='p_embed p_image_embed'> <img alt="Ca2" height="192" src="" width="378" /> </div> &nbsp;</div> <div>More recently, a strange blend of these two ideas has arisen in the guise of rather long-winded&nbsp;<a href="">spatial evolutionary game theory</a>. Various academics&nbsp;have <a href="">explored</a> what happens when,&nbsp;instead of the disembodied entities of traditional game theory (who one imagines lurking in imaginary war rooms plotting <a href="">nuclear destruction</a>),&nbsp;the game players are <em>embodied</em>&nbsp;agents&nbsp;situated in physical space on a grid or lattice, interacting with their neighbors.</div> <p /> <div>It turns out that this can make a huge difference to the dynamics of such games. For example, in the traditional game of <a href="'s_dilemma">Prisoner's Dilemma</a>, the only evolutionarily stable strategy (a strategy that a group of agents can play without being undermined by the appearance of mutants in their midst) is for every player to defect -- in other words, a lose-lose situation where everyone mistrusts everyone and we are all unhappy. This is nature red in tooth and claw, pre-<a href="">Leviathan</a>.&nbsp;</div> <p /> <div>However, when we consider that these agents can be on a grid, and can, so to speak, huddle together for comfort, we notice that "tribes" of co-operators can form that offset the attacks from defectors on all sides by forming many positive relationships amongst themselves (see pictures below, the top panel is where the co-operators (blue) have&nbsp;successfully&nbsp;fought off invaders, in the bottom not so much). In fact, this point gets to the heart of one of the puzzles of evolutionary biology:&nbsp;<a href="">why altruism exists</a>&nbsp;and how it evolved.</div> <p /> <div><div class='p_embed p_image_embed'> <img alt="Clusters" height="168" src="" width="466" /> </div> <div class='p_embed p_image_embed'> <img alt="Clusters2" height="168" src="" width="466" /> </div> </div> <div>This last result was discovered only recently with the help of computer experiments, and there are sure to be many such discoveries waiting to be made in the field of evolutionary spatial game theory.&nbsp;To this end (yup, all of this post so far has been background -- it links up too beautifully to not mention the history), I've been working on a software library to allow experiments in <em>ESGT</em> to be conducted elegantly and efficiently. To leave you with a taste of what such experiments to look like, here are some videos of the game of Rock Paper Scissors being played on grid (at various 'temperatures', or degrees of randomness):</div> <p /> <div><span style="color: #0000ee;"><span style="text-decoration: underline;"><object height="385" width="480"><param name="movie" value="" /></param><param name="allowFullScreen" value="true" /></param><param name="allowscriptaccess" value="always" /></param><embed allowfullscreen="true" src="" allowscriptaccess="always" type="application/x-shockwave-flash" height="385" width="480"></embed></object></span></span></div> <p /> <div> <div>I'll post more such videos in the future as I do further experiments, and hopefully delve a little more into the details of the science that is going on. If you're interested in the code and seeing some more examples, or even playing around with it yourself if you have a copy of <em>Mathematica</em>, you can visit the project page on GitHub:&nbsp;<a href=""></a></div> <p /> </div> </div> <div>Long live spatial game theory!</div> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Thu, 16 Sep 2010 08:41:00 -0700 My monochrome haircut <p> <p>Got a haircut today. Here's what I look like now, modulo color and texture:</p> <p /> <div><div class='p_embed p_image_embed'> <img alt="Face4" height="191" src="" width="216" /> </div> <br /> <p /> </div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Mon, 16 Aug 2010 10:46:00 -0700 Visualizing random walks <p> <div class="gmail_quote">Today, a science lesson delivered via <em>Mathematica</em>.</div> <p /> <div class="gmail_quote">Imagine a pawn on a chessboard. Instead of marching steadily forth, this pawn has gone renegade. In fact, it has gone completely mad, and without respect to the rules, is shuttling randomly forward and backward. Every time it is your turn, it is equally likely to:</div> <div class="gmail_quote">1) not move at all,</div> <div class="gmail_quote">2) move forward,</div> <div class="gmail_quote">3) move backward.</div> <p /> <div class="gmail_quote">Such a&nbsp;monstrously&nbsp;aimless&nbsp;behavior&nbsp;is called in mathematics a&nbsp;<a href="">random walk</a>.</div> <div class="gmail_quote">Here is some Mathematica code to simulate a random walk, and to collect the statistics of many such simulations.</div> <div class="gmail_quote"> <p /> <div><div class='p_embed p_image_embed'> <img alt="0screen_shot_2010-08-16_at_1" height="113" src="" width="444" /> </div> </div> <p /> <div>What does a random walk look like? If time is vertical and the progress of the random walker is horizontal, one particle performing 50 steps of a <em>random walk</em> looks something like this:</div> <p /> <div><div class='p_embed p_image_embed'> <img alt="Screen_shot_2010-08-16_at_1" height="289" src="" width="276" /> </div> </div> <p /> <div>What about if one superimposes many such <em>walks</em>?</div> <p /> <div><div class='p_embed p_image_embed'> <a href=""><img alt="Screen_shot_2010-08-16_at_1" height="325" src="" width="500" /></a> </div> </div> <div>As you can see, with 5000 particles, the identity of each particle has begun to blur away, and now the whole&nbsp;<em>ensemble</em> starts to look a little bit more like a blob of ink diffusing on blotting paper.&nbsp;</div> <p /> <div><em>This is not an accident</em>. That is exactly what ink diffusing on blotting paper is: a near infinite number of molecules of ink, each one&nbsp;buffeted&nbsp;hither and thither by thermal vibrations, each performing what is called in the biz&nbsp;<a href="">Brownian motion</a>.&nbsp;</div> <p /> <div>In fact, one of Einstein's achievements (other than the various&nbsp;flavors&nbsp;of relativity, of course) was to show mathematically how this Brownian motion relates to the underlying atomic nature of matter.</div> </div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon Wed, 21 Oct 2009 11:05:00 -0700 A garden path musing leading to nothing <p> <p>What <span style="font-style: italic;">is</span> postmodernism? I don't really know, but I have a feeling about what it is. This feeling comes from one or two books, many conversations with students of philosophy, an article here and there, and especially being privy to the torrential backlash from strident rationalists and their op-ed pieces in <span style="font-style: italic;">Skeptic</span> or <span style="font-style: italic;">Scientific American</span>. I used to openly mock it, but now I have a different idea of its value.<p />The last few months I have been, largely unintentionally, building a new theory of the world. Theory isn't quite the term: a loose coalition of theories, a web of many strands that I periodically find an opportunity to expand outward or knit inward. What sort of theories? Theories of how to think, how to identify myself, what identity is, what it is to be human, what technology and culture are and how they shape us, how we relate to each other and the world, what spirituality really means, what knowledge is, and the meaning of mystery. And all of them quite uniquely flavored by <span style="font-style: italic;">my</span> history -- and strangely, this subjectivity comforts me.<p />And the theories themselves aren't strident recipes for understanding. Indeed to have any theories at all about such high-level constructs one has to abandon the luxury of empiricism or even the presence of a coherent argument. But that is the price you pay for leaving the world of objects and agents and entering the world of meaning, people, beliefs, and culture. And, while it takes faith in your intelligence and your wisdom, and it tests your tolerance of ambiguity and paradox, the rewards are manifold.<p />It seems to me that of the many things we become emotionally and intellectually invested in -- religion, politics, art, science, literature, sport, society, whatever they are -- most serve as hotbeds of proxy symbolism, as foundations on which to bolt the meaning of our lives, and so they unavoidably trap us. And then, trapped by our existential need for these things, we are subsumed by the detail, distracted by the texture. Instead of being porous to the experience of life, the tide of mystery goes out and we become like fetid pools, gradually growing more uncomfortable.<p />What <span style="font-style: italic;">is</span> real life? There is a mystical quality to it, I believe: the acknowledgement that nothing really makes sense, and furthermore, cannot be <span style="font-weight: bold;">expected</span> to make sense. The world is flux, chaos, contradiction; but these qualities only scare us for as long as we <span style="font-style: italic;">expect</span> the world to be rigid, ordered, amenable to the rather pitiful analysis that we, as humans, are equipped to perform.<p />So how to respond? I guess laughter is important. Laugh at what you cannot understand; laugh at what you think you do understand, because you are surely wrong; and especially, laugh at others when they realize they have no idea either. And so too with empathy: give in to the welling up of sorrow, sadness about the violence and harshness of the world. But also delight at its small and plentiful daily gifts, for they will never dry up.<p />Okay, I now realize that I've sort of lost track of what I wanted to say. But maybe that is quite appropriate.</p> <div class="blogger-post-footer"><img class="posterous_download_image" src="" height="1" alt="" width="1" /></div> </p> <p><a href="">Permalink</a> | <a href="">Leave a comment&nbsp;&nbsp;&raquo;</a> </p><img src="" height="1" width="1"/> Taliesin Beynon tali Taliesin Beynon