<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Posts tagged math  - Entropy and Ecstasy</title><link>http://aaron.maenpaa.ca/blog/tags/math/</link><description>The most recent ranting and ravings of a madman.</description><lastBuildDate>Sun, 22 May 2016 05:32:35 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Ford Circles</title><link>http://aaron.maenpaa.ca/blog/entries/2009/09/20/ford_circles/</link><description>&lt;p&gt;I picked up a copy of &lt;a class="reference external" href="http://sprott.physics.wisc.edu/pickover/math-book.html"&gt;The Math Book&lt;/a&gt; after reading the review on &lt;a class="reference external" href="http://www.johndcook.com/blog/2009/08/25/math-book-clifford-pickover/"&gt;John D. Cook's blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So far it has been pretty interesting and I've was plesently surprised with how much of the material I am familar with, despite the fact that I haven't studied math beyond the courses that are part of the engineering curriculum at my university.&lt;/p&gt;
&lt;p&gt;The best part, though, has been the occasions when I find something that I can play with a little bit on my own. A good example is &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Ford_circle"&gt;Ford Circles&lt;/a&gt;, which with a little time in &lt;a class="reference external" href="http://nodebox.net/code/index.php/Home"&gt;NodeBox&lt;/a&gt; I had my own renderings:&lt;/p&gt;
&lt;img alt="Ford Circles" src="/blog/entries/2009/09/20/ford_circles/ford-circles-0c51a5690b66.min.png"/&gt;
&lt;p&gt;Here's the code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;__future__&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;division&lt;/span&gt;

&lt;span class="n"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;circle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;oval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;ford&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;
    &lt;span class="n"&gt;circle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;ford&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... and here's &lt;a class="reference external" href="/blog/entries/2009/09/20/ford_circles/ford.pdf"&gt;a bigger rendering&lt;/a&gt;, if you're interested.&lt;/p&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2009/09/20/ford_circles/</guid><pubDate>Sun, 20 Sep 2009 14:23:16 GMT</pubDate></item><item><title>Lockhart's Lament</title><link>http://aaron.maenpaa.ca/blog/entries/2009/05/05/lockhart_s_lament/</link><description>&lt;p&gt;&lt;a class="reference external" href="http://www.maa.org/devlin/devlin_03_08.html"&gt;A Mathematician's Lament&lt;/a&gt; is an essay I read a while ago that was written by Paul Lockhart, a math teacher. It expresses, in ways far more articulate than I ever could, some of the things that are wrong with the way people are taught mathematics: Namely that no-one actually does any &lt;em&gt;mathematics&lt;/em&gt; proper until their undergrad and even then only if you are studying one of the few disciplines that requires &lt;em&gt;real&lt;/em&gt; math courses.&lt;/p&gt;
&lt;p&gt;Check it out. It's a good read.&lt;/p&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2009/05/05/lockhart_s_lament/</guid><pubDate>Tue, 05 May 2009 19:19:47 GMT</pubDate></item><item><title>Guns, Bullets and Uncharted</title><link>http://aaron.maenpaa.ca/blog/entries/2009/02/16/guns_bullets_and_uncharted/</link><description>&lt;p&gt;I've been playing &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Uncharted"&gt;Uncharted: Drake's Fortune&lt;/a&gt; recently and so far it's a really fun game... but, the balance of the weapons has been really irking me.&lt;/p&gt;
&lt;div class="section" id="you-start-with-a-9mm"&gt;
&lt;h3&gt;You Start with a 9mm...&lt;/h3&gt;
&lt;p&gt;You start out with a generic 9mm pistol which seems to take 3-5 body shots to kill a bad guy with. Yikes! Meaning that instead of doing what actual people who shoot at people (cops, soldiers, etc.) are trained to do (center of mass shooting) you end up peering around corners trying to get head shots while your enemies shoot you in the face (thankfully your character appears to be even more nigh invulnerable than the bad guys).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="then-you-get-an-ak-47"&gt;
&lt;h3&gt;Then You Get an AK-47&lt;/h3&gt;
&lt;p&gt;That &lt;a class="reference external" href="http://en.wikipedia.org/wiki/AK-47"&gt;iconic Soviet assault rifle&lt;/a&gt;, which holds more bullets than your 9mm, still takes 3-5 body shots to kill a bad guy and will run out of ammo a lot faster if you carelessly hold down the trigger.&lt;/p&gt;
&lt;p&gt;For some insane reason, it's actually harder to get head shots with the AK than with the 9mm, so I found myself fighting with the pistol because I would at least have a chance of taking out a bad guy with a single shot rather than spraying bullets all over the place (that's right, the shoulder mounted &lt;em&gt;rifle&lt;/em&gt; is less accurate than your pistol because... it's crappy and Soviet *shrug*).&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="and-finally-a-one-shot-kill"&gt;
&lt;h3&gt;... And Finally a One Shot Kill&lt;/h3&gt;
&lt;p&gt;... and it's a &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Desert_Eagle"&gt;Desert Eagle .50AE&lt;/a&gt; (well actually the first one hit kill you come across a .44 Magnum but I have more rant material for the Desert Eagle and in terms of ballistics they are largely equivalent). This is the classic shooting game, hit them in the knee and they fly back a meter or two an fall the ground dead style of one-hit-kill weapon. Fun, but seriously, why a Desert Eagle?&lt;/p&gt;
&lt;p&gt;Yes, I know that both &lt;a class="reference external" href="http://www.imdb.com/title/tt0208092/quotes#qt0480464"&gt;Bullet Tooth Tony&lt;/a&gt; and &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Agent_(The_Matrix)"&gt;The Agents&lt;/a&gt; use them, thus, they must be totally bad ass, but seriously they're hand guns.&lt;/p&gt;
&lt;p&gt;I get that, when you're making a game, you want a power curve on your weapons so that as the game progresses your character gets progressively more kick-ass weapons; however, why on Earth is a pistol the first weapon you encounter that can reasonably knock someone on their ass the first time you shoot them.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="and-order-is-restored-sort-of"&gt;
&lt;h3&gt;... And Order is Restored... Sort Of&lt;/h3&gt;
&lt;p&gt;A little deeper in you get a &lt;a class="reference external" href="http://en.wikipedia.org/wiki/SVD_(rifle)"&gt;SVD (Dragunova)&lt;/a&gt; which is a sniper rifle of Soviet origin, which also has the ability to deliver one-hit-kills. So at least one rifle is able to out perform the Desert Eagle, but neither the AK-47 nor the M4 (which is black, futuristic looking and American, thus, better than the Soviet piece of shit (... or the the AK at least)) manage to do so, each requiring multiple body shots to disable your opponents.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="pretty-graphs"&gt;
&lt;h3&gt;Pretty Graphs&lt;/h3&gt;
&lt;p&gt;I pulled together the ballistics data from the Wikipedia for the:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/9x19mm_Parabellum"&gt;9x19mm Parabellum (Barretta 92)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/.50_Action_Express"&gt;.50 Action Express (Desert Eagle)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/7.62x39mm"&gt;7.62x39mm (AK-47)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://en.wikipedia.org/wiki/7.62x54mmR"&gt;7.62x54mmR (SVD)&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;... and plotted muzzle energy, muzzle velocity and projectile mass.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;img alt="The muzzle energy of various rounds." src="/blog/entries/2009/02/16/guns_bullets_and_uncharted/Muzzle_Energy-614c8b024b1f.min.png"/&gt;
&lt;p class="caption"&gt;The muzzle energy of (in Joules) 9mm, .50AE, 7.62x39mm and 7.62x54mmR rounds.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="figure"&gt;
&lt;img alt="The muzzle velocity of various rounds." src="/blog/entries/2009/02/16/guns_bullets_and_uncharted/Muzzle_Velocity-a39035e5a7f9.min.png"/&gt;
&lt;p class="caption"&gt;The muzzle velocity (in meters per second) of 9mm, .50AE, 7.62x39mm and 7.62x54mmR rounds.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="figure"&gt;
&lt;img alt="The projectile mass of various rounds." src="/blog/entries/2009/02/16/guns_bullets_and_uncharted/Projectile_Mass-abc7a2126490.min.png"/&gt;
&lt;p class="caption"&gt;The projectile mass (in grams) of 9mm, .50AE, 7.62x39mm and 7.62x54mmR rounds.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="discussion"&gt;
&lt;h3&gt;Discussion&lt;/h3&gt;
&lt;p&gt;You'll notice that the SVD delivers substantially more energy (3939J) than the runner up, the AK-47 (2010J), 96% more in fact. The AK-47 in turn delivers 21% more energy than the next runner up, the Desert Eagle (1666J). Admittedly, the Desert Eagle has a massive round (massing in at 21.1 grams) which does endow it with favourable penetrative characteristics, but the only round which it clearly out performs is the 9mm.&lt;/p&gt;
&lt;p&gt;Consequently, why the world of Uncharted seems to treat the Desert Eagle as largely the equal of the SVD and the AK-47 as the equivalent (... or lesser if you consider the fact that you can't hit a damn thing with it)  of the 9mm is frankly mystifying. Further exacerbated by the fact that late in the game you begin to encounter &amp;quot;snipers&amp;quot; that use Desert Eagle with laser sights to one-shot-kill you if you stand in place too long whereas the guys will assault rifles can't seem to think of anything better to do than spray bullets randomly.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="in-conclusion"&gt;
&lt;h3&gt;In Conclusion&lt;/h3&gt;
&lt;p&gt;My crazy mental model of guns, is that a body shot will pretty much disable anybody, regardless of what you use to shoot them. So seeing the bad guys limp around like I kicked them in the shins after pegging them 2-3 times with an AK, is just kind of crazy. Admittedly, having every gun dole out one-hit-kills could make the game too easy (if the one-hit-kills only apply to your enemies) or too hard (if it applies to your character as well), inject too much realism and make you resort to stealth when you just want to race in and kill people.&lt;/p&gt;
&lt;p&gt;The &lt;a class="reference external" href="http://www.firearmstactical.com/pdf/fbi-hwfe.pdf"&gt;FBI Handgun Wounding Factors and Effectiveness&lt;/a&gt; is an interesting read and discusses the use of handguns in combat from the perspective of people who actually rely on them (namely law enforcement officers). One of the interesting observations (when discussing the tactical realities of law enforcement) notes that due to the difficulty of making effective use of handguns in combat:&lt;/p&gt;
&lt;blockquote&gt;
[...] no law enforcement officer should ever plan to meet an expected attack armed only with a handgun.&lt;/blockquote&gt;
&lt;p&gt;A world in which game designers read some &lt;a class="reference external" href="http://www.theboxotruth.com/"&gt;Box O' Truth&lt;/a&gt;  and therefore knew that &amp;quot;rifles are rifles and pistols are pistols&amp;quot; would be a scary place indeed, but at least the uber-weapons would stop being handguns.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="fun-fact"&gt;
&lt;h3&gt;Fun Fact&lt;/h3&gt;
&lt;p&gt;In the 2008-2009 skills competition, &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Zdeno_Chara"&gt;Zdeno Chára&lt;/a&gt; won the hardest shot competition with a shot registering 105.4 miles per hour. Given the mass of a hockey puck ranges between 156 and 170 grams, the winning puck had approx 173-189J of kinetic energy. Which is just 1 - 10% shy of the muzzle energy of a .22 Long Rifle. Which, I suppose, explains why NHL goal tenders wear so much equipment.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2009/02/16/guns_bullets_and_uncharted/</guid><pubDate>Mon, 16 Feb 2009 20:09:06 GMT</pubDate></item><item><title>Lorem Ipsum to Hebrew (redux)</title><link>http://aaron.maenpaa.ca/blog/entries/2007/12/08/lorem-ipsum-hebrew-redux/</link><description>&lt;p&gt;The previous post: &lt;a class="reference external" href="http://aaron.maenpaa.ca/blog/entries/2007/12/08/lorem-ipsum-hebrew/"&gt;Lorem Ipsum to Hebrew&lt;/a&gt; gets a little side tracked in the technical details. There's a program to evolve text using mutation-selection cycles and a program to chart the results, but it mostly misses the point.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://drdino.com/articles.php?spec=76"&gt;Questions for Evolutionists&lt;/a&gt; asks:&lt;/p&gt;
&lt;pre class="literal-block"&gt;How can mutations (recombining of the genetic code) create any new, improved varieties?
(Recombining English letters will never produce Chinese books.)
&lt;/pre&gt;
&lt;p&gt;This question has two problems. First, it presents a straw man: nobody contends that mutations alone result in the awe inspiring adaptations possessed by the life all around us. The vast majority of mutations are silent-site mutations and have no effect on the phenotype of the resulting creature, because the mutation occurs in a non-coding section and is never expressed. The majority of the rest of mutations are deleterious and give you cancer or Down's syndrome or something equally nasty. Only a tiny fraction of mutations have any beneficial effect on those carrying the mutation.&lt;/p&gt;
&lt;p&gt;Mutation alone would never have produced the staggering variety of life that populates the Earth. Mutation combined with selection on the other hand can produce staggering effect on a population. Mutation introduces novel varieties into a population with each generation. While some mutants will be more fit than than their parents most will not be and some will be decidedly less so. The most fit individuals will found the next generation and beneficial mutations will slowly accumulate generation after generation producing the adaptations observed in current populations.&lt;/p&gt;
&lt;p&gt;Second, conceptualizing mutation as moving letters around, is a complete underrepresentation of the ways in which our genome's can be mis-copied. There can be deletions, replacements, duplications of single bases or entire sections of DNA. Additionally, it is at the completely wrong level of granularity. Mutation would not occur on the letters themselves but on the bytes representing them. With only 256 bytes to choose from you can represent either Macbeth or the I Ching with ease. Likewise, using only C, G, A and T you can just as easily spell E. Coli and H. Sapiens and you can almost spell Human immunodeficiency virus, but you would be missing the U.&lt;/p&gt;
&lt;div class="section" id="conclusion"&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;So how can mutation create new and improved variants? When acting alone, mutation would only ever improve an individual through luck. It is after all a random process and would mostly only introduce deleterious changes. When combined with selection on the other hand, together mutation and selection can produce amazing adaptations by allowing beneficial mutations to accumulate over generations.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2007/12/08/lorem-ipsum-hebrew-redux/</guid><pubDate>Sat, 08 Dec 2007 20:40:11 GMT</pubDate></item><item><title>Lorem Ipsum to Hebrew</title><link>http://aaron.maenpaa.ca/blog/entries/2007/12/08/lorem-ipsum-hebrew/</link><description>&lt;p&gt;&lt;a class="reference external" href="http://drdino.com/articles.php?spec=76"&gt;Questions for Evolutionists&lt;/a&gt; asks:&lt;/p&gt;
&lt;pre class="literal-block"&gt;How can mutations (recombining of the genetic code) create any new, improved varieties?
(Recombining English letters will never produce Chinese books.)
&lt;/pre&gt;
&lt;p&gt;Lorem Ipsum to &amp;quot;ןגכה9'kpx%y'ךbעX]kגkVגגהiEג9*Qעfעt9fכ9עגכf' qFxה%עגה9תגכג9X' k-?%עגכהןגכה9'&amp;quot; in only 118 generations. Sure it's garbled gobbledygook but if you have any familiarity with Hebrew you should be able to spot kaf, ayin and tav among others. In this string there is a total of 33 Hebrew characters ranging from aleph to tav.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://crimzon.ath.cx/~aaron/evolution.py"&gt;evolution.py&lt;/a&gt; is the program which produced this particular piece of gibberish. It models evolution by natural selection by successively evolving a population of phrases for two hundred generations. In the case of this particular string, fitness was calculated as a function of the number of Hebrew characters contained by an individual.&lt;/p&gt;
&lt;div class="section" id="method"&gt;
&lt;h3&gt;Method&lt;/h3&gt;
&lt;p&gt;Each population starts as a single copy of Lorem Ipsum. It is allowed to reproduce without the influence of any kind of selection until the population reaches 1024 individuals. At which point only the 1024 fittest individuals will be allowed to be part of the next generation.&lt;/p&gt;
&lt;p&gt;Generation n + 1 is composed of the daughters of generation. Each individual produces two offspring and dies (binary fusion) each daughter is an inexact copy of their mother: 1 in 10 bases are replaced by a point mutation. Daughters are then decoded from utf-8 to unicode and then encoded back to utf-8, errors are ignored.
The genome of the mother is recycled until a full 128 bytes are copied to the daugther's genome. Once 2 daughter cells are generated for each mother, the 1024 fittest cells are selected to be the mothers for the next generation.&lt;/p&gt;
&lt;p&gt;Three different fitness criteria were used in three different evolutions: # Hebrew characters, # Latin Uppercase characters, # Latin Lowercase characters.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="results"&gt;
&lt;h3&gt;Results&lt;/h3&gt;
&lt;p&gt;In each of the following figures the absolute fitness of an individual (in terms of the # of relevant characters) is shown on the Y axis while the generation is shown on the X axis. The green dots are the most fit individuals of their generation while the blue dots are the least fit.&lt;/p&gt;
&lt;div class="figure"&gt;
&lt;img alt="Scatter plot of population fitness." src="/blog/entries/2007/12/08/lorem-ipsum-hebrew/hebrew-0463ea4ce10e.min.png"/&gt;
&lt;p class="caption"&gt;Figure 1: Evolution of Lorem Ipsum when selecting for # Hebrew characters&lt;/p&gt;
&lt;/div&gt;
&lt;div class="figure"&gt;
&lt;img alt="Scatter plot of population fitness." src="/blog/entries/2007/12/08/lorem-ipsum-hebrew/latinuper-ededd187b265.min.png"/&gt;
&lt;p class="caption"&gt;Figure 2: Evolution of Lorem Ipsum when selecting for Uppercase Latin&lt;/p&gt;
&lt;/div&gt;
&lt;div class="figure"&gt;
&lt;img alt="Scatter plot of population fitness." src="/blog/entries/2007/12/08/lorem-ipsum-hebrew/latinlower_-9590a8cd6a4d.min.png"/&gt;
&lt;p class="caption"&gt;Figure 3: Evolution of Lorem Ipsum when selecting for Lowercase Latin&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="discussion"&gt;
&lt;h3&gt;Discussion&lt;/h3&gt;
&lt;p&gt;In the three figures there are a couple of important similarities:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Maximum fitness reaches a fitness plateau before it reaches the theoretical maximum in any of the experiments (128 in the case of either Latin experiment or 64 in the case of Hebrew).&lt;/li&gt;
&lt;li&gt;Minimum fitness drops off for the first 10 generations in the two Latin experiments.&lt;/li&gt;
&lt;li&gt;In two of the three experiments minimum fitness after 100 generations greatly exceeds initial fitness of the population.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;div class="section" id="plateau"&gt;
&lt;h4&gt;Plateau&lt;/h4&gt;
&lt;p&gt;This is an example of the mutation-selection balance. Essentially, after a certain point the mutation rate is introducing deleterious mutations (replacing characters relevant to fitness with characters that are not) as fast as selection removes them
from the population. Thus the population's fitness reaches a plateau.&lt;/p&gt;
&lt;p&gt;The Hebrew experiment was far more susceptible to this effect than either of the Latin experiments because each Hebrew character is represented by two bytes rather than one, the chance of a beneficial mutation is lower and the chance of a deleterious mutation is higher.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="minimum-fitness-dropoff"&gt;
&lt;h4&gt;Minimum Fitness Dropoff&lt;/h4&gt;
&lt;p&gt;Lorem Ipsum is a text that is written using Latin characters as such the fitness of the founding individual is greater than zero. Since the population starts with a single individual which divides until it reaches the maximum population of 1024, individuals are not under selection for the first ~10 generations and thus deleterious mutations may accumulate without facing negative selective pressure.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="improved-minimum-fitness-over-time"&gt;
&lt;h4&gt;Improved Minimum Fitness Over Time&lt;/h4&gt;
&lt;p&gt;Lorem Ipsum is a text mostly composed of lowercase Latin characters, as such it is not overly surprising that it shows almost no improvement over time.&lt;/p&gt;
&lt;p&gt;On the other hand, the other two experiments show vast improvements in both minimum and maximum fitness over time. In fact the Hebrew experiment starts out with an individual of fitness 0 and results in a population of median fitness ~20 a mere 100 generations later. The Latin Uppercase experiment starts with an individual of fitness ~5 and results in a population with a median fitness of ~85 after 50 generations.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="conclusions"&gt;
&lt;h3&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;This experiment offers example of several interesting evolutionary effect. We've seen the mutation selection balance in play. Mutations introducing novel variants into the population. The steady increase of fitness over multiple generations. Increase in complexity of the organisms under study (Hebrew characters are represented using two bytes while Latin characters only use one).&lt;/p&gt;
&lt;p&gt;Maybe rearranging the letters of the poems of Shakespear can never produce the I Ching, but rearranging the bytes most certainly could.&lt;/p&gt;
&lt;/div&gt;
</description><guid isPermaLink="true">http://aaron.maenpaa.ca/blog/entries/2007/12/08/lorem-ipsum-hebrew/</guid><pubDate>Sat, 08 Dec 2007 20:16:10 GMT</pubDate></item></channel></rss>