<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Every bit a fool!</title>
	<atom:link href="http://therandomfool.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://therandomfool.wordpress.com</link>
	<description>Randomness, economics, simulation, machine learning, etc.</description>
	<lastBuildDate>Fri, 22 Jul 2011 16:55:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='therandomfool.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Every bit a fool!</title>
		<link>http://therandomfool.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://therandomfool.wordpress.com/osd.xml" title="Every bit a fool!" />
	<atom:link rel='hub' href='http://therandomfool.wordpress.com/?pushpress=hub'/>
		<item>
		<title></title>
		<link>http://therandomfool.wordpress.com/2011/07/22/44/</link>
		<comments>http://therandomfool.wordpress.com/2011/07/22/44/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 13:56:55 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[Genetic Algorithm]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Scalala]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/?p=44</guid>
		<description><![CDATA[The genetic optimizer is complete and works both for Int and Double based problem domains. I also have similar implementations for random, hill climbing and annealing (all based on Programming Collective Intelligence). The OptimizeQuery is what needs to be defined by an application that needs to use the optimizers (it is the same one for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=44&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The genetic optimizer is complete and works both for Int and Double based problem domains. I also have similar implementations for random, hill climbing and annealing (all based on <a href="http://www.amazon.com/Programming-Collective-Intelligence-Building-Applications/dp/0596529325" title="Programming Collective Intelligence" target="_blank">Programming Collective Intelligence</a>).</p>
<p><pre class="brush: scala;">
class GeneticOptimizer[@specialized(Int, Double) T](
    popsize:Int=50, mutprop:Double=0.2, elite:Double=0.2, maxiter:Int=100)
    (implicit ops:OptimizeOps[T], s:Scalar[T])
    extends Optimizer[T] {

  override def apply(query:OptimizeQuery[T])(implicit ops:OptimizeOps[T], s:Scalar[T]):DenseVectorCol[T] = {
    var pop = (0 until popsize).map(i =&gt; ops.generateRandom(query.domain))
    val topelite = (elite*popsize).toInt
    var scores:IndexedSeq[(Double,ops.VectorType)] = null

    def iter = {
      scores = (for(v &lt;- pop) yield (query.cost(v),v)).sortWith(_._1 &lt; _._1)
      val ranked = for((s,v) &lt;- scores) yield v

      pop = ranked.slice(0,topelite)

      def fill = {
        if (random &lt; mutprop)
          pop = pop :+ ops.mutate(ranked((random*topelite).toInt),query.step,query.domain)
        else
          pop = pop :+ ops.crossover(ranked((random*topelite).toInt),
                                     ranked((random*topelite).toInt),
                                     query.domain)
      }

      (pop.size to popsize).foreach(i =&gt; fill)
    }

    (0 until maxiter).foreach(i =&gt; iter)

    scores.head._2
  }
}
</pre></p>
<p>The <code>OptimizeQuery</code> is what needs to be defined by an application that needs to use the optimizers (it is the same one for all the optimizers:</p>
<p><pre class="brush: scala;">
trait OptimizeQuery[@specialized(Int, Double) T] {
  def cost(sol:DenseVectorCol[T]):Double
  def domain:IndexedSeq[(T,T)]
  def step:T
}
</pre></p>
<p>The <code>cost</code> function should calculate the cost of the given solution. The <code>domain</code> is a sequence of allowed min and max values for each item in a solution vector. The <code>step</code> controls the learning rate (should really be dynamic for Double based problem domains).</p>
<p>The <code>OptimizeOps</code> is an internal class with the necessary primitive ops for the problem domains with specializations for Int and Double. The template class looks as follows:</p>
<p><pre class="brush: scala;">
@implicitNotFound(msg=&quot;${T} is not an optimizable scalar value&quot;)
trait OptimizeOps[@specialized(Int, Double) T] {
  type VectorType = DenseVectorCol[T]
  def generateOffset(sol:VectorType,i:Int,dir:T,domain:IndexedSeq[(T,T)]):VectorType
  def generateRandom(domain:IndexedSeq[(T,T)]):VectorType
  def generateNeighbors(sol:VectorType,step:T,domain:IndexedSeq[(T,T)]):List[VectorType]
  def mutate(vec:VectorType,step:T,domain:IndexedSeq[(T,T)]):VectorType
  def crossover(vec1:VectorType,vec2:VectorType,domain:IndexedSeq[(T,T)]):VectorType
  def rand(min:T,max:T):T
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=44&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/07/22/44/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
		<item>
		<title>Real world complexity and optimization</title>
		<link>http://therandomfool.wordpress.com/2011/07/20/real-world-complexity-and-optimization/</link>
		<comments>http://therandomfool.wordpress.com/2011/07/20/real-world-complexity-and-optimization/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 14:03:01 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[Genetic Algorithm]]></category>
		<category><![CDATA[Problem Solving]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/?p=41</guid>
		<description><![CDATA[I am just finishing a small optimizer using a genetic algorithm (it works and is under 30 lines of code but not nice enough yet) and I saw the following TED video discussing genetic algorithms:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=41&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am just finishing a small optimizer using a genetic algorithm (it works and is under 30 lines of code but not nice enough yet) and I saw the following TED video discussing genetic algorithms:</p>
<object width="446" height="326"><param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"></param><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always"/><param name="wmode" value="transparent"></param><param name="bgColor" value="#ffffff"></param> <param name="flashvars" value="vu=http://video.ted.com/talk/stream/2011G/Blank/TimHarford_2011G-320k.mp4&su=http://images.ted.com/images/ted/tedindex/embed-posters/TimHarford-2011G.embed_thumbnail.jpg&vw=432&vh=240&ap=0&ti=1190&lang=eng&introDuration=15330&adDuration=4000&postAdDuration=830&adKeys=talk=tim_harford;year=2011;theme=new_on_ted_com;theme=unconventional_explanations;theme=tales_of_invention;theme=not_business_as_usual;theme=a_taste_of_tedglobal_2011;event=TEDGlobal+2011;tag=Business;tag=Culture;tag=creativity;tag=society;&preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" allowScriptAccess="always" flashvars="vu=http://video.ted.com/talk/stream/2011G/Blank/TimHarford_2011G-320k.mp4&su=http://images.ted.com/images/ted/tedindex/embed-posters/TimHarford-2011G.embed_thumbnail.jpg&vw=432&vh=240&ap=0&ti=1190&lang=eng&introDuration=15330&adDuration=4000&postAdDuration=830&adKeys=talk=tim_harford;year=2011;theme=new_on_ted_com;theme=unconventional_explanations;theme=tales_of_invention;theme=not_business_as_usual;theme=a_taste_of_tedglobal_2011;event=TEDGlobal+2011;tag=Business;tag=Culture;tag=creativity;tag=society;"></embed></object>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=41&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/07/20/real-world-complexity-and-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
		<item>
		<title>Switched to Intellij IDEA</title>
		<link>http://therandomfool.wordpress.com/2011/07/18/switched-to-intellij-idea/</link>
		<comments>http://therandomfool.wordpress.com/2011/07/18/switched-to-intellij-idea/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 08:32:02 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[Intellij IDEA]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Sbt]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/?p=39</guid>
		<description><![CDATA[I just switched to Intellij IDEA from Eclipse. The IDEA has a fsc build server that compensates (at least to some extent) for the slow builds of Scala. I found a plugin to generate IDEA projects from SBT: https://github.com/mpeltonen/sbt-idea. After a few tweaks it seems to work great. I am becoming more and more impressed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=39&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just switched to Intellij IDEA from Eclipse. The IDEA has a fsc build server that compensates (at least to some extent) for the slow builds of Scala.</p>
<p>I found a plugin to generate IDEA projects from SBT: <a title="https://github.com/mpeltonen/sbt-idea" href="https://github.com/mpeltonen/sbt-idea" target="_blank">https://github.com/mpeltonen/sbt-idea</a>. After a few tweaks it seems to work great.</p>
<p>I am becoming more and more impressed with the SBT, it is really powerful stuff. </p>
<p>The Scala compiler is however dead slow (even with fsc).  It is really a grind. I estimate it to be 4-5 times slower than a Java build (which is not exactly lighting fast). Can there not be a development mode that avoids optimizations and stuff?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=39&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/07/18/switched-to-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
		<item>
		<title>ANN in Scala</title>
		<link>http://therandomfool.wordpress.com/2011/07/18/ann-in-scala/</link>
		<comments>http://therandomfool.wordpress.com/2011/07/18/ann-in-scala/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 08:09:09 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Scalala]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/?p=35</guid>
		<description><![CDATA[I just finished a port of a back-propagating Artificial Neural Network, ANN. The original code can be found here (also written in Scala). My code uses the Scalala library and, because of that, much more compact, only 130 lines of code. I find the Scalala library to be very nice but there seems to be a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=35&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just finished a port of a back-propagating Artificial Neural Network, ANN. The original code can be found <a title="here" href="https://github.com/yannart/Scala-Neural-Network/blob/master/src/main/scala/com/yannart/neuralnetwork/NeuralNetwork.scala" target="_blank">here</a> (also written in Scala).</p>
<p>My code uses the Scalala library and, because of that, much more compact, only 130 lines of code.</p>
<p>I find the Scalala library to be very nice but there seems to be a lot of small bugs and not always easy to learn.</p>
<p>The code still missing to account for the bias (just like the original code).</p>
<p>&nbsp;</p>
<p><pre class="brush: scala;">
package scalai.ann

import scalala.scalar._
import scalala.tensor._
import scalala.library._
import scalai._
import scalai.utils._
import scalai.distance.Distance._
import scalala.tensor.dense.{DenseVectorCol, DenseMatrix, DenseVector}
import scala.math._

abstract class ActivationFunction{
	def eval( value : Double) : Double
}

object Sigmoid extends ActivationFunction {
	override def eval ( value: Double) : Double = {
		1d / (1d + exp(-value))
	}
}

class Layer(val inputNum: Int, var weights:DenseMatrix[Double]) {

  import Sigmoid.eval

  val numNeurons = weights.numRows
  val numWeights = weights.numCols - 1
  val biasPos = numWeights
  var errors = DenseVectorCol.zeros[Double](weights.numRows)
  var outputs = DenseVectorCol.zeros[Double](weights.numRows)
  var pastErrors = DenseMatrix.zeros[Double](weights.numRows, weights.numCols)
  
  def this(inputNum: Int, neuronNum: Int) = {
    this(inputNum,Utils.random(neuronNum,inputNum+1,-2.4,2.4))
  }
  
  def run(inputs:DenseVectorCol[Double]) : DenseVectorCol[Double] = {
    outputs = weights(::,0 until numWeights) * inputs
    outputs.foreachKey((i) =&gt; outputs(i) = eval(outputs(i)))
    //println(outputs.t)
    outputs
  }
  
  override def toString() : String = {  
    weights.toString(weights.numRows, weights.numCols, (d:Double) =&gt; d.toString)
  }
}

class Perceptron(val layers:Array[Layer]){
  
  def this(perceptronInputNum:Int, neuronLayerNum:Array[Int]) = {
    this(new Array[Layer](neuronLayerNum.size))
    
    //Inputs for first layer equals the inputs of the perceptron
    var layerInputNum = perceptronInputNum

    //Creates the layers with each the right number of weights
    for(i &lt;- 0 until neuronLayerNum.size){

      //creates the layer
      layers(i) = new Layer(layerInputNum, neuronLayerNum(i))

      //the number of inputs of the next
      //layer is the current number of weights
      layerInputNum = neuronLayerNum(i)
    }
  }
  
  def run(inputs:DenseVectorCol[Double]):DenseVectorCol[Double] = {
    var layerInput = inputs

    layers.foreach(l =&gt; layerInput = l.run(layerInput))

    layerInput
  }
  
  def calculateErrors (inputs: DenseVectorCol[Double], outputs: DenseVectorCol[Double]) = {

    //For each layer from last to first
    for (layerIndex &lt;- (0 until layers.size).reverse) {
      //current layer
      val layer = layers(layerIndex)

      //Last factor of the error calculation
      if(layerIndex == layers.size - 1){ //Last layer`
        layer.errors := (layer.outputs - (layer.outputs :* layer.outputs)) :* (outputs - layer.outputs)
      } else { //Hidden layers
        val nextLayer = layers(layerIndex + 1)
        val tmp = nextLayer.errors.t * nextLayer.weights(::,0 until nextLayer.numWeights)
        layer.errors := (layer.outputs - (layer.outputs :* layer.outputs)) :* tmp
      }
    }
  }
  
  def learn (inputs: DenseVectorCol[Double], outputs: DenseVectorCol[Double]) : Double = {

    val learnLevel : Double = 0.3
    val alfa : Double =  0.9

    //For all the layers but the first
    for(layerIndex &lt;- (1 until layers.size).reverse) {
      val layer = layers(layerIndex)
      val prevLayer = layers(layerIndex - 1)

      layer.pastErrors(::,0 until layer.numWeights) := layer.errors * prevLayer.outputs.t * learnLevel +
                                                       layer.pastErrors(::,0 until layer.numWeights) * alfa
      layer.weights(::,0 until layer.numWeights) := layer.pastErrors(::,0 until layer.numWeights) +
                                                    layer.weights(::,0 until layer.numWeights)
      
      layer.pastErrors(::,layer.biasPos) := layer.errors * -learnLevel +
                                                layer.pastErrors(::,layer.biasPos) * alfa
      layer.weights(::,layer.biasPos) := layer.pastErrors(::,layer.biasPos) +
                                             layer.weights(::,layer.biasPos)
    }

    //For the first layer
    val layer = layers.head
    
    layer.pastErrors(::,0 until layer.numWeights) := layer.errors * inputs.t * learnLevel +
                                                     layer.pastErrors(::,0 until layer.numWeights) * alfa
    layer.weights(::,0 until layer.numWeights) := layer.pastErrors(::,0 until layer.numWeights) +
                                                  layer.weights(::,0 until layer.numWeights)

    layer.pastErrors(::,layer.biasPos) := layer.errors * -learnLevel +
                                              layer.pastErrors(::,layer.biasPos) * alfa
    layer.weights(::,layer.biasPos) := layer.pastErrors(::,layer.biasPos) + layer.weights(::,layer.biasPos)

    (outputs - layers.last.outputs).map(pow(_,2)).sum
  }
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=35&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/07/18/ann-in-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
		<item>
		<title>My first Scala drawing</title>
		<link>http://therandomfool.wordpress.com/2011/07/03/my-first-scala-drawing/</link>
		<comments>http://therandomfool.wordpress.com/2011/07/03/my-first-scala-drawing/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 10:12:00 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/2011/07/03/my-first-scala-drawing</guid>
		<description><![CDATA[I ported some code from Collective Intelligence. The code has converted from Python to Scala. The code is for a Dendrogram. Looks very much like the original Python code but this is type safe and runs several times faster, pretty cool:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=7&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;">
</div>
<p>I ported some code from <a href="http://oreilly.com/catalog/9780596529321">Collective Intelligence</a>. The code has converted from Python to Scala.
<div style="text-align:center;">
<div><img src="http://therandomfool.files.wordpress.com/2011/07/blogdata.jpg?w=183" border="0" alt="" /></div>
<p></div>
<div>The code is for a Dendrogram. Looks very much like the original Python code but this is type safe and runs several times faster, pretty cool:</div>
<div>
<pre class="brush: scala;">
class Dendrogram(hier:Hierarchical,labels:List[String]){
    def height:Double = 20*hier.height
    def width:Double = 1200
    
    def draw(draw:DrawContext):Unit = {
      if (height == 0) return 

      val scaling=(draw.width-150)/hier.depth
      
      def drawNode(hier:Hierarchical,x:Double,y:Double):Unit = {       
        if (hier.id &lt; 0) {
          val children = hier.children
          assert(children.length == 2)
          
          val h = children.map(_.height*20)
          val top = y - h.sum/h.length
          val bottom = y + h.sum/h.length
          val ll = hier.distance*scaling
          
          draw.line((x,top+h(0)/2,x,bottom-h(1)/2),fill=(255,0,0))
          draw.line((x,top+h(0)/2,x+ll,top+h(0)/2),fill=(255,0,0))
          draw.line((x,bottom-h(1)/2,x+ll,bottom-h(1)/2),fill=(255,0,0))
          
          drawNode(children(0),x+ll,top+h(0)/2)
          drawNode(children(1),x+ll,bottom-h(1)/2)          
        } else {
          assert(hier.children.length == 0)
          draw.text((x+5,y+6),labels(hier.id),(0,0,0))
        }
      }

      draw.rect(fill=(255,255,255))

      draw.line((0,draw.height/2,10,draw.height/2),fill=(255,0,0))
      
      drawNode(hier,10,draw.height/2)
    }
}
</pre>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=7&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/07/03/my-first-scala-drawing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>

		<media:content url="http://therandomfool.files.wordpress.com/2011/07/blogdata.jpg?w=183" medium="image" />
	</item>
		<item>
		<title>Getting started with Scala</title>
		<link>http://therandomfool.wordpress.com/2011/07/01/getting-started-with-scala/</link>
		<comments>http://therandomfool.wordpress.com/2011/07/01/getting-started-with-scala/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 15:28:00 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Sbt]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Scalala]]></category>
		<category><![CDATA[Slick]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/2011/07/01/getting-started-with-scala</guid>
		<description><![CDATA[I just recently had a look at the Scala programming language. It seems to have some great features and can run all Java libraries. I have found a few problems getting started. It mainly involves: A lot of new libraries that work in different ways than I am used to (like a mix of Java [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=6&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just recently had a look at the Scala programming language. It seems to have some great features and can run all Java libraries.
<div>
</div>
<div>I have found a few problems getting started. It mainly involves:</div>
<div>
<ul>
<li>A lot of new libraries that work in different ways than I am used to (like a mix of Java and functional, which it is).</li>
<li>Problems with tools and IDEs. Netbeans integration is totally worthless. Eclipse integration works but very bad compared to what is supported in Java.</li>
<li>Quibbles with generic programming and traits. Seems like there are a lot of implicit magic going on and it seems to get it wrong sometimes.</li>
</ul>
<div>So far I am not sold on the advanced type system. It seems to be more confusing than helpful. It looked great when I read Martin Oderskys excellent book, hmm. It is also very hard to follow the documentation and all the implicit conversions taking place.</div>
</div>
<div>
</div>
<div>I intend to use Scala to develop some utilities for machine learning and simulation. I have found the following libraries could be helpful:</div>
<div>
</div>
<div>
<ul>
<li>Scalala &#8211; Linear Algebra library similar to Matlab.</li>
<li>Slick &#8211; Java library for 2d games. Helpful for visualization.</li>
<li>Sbt &#8211; Scala Simple Build Tool. Seems excellent. Automatically downloads dependencies, supports sub projects, building, packaging, console (since Scala can be used as an interpreter).</li>
<li>SbtEclipsify &#8211; Creates Eclipse projects from Sbt projects. Works very easily (you still have to add project dependencies in Eclipse though).</li>
</ul>
</div>
<div>
</div>
<div class="blogger-post-footer"><img width='1' height='1' src='' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=6&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/07/01/getting-started-with-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
		<item>
		<title>Exponential growth and medicine</title>
		<link>http://therandomfool.wordpress.com/2011/06/26/exponential-growth-and-medicine/</link>
		<comments>http://therandomfool.wordpress.com/2011/06/26/exponential-growth-and-medicine/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 08:06:00 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/2011/06/26/exponential-growth-and-medicine</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=5&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<object width="446" height="326"><param name="movie" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf"></param><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always"/><param name="wmode" value="transparent"></param><param name="bgColor" value="#ffffff"></param> <param name="flashvars" value="vu=http://video.ted.com/talk/stream/2010X/Blank/DanielKraft_2010X-320k.mp4&su=http://images.ted.com/images/ted/tedindex/embed-posters/DanielKraft-2010X.embed_thumbnail.jpg&vw=432&vh=240&ap=0&ti=1168&lang=eng&introDuration=15330&adDuration=4000&postAdDuration=830&adKeys=talk=daniel_kraft_medicine_s_future;year=2011;theme=new_on_ted_com;theme=might_you_live_a_great_deal_longer;theme=medicine_without_borders;theme=a_taste_of_tedx;event=TEDxMaastricht;tag=Design;tag=Science;tag=Technology;tag=health+care;&preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><embed src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" pluginspace="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" bgColor="#ffffff" width="446" height="326" allowFullScreen="true" allowScriptAccess="always" flashvars="vu=http://video.ted.com/talk/stream/2010X/Blank/DanielKraft_2010X-320k.mp4&su=http://images.ted.com/images/ted/tedindex/embed-posters/DanielKraft-2010X.embed_thumbnail.jpg&vw=432&vh=240&ap=0&ti=1168&lang=eng&introDuration=15330&adDuration=4000&postAdDuration=830&adKeys=talk=daniel_kraft_medicine_s_future;year=2011;theme=new_on_ted_com;theme=might_you_live_a_great_deal_longer;theme=medicine_without_borders;theme=a_taste_of_tedx;event=TEDxMaastricht;tag=Design;tag=Science;tag=Technology;tag=health+care;"></embed></object>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=5&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/06/26/exponential-growth-and-medicine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
		<item>
		<title>The beginning</title>
		<link>http://therandomfool.wordpress.com/2011/06/25/the-beginning/</link>
		<comments>http://therandomfool.wordpress.com/2011/06/25/the-beginning/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 09:56:00 +0000</pubDate>
		<dc:creator>therandomfool</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://therandomfool.wordpress.com/2011/06/25/the-beginning</guid>
		<description><![CDATA[This blog will contain a bit of everything but will focus mainly on gameification, machine learning, behavior simulation and games in society. If your interest is mainly in video games you are probably better of somewhere else. Please note that I am not an expert in either of these subjects. Wikipedias definition of Gameification: The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=4&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog will contain a bit of everything but will focus mainly on gameification, machine learning, behavior simulation and games in society. If your interest is mainly in video games you are probably better of somewhere else.</p>
<div>Please note that I am not an expert in either of these subjects.</div>
<div>Wikipedias definition of Gameification:</div>
<blockquote>
<div><span class="Apple-style-span" style="font-family:sans-serif;">The use of <a class="mw-redirect" style="text-decoration:none;background-image:none;background-attachment:initial;background-color:initial;" title="Game play" href="http://en.wikipedia.org/wiki/Game_play"><span class="Apple-style-span">game play</span></a> mechanics for non-game applications.</span></div>
</blockquote>
<p><span class="Apple-style-span">The basis for most game play mechanics in gameification is to provide the right incentives for people to do something and to keep doing it. </span></p>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span"></p>
<p></span></span></div>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span">An example is the frequent flyer programs offered by airlines. It gives an incentive for passengers to fly more while keeping the costs down for the airlines. The incentive? Status.</span></span></div>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span"></p>
<p></span></span></div>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span">A great introduction to this subject can be found in this video (it also contains a serious mistake in the frequent flyer programs). The video is however 1 hour long so make sure to make time for it before watching:</span></span></div>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span"><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='425' height='349' src='http://www.youtube.com/embed/6O1gNVeaE4g?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<p></span></span></div>
<p><span class="Apple-style-span"><span class="Apple-style-span" style="line-height:20px;"></p>
<p></span></span></p>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span"></p>
<p></span></span></div>
<div><span class="Apple-style-span" style="line-height:20px;"><span class="Apple-style-span"></p>
<p></span></span></div>
<div class="blogger-post-footer"><img alt="" width="1" height="1" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/therandomfool.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/therandomfool.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/therandomfool.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/therandomfool.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/therandomfool.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/therandomfool.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/therandomfool.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/therandomfool.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=therandomfool.wordpress.com&amp;blog=24763694&amp;post=4&amp;subd=therandomfool&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://therandomfool.wordpress.com/2011/06/25/the-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0da2e55d2c191cdb032c1bc9000e8e46?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">therandomfool</media:title>
		</media:content>
	</item>
	</channel>
</rss>
