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

<channel>
	<title>Manfredas Zabarauskas&#039; Blog</title>
	<atom:link href="http://blog.zabarauskas.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zabarauskas.com</link>
	<description>We are what we repeatedly do; excellence, then, is not an act but a habit. -- Aristotle</description>
	<lastBuildDate>Tue, 29 Nov 2011 03:23:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>All Shall Be Well</title>
		<link>http://blog.zabarauskas.com/all-shall-be-well/</link>
		<comments>http://blog.zabarauskas.com/all-shall-be-well/#comments</comments>
		<pubDate>Sat, 22 Oct 2011 19:43:38 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[alanya]]></category>
		<category><![CDATA[cambridge]]></category>
		<category><![CDATA[cst]]></category>
		<category><![CDATA[exams]]></category>
		<category><![CDATA[internship]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[sdet]]></category>
		<category><![CDATA[turkey]]></category>
		<category><![CDATA[vacation]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=1148</guid>
		<description><![CDATA[You step in the stream, But the water has moved on. This page is not here.-- Internet Folkore Rather surprisingly even for me, it has already been over five months since my last post. Writing a thorough and yet succinct account about everything that happened over that time is way beyond my literary abilities, so [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><em>You step in the stream,<br />
But the water has moved on.<br />
This page is not here.<br/>-- <a href="http://www.gnu.org/fun/jokes/error-haiku.html" target="_blank">Internet Folkore</a></em></p>
<p><em>Rather surprisingly even for me, it has already been over five months since my last post. Writing a thorough and yet succinct account about everything that happened over that time is way beyond my literary abilities, so here's a bullet-point summary about a few things worth mentioning from that period.</em></p>
<p><strong>1. Cambridge CST Part IB Exams</strong> <small><div class="wp-caption alignleft" style="width: 130px">
<a href="http://blog.zabarauskas.com/img/scan098_small.jpg" title="University of Cambridge, Jennings Prize (2011)" class="thickbox" rel="singlepic62" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/62__120x167_scan098_small.jpg" alt="University of Cambridge, Jennings Prize" title="University of Cambridge, Jennings Prize" />
</a>
<p class="wp-caption-text">Jennings Prize '11</p></div></small> </p>
<p>Back in June 2012, folks at Computer Science Tripos Part IB (including me) had the opportunity to enjoy four consecutive days of exams. The structure of papers was straightforward: three hours, nine questions (one or two questions per course); five questions had to be answered.</p>
<p>If I could give a single advice to someone who is about to go through this process, it would be "<b>time</b>". Three hours will not be enough to answer five questions, and there will be almost no time to think about anything if you get stuck. Most likely, the bottleneck in your answers will be the speed of your writing, so don't make a huge mistake by thinking that you will be able to do less revision and figure out things "on the spot". You won't.</p>
<p>At the end of the day, of course, it's not the grades that matter, but... receiving the thing on the left was still nice.<br />
&nbsp;<br />
<strong>2. Internship at Microsoft</strong></p>
<p><small><div class="wp-caption alignright" style="width: 260px">
<a href="http://blog.zabarauskas.com/img/dscn0139.jpg" title="My office at Microsoft (Redmond, WA, 2011)" class="thickbox" rel="singlepic57" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/57__250x187_dscn0139.jpg" alt="My office at Microsoft" title="My office at Microsoft" />
</a>
<p class="wp-caption-text">My office at Microsoft (Redmond, WA, 2011)</p></div></small> After three days from my last exam I arrived to my office at Microsoft, in Redmond, WA. </p>
<p>Over the summer, I was working as a Software Development Engineer in Test in Microsoft Office team. In particular, I was writing a performance testing suite for the feature that is used across Office and Windows divisions when developing and updating over 50k+ pages of documentation on <a href="http://msdn.microsoft.com" target="_blank">MSDN</a>.</p>
<p><small><div class="wp-caption alignleft" style="width: 210px">
<a href="http://blog.zabarauskas.com/img/dscn0182.jpg" title="Microsoft Campus, Redmond, WA, 2011" class="thickbox" rel="singlepic60" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/60__200x150_dscn0182.jpg" alt="Microsoft Campus, Redmond, WA, 2011" title="Microsoft Campus, Redmond, WA, 2011" />
</a>
<p class="wp-caption-text">Microsoft Campus</p></div></small> Well, I say "working". The summer was literally packed with events for interns! Starting with the intern day of caring, when we spent a full working day volunteering for the community, and ending with the huge intern celebration involving <a href="http://www.davematthewsband.com" target="_blank">Dave Matthews</a> and customized Xbox + Kinect bundles for everyone (photo on the right)!</p>
<p><small><div class="wp-caption alignright" style="width: 143px">
<a href="http://blog.zabarauskas.com/img/dscn0119.jpg" title="Xbox + Kinect bundle customized for Microsoft interns (2011)" class="thickbox" rel="singlepic56" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/56__133x100_dscn0119.jpg" alt="Intern Xbox + Kinect Bundle" title="Intern Xbox + Kinect Bundle" />
</a>
<p class="wp-caption-text">Customized Xbox</p></div></small> And then, there were meetings and talks by senior people in the company. And by senior people, I don't mean my manager's manager. Just to throw in a few names, we heard talks from <a href="http://www.microsoft.com/presspass/exec/lees" target="_blank">Andy Lees</a>, <a href="http://www.microsoft.com/presspass/exec/ssinofsky" target="_blank">Steven Sinofsky</a> and, of course, <a href="http://www.microsoft.com/presspass/exec/steve" target="_blank">Steve Ballmer</a> (or as he's known within the company, <i>SteveB</i>). I even had a half-an-hour chat with the head of the Microsoft Office Division, <a href="http://www.microsoft.com/presspass/exec/kurtd">Kurt DelBene</a> - definitely one of my best experiences over the whole internship!</p>
<p>Also, the perks that you get as an intern are incredible: paid flights, subsidized housing, free bike, two weeks of free rental car, gym plan (and if you're around Redmond, WA area - check out the <a href="http://www.proclub.com/Membership/PhotoGallery/tabid/1025/Default.aspx" target="_blank">Pro Sports Club</a>). That, and all-you-can-drink soda at work! (OK, so you don't get free food as in some other places, but trust me, you will able to afford food from your intern compensation package).</p>
<p><small><div class="wp-caption alignright" style="width: 160px">
<a href="http://blog.zabarauskas.com/img/dscn01731.jpg" title="Seattle skyline, WA, 2011" class="thickbox" rel="singlepic59" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/59__150x200_dscn01731.jpg" alt="Seattle Skyline, WA, 2011" title="Seattle Skyline, WA, 2011" />
</a>
<p class="wp-caption-text">Seattle Skyline, WA, 2011</p></div></small> Finally, there are people that you are working with. If you are as lucky as me, then everyone's going to be exceptionally smart, and nevertheless, extremely approachable. I wouldn't have achieved <small><div class="wp-caption alignleft" style="width: 160px">
<a href="http://blog.zabarauskas.com/img/dscn0081.jpg" title="With coworkers at Vancouver, BC, Canada, 2011" class="thickbox" rel="singlepic61" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/61__150x112_dscn0081.jpg" alt="With Coworkers at Vancouver, BC, Canada, 2011" title="With Coworkers at Vancouver, BC, Canada, 2011" />
</a>
<p class="wp-caption-text">Vancouver, BC, Canada</p></div></small>anything over this summer if not for my team; their help and guidance was invaluable. And not only limited to the working environment - the weekend trip to Vancouver, BC was pretty epic, and I already  miss our regular Friday basketball games, just outside the office.</p>
<p>However, to make things even better, I have already received an offer for the summer of 2012! If there aren't any major changes, there is a good chance that I will spend my next summer working as a Program Manager intern at Microsoft Office team!</p>
<p><small><div class="wp-caption alignleft" style="width: 628px">
<a href="http://blog.zabarauskas.com/img/dscn0154.jpg" title="Microsoft Campus, Redmond, WA, 2011" class="thickbox" rel="singlepic58" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/58__618x337_dscn0154.jpg" alt="Microsoft Campus, Redmond, WA, 2011" title="Microsoft Campus, Redmond, WA, 2011" />
</a>
<p class="wp-caption-text">Microsoft Campus (Redmond, WA, 2011)</p></div></small><br />
&nbsp;<br />
<strong>3. Vacation</strong></p>
<p>This year me and Ada have decided to go to Turkey. We have spent two final weeks of September in a beautiful <a href="http://en.wikipedia.org/wiki/Alanya" target="_blank">Alanya</a> region: the weather (every single day above 30°C/86°F) justified the nickname of the region ("Where The Sun Smiles") and the Mediterranean Sea was simply magnificent. We were also very lucky with the choice of the hotel: two pools, five minutes away from the sea, extremely polite and courteous staff, and great all inclusive food and drinks!</p>
<p>Anyway, a picture is worth more than a thousand words, so here's a few of them. Enjoy!</p>
<div class="ngg-galleryoverview" id="ngg-gallery-5-1148">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-52" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/alanya/DSCN0444.JPG" title="Alanya, 2011" class="thickbox" rel="set_5" >
								<img title="Alanya, 2011" alt="Alanya, 2011" src="http://blog.zabarauskas.com/wp-content/gallery/alanya/thumbs/thumbs_DSCN0444.JPG" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-50" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/alanya/DSCN0349.JPG" title="Alanya, 2011" class="thickbox" rel="set_5" >
								<img title="Alanya, 2011" alt="Alanya, 2011" src="http://blog.zabarauskas.com/wp-content/gallery/alanya/thumbs/thumbs_DSCN0349.JPG" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-53" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/alanya/DSCN0449.JPG" title="Alanya, 2011" class="thickbox" rel="set_5" >
								<img title="Alanya, 2011" alt="Alanya, 2011" src="http://blog.zabarauskas.com/wp-content/gallery/alanya/thumbs/thumbs_DSCN0449.JPG" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-49" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/alanya/DSCN0261.JPG" title="Alanya, 2011" class="thickbox" rel="set_5" >
								<img title="Alanya, 2011" alt="Alanya, 2011" src="http://blog.zabarauskas.com/wp-content/gallery/alanya/thumbs/thumbs_DSCN0261.JPG" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-54" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/alanya/dscn0424.jpg" title="Alanya, 2011" class="thickbox" rel="set_5" >
								<img title="Alanya, 2011" alt="Alanya, 2011" src="http://blog.zabarauskas.com/wp-content/gallery/alanya/thumbs/thumbs_dscn0424.jpg" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<p><i>P.S. Fact: it is possible to get a 500% discount when buying a leather jacket in Turkey. Verified. And it takes only a little bit over two hours of negotiating.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/all-shall-be-well/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backpropagation Tutorial</title>
		<link>http://blog.zabarauskas.com/backpropagation-tutorial/</link>
		<comments>http://blog.zabarauskas.com/backpropagation-tutorial/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 23:16:25 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[applet]]></category>
		<category><![CDATA[backpropagation]]></category>
		<category><![CDATA[derivation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linear classifier]]></category>
		<category><![CDATA[multiple layer]]></category>
		<category><![CDATA[neural network]]></category>
		<category><![CDATA[perceptron]]></category>
		<category><![CDATA[single layer]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=848</guid>
		<description><![CDATA[// // The PhD thesis of Paul J. Werbos at Harvard in 1974 described backpropagation as a method of teaching feed-forward artificial neural networks (ANNs). In the words of Wikipedia, it lead to a "rennaisance" in the ANN research in 1980s. As we will see later, it is an extremely straightforward technique, yet most of [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
 function show_multiplelayer_applet() { var html_element, body_element, p_element, text_node; html_element = document.documentElement; body_element = html_element.lastChild; applet_element = document.createElement("applet"); text_node = document.createTextNode("Cannot start the applet! Please install the Java Runtime Environment."); applet_element.appendChild(text_node); applet_element.setAttribute("code", "com.zabarauskas.ai1.MultipleLayerApplet"); applet_element.setAttribute("archive", "http://www.zabarauskas.com/downloads/ANNs/multilayer.jar"); applet_element.setAttribute("height", "0"); applet_element.setAttribute("width", "0"); body_element.appendChild(applet_element); }
// ]]&gt;</script><script type="text/javascript">// <![CDATA[
 function show_singlelayer_applet() { var html_element, body_element, p_element, text_node; html_element = document.documentElement; body_element = html_element.lastChild; applet_element = document.createElement("applet"); text_node = document.createTextNode("Cannot start the applet! Please install the Java Runtime Environment."); applet_element.appendChild(text_node); applet_element.setAttribute("code", "com.zabarauskas.ai1.SingleLayerApplet"); applet_element.setAttribute("archive", "http://www.zabarauskas.com/downloads/ANNs/singlelayer.jar"); applet_element.setAttribute("height", "0"); applet_element.setAttribute("width", "0"); body_element.appendChild(applet_element); }
// ]]&gt;</script>The PhD thesis of <a href="http://en.wikipedia.org/wiki/Paul_Werbos" target="_blank">Paul J. Werbos</a> at Harvard in 1974 described backpropagation as a method of teaching <a href="http://en.wikipedia.org/wiki/Feedforward_neural_network" target="_blank">feed-forward artificial neural networks</a> (ANNs). In the words of Wikipedia, it lead to a "rennaisance" in the ANN research in 1980s.</p>
<p>As we will see later, it is an extremely straightforward technique, yet most of the tutorials online seem to skip a fair amount of details. Here's a simple (yet still thorough and mathematical) tutorial of how backpropagation works from the ground-up; together with a couple of example applets. Feel free to play with them (and watch the videos) to get a better understanding of the methods described below!</p>
<input type="submit" name="sub_button" onclick="javascript:show_singlelayer_applet()" style="width: 305px; float: left;" value="Launch the single-layer neural network applet!" width="305">
<input type="submit" name="sub_button" style="width: 305px; float: right;" onclick="javascript:show_multiplelayer_applet()" value="Launch the multilayer neural network applet!" width="305">
<p><small><div class="wp-caption alignleft" style="width: 304px"><iframe title="YouTube video player" width="293" height="336" src="http://www.youtube.com/embed/D8iMDH5va9M" frameborder="0" allowfullscreen></iframe><p class="wp-caption-text">Training a single perceptron (linear classifier)</p></div> <div class="wp-caption alignright" style="width: 304px"><iframe title="YouTube video player" width="293" height="336" src="http://www.youtube.com/embed/fAKwocta2wM" frameborder="0" allowfullscreen></iframe><p class="wp-caption-text">Training a multilayer neural network</p></div></small><br />
&nbsp;<br />
&nbsp; </p>
<p><strong>1. Background</strong></p>
<p>To start with, imagine that you have gathered some empirical data relevant to the situation that you are trying to predict - be it fluctuations in the stock market, chances that a tumour is benign, likelihood that the picture that you are seeing is a face or (like in the applets above) the coordinates of red and blue points.</p>
<p>We will call this data <em>training examples</em> and we will describe <script type='math/tex'>i</script><sup>th</sup> training example as a tuple <script type='math/tex'>(\vec{x_i}, y_i)</script>, where <script type='math/tex'>\vec{x_i} \in \mathbb{R}^n</script> is a vector of inputs and <script type='math/tex'>y_i \in \mathbb{R}</script> is the observed output.</p>
<p>Ideally, our neural network should output <script type='math/tex'>y_i</script> when given <script type='math/tex'>\vec{x_i}</script> as an input. In case that does not always happen, let's define the <em>error </em>measure as a simple squared distance between the actual observed output and the prediction of the neural network: <script type='math/tex'>E := \sum_i (h(\vec{x_i}) - y_i)^2</script>, where <script type='math/tex'>h(\vec{x_i})</script> is the output of the network.</p>
<p><strong>2. Perceptrons (building-blocks)</strong></p>
<p>The simplest classifiers out of which we will build our neural network are <a href="http://en.wikipedia.org/wiki/Perceptron" target="_blank"><em>perceptrons</em></a> (fancy name thanks to <a href="http://en.wikipedia.org/wiki/Frank_Rosenblatt" target="_blank">Frank Rosenblatt</a>). In reality, a perceptron is a plain-vanilla linear classifier which takes a number of inputs <script type='math/tex'>a_1, ..., a_n</script>, scales them using some weights <script type='math/tex'>w_1, ..., w_n</script>, adds them all up (together with some bias <script type='math/tex'>b</script>) and feeds everything through an <em>activation function</em> <script type='math/tex'>\sigma \in \mathbb{R} \rightarrow \mathbb{R}</script>.</p>
<p>A picture is worth a thousand equations:</p>
<p><small><div class="wp-caption aligncenter" style="width: 244px"><img title="Perceptron (linear classifier)" src="http://blog.zabarauskas.com/img/perceptron.gif" alt="Perceptron (linear classifier)" width="234" height="140" /><p class="wp-caption-text">Perceptron (linear classifier)</p></div></small></p>
<p>To slightly simplify the equations, define <script type='math/tex'>w_0 := b</script> and <script type='math/tex'>a_0 := 1</script>. Then the behaviour of the perceptron can be described as <script type='math/tex'>\sigma(\vec{a} \cdot \vec{w})</script>, where <script type='math/tex'>\vec{a} := (a_0, a_1, ..., a_n)</script> and <script type='math/tex'>\vec{w} := (w_0, w_1, ..., w_n)</script>.</p>
<p>To complete our definition, here are a few examples of typical activation functions:</p>
<ul>
<li><em>sigmoid:</em> <script type='math/tex'>\sigma(x) = \frac{1}{1 + \exp(-x)}</script>,</li>
<li><em>hyperbolic tangent:</em> <script type='math/tex'>\sigma(x) = \tanh(x)</script>,</li>
<li>plain <em>linear</em> <script type='math/tex'>\sigma(x) = x</script> and so on.</li>
</ul>
<p>Now we can finally start building neural networks.<span id="more-848"></span> The simplest kind of network that we can build is... exactly, one perceptron! Here's how we can train it to classify things!</p>
<p><strong>3. Single-layer neural network</strong></p>
<p>We defined the <em>error</em> earlier as <script type='math/tex'>E := \sum_i (h(\vec{x_i}) - y_i)^2</script>. Obviously, since we are using a single perceptron both our error and the output of the network (<script type='math/tex'>h_{\vec{w}}(\vec{x_i}) = \sigma(\vec{w} \cdot \vec{x_i})</script>) depend on the weights vector <script type='math/tex'>\vec{w}</script>.</p>
<p>Incorporating those observations into the updated error measure we obtain <script type='math/tex'>E(\vec{w}) := \sum_i (h_{\vec{w}}(\vec{x_i}) - y_i)^2</script>.</p>
<p>Our goal is to find such a vector of weights <script type='math/tex'>\vec{w}</script> that <script type='math/tex'>E(\vec{w})</script> is minimised - that way our perceptron will correctly predict the output for all inputs of our training examples!</p>
<p>We will do that by applying the <em>gradient descent</em> algorithm: in essence we will treat the error as a surface in <em>n</em>-dimensional space, then we will find a greatest downwards slope at the current point <script type='math/tex'>\vec{w_t}</script> and will go in that direction to obtain <script type='math/tex'>\vec{w}_{t+1}</script>. This way hopefully we will find a minimum point on the error surface and we will use the coordinates of that point as the final weight vector.</p>
<p>By skipping a great deal of maths on whether the minimum point exists, is it unique and global, can we "overjump" it by accident, what are the conditions for the following partial derivatives to exist, etc, etc; we will dive straight in hoping for the best and will calculate the <em><a href="http://en.wikipedia.org/wiki/Gradient" target="_blank">gradient</a></em> of the error surface at <script type='math/tex'>\vec{w_t}</script>. Then we will take a step in the opposite direction of the gradient (i.e. in the direction of the fastest decreasing slope on the error surface) to obtain <script type='math/tex'>\vec{w}_{t + 1}</script>.</p>
<p>To express it in a slightly more mathematical way, we will start with some <em>randomized (!) </em>weight vector <script type='math/tex'>\vec{w_0}</script> and will train our perceptron by updating the weights</p>
<p>\begin{align} \vec{w}_{t+1} := \vec{w_t} - \eta \frac{\partial E(\vec{w})}{\partial \vec{w}} \bigg|_{\vec{w_t}}, \end{align}</p>
<p>where <script type='math/tex'>\eta</script> is known as a <em>learning rate</em> (a simple scaling factor that typically ranges between zero and one).</p>
<p>Observe that</p>
<p>\begin{align} \frac{\partial E(\vec{w})}{\partial \vec{w}} = \left( \frac{\partial E(\vec{w})}{\partial w_0},\frac{\partial E(\vec{w})}{\partial w_1}, ... ,\frac{\partial E(\vec{w})}{w_n} \right), \end{align}</p>
<p>and we can calculate</p>
<p>\begin{align} \frac{\partial E(\vec{w})}{\partial w_j} &#038;= \frac{\partial}{\partial w_j} \sum_i (h_{\vec{w}}(\vec{x_i}) - y_i)^2 \\ &#038;= \sum_i 2(h_{\vec{w}}(\vec{x_i}) - y_i) \frac{\partial}{\partial w_j} (h_{\vec{w}}(\vec{x_i}) - y_i) \\ &#038;= \sum_i 2(h_{\vec{w}}(\vec{x_i}) - y_i) \frac{\partial}{\partial w_j} \sigma(\vec{x_i} \cdot \vec{w}) \\ &#038;= \sum_i 2(h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (\vec{x_i} \cdot \vec{w}) \frac{d}{d w_j} \vec{x_i} \cdot \vec{w} \\ &#038;= \sum_i 2(h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (\vec{x_i} \cdot \vec{w}) \frac{d}{d w_j} \sum_{k=1}^n a_k w_k \\ &#038;= 2 a_j \sum_i (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (\vec{x_i} \cdot \vec{w}) \end{align}</p>
<p>for each <script type='math/tex'>0 \leq j \leq n</script>.</p>
<p><strong>3.1. <em>Example single-layer neural network</em></strong></p>
<input type="submit" name="sub_button" onclick="javascript:show_singlelayer_applet()" style="width: 600px;" value="Launch the example single-layer neural network applet" width="600">
<p>In this applet, a perceptron takes two inputs (normalized <em>x</em> and <em>y</em> coordinates, i.e. <script type='math/tex'>a_1 = in_x</script>, <script type='math/tex'>a_2 = in_y</script>) and uses sigmoid as an activation function with the learning rate <script type='math/tex'>\eta = 0.1</script>.</p>
<p>Then, using a previous general result</p>
<p>\begin{align} \frac{\partial E(\vec{w})}{\partial w_j} &#038;= 2 a_j \sum_i (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (\vec{x_i} \cdot \vec{w}) \\ &#038;= 2 a_j \sum_i (\sigma(\vec{w} \cdot \vec{x_i}) - y_i) \sigma(\vec{x_i} \cdot \vec{w}) (1 - \sigma(\vec{x_i} \cdot \vec{w})), \end{align}</p>
<p>(since for the sigmoid activation function <script type='math/tex'>\sigma ' (x) = \sigma(x) (1 - \sigma(x))</script>); and thus</p>
<p>\begin{align} \frac{\partial E(\vec{w})}{\partial \vec{w}} = 2 \vec{a} \sum_i (\sigma(\vec{w} \cdot \vec{x_i}) - y_i) \sigma(\vec{x_i} \cdot \vec{w}) (1 - \sigma(\vec{x_i} \cdot \vec{w})), \end{align}</p>
<p>where <script type='math/tex'>\vec{a} = (1, in_x, in_y)</script>.</p>
<p>The final algorithm to update the weight vector <script type='math/tex'>\vec{w} = (w_0, w_1, w_2)</script> (which is initially randomized) then is</p>
<p>\begin{align} \vec{w}_{t+1} := \vec{w_t} - 0.2 \vec{a} \sum_i (h_{\vec{w}_t}(\vec{x_i}) - y_i) h_{\vec{w}_t}(\vec{x_i}) (1 - h_{\vec{w}_t}(\vec{x_i})), \end{align}</p>
<p>where <script type='math/tex'>h_{\vec{w}_t}(\vec{x_i}) = \sigma(\vec{w}_t \cdot \vec{x_i})</script>.</p>
<p>However, a single perceptron is extremely limited in the sense that different classes of examples must be separable with a hyperplane (hence the name, <em>linear </em>classifier), which is usually not the case in real-life applications.</p>
<p>Time to bump things up a notch: let's connect a few of them together to obtain a multilayer feed-forward neural network!</p>
<p><strong>4. Multilayer neural network</strong></p>
<p>Let's consider a general case first: a completely unrestricted feed-forward structure (with the only condition being that there are no loops between the perceptrons to avoid general madness and chaos). </p>
<p>Since it is structurally more complex than just a single perceptron, take a look at the following figure that explains some more notation:</p>
<p><small><div class="wp-caption aligncenter" style="width: 625px"><img title="Multilayer neural network" src="http://blog.zabarauskas.com/img/multilayer.gif" alt="Multilayer neural network" width="615" height="291" /><p class="wp-caption-text">Multilayer neural network</p></div></small></p>
<p>Here the weight <script type='math/tex'>w_{i \rightarrow j}</script> connects perceptrons <script type='math/tex'>i</script> and <script type='math/tex'>j</script>, the sum of the weighed inputs of perceptron <script type='math/tex'>j</script> is denoted by <script type='math/tex'>s_j := \sum_k z_k w_{k \rightarrow j}</script> where <script type='math/tex'>k</script> iterates over all perceptrons connected to <script type='math/tex'>j</script>, and the output of <script type='math/tex'>j</script> is written as <script type='math/tex'>z_j := \sigma(s_j)</script>, where <script type='math/tex'>\sigma</script> is <script type='math/tex'>j</script>'s activation function.</p>
<p>We will use the same error measure <script type='math/tex'>E(\vec{w}) := \sum_i (h_{\vec{w}}(\vec{x_i}) - y_i)^2</script>, except now the weights vector <script type='math/tex'>\vec{w}</script> will contain all the weights in the network, i.e. <script type='math/tex'>\vec{w} = (\;\;w_{i \rightarrow j}\;\;)</script> for all <script type='math/tex'>i, j</script>.</p>
<p>To find <script type='math/tex'>\vec{w}</script> that minimizes <script type='math/tex'>E(\vec{w})</script> using gradient descent we have to calculate <script type='math/tex'>\frac{\partial E(\vec{w})}{\partial \vec{w}}</script> (again). However, this time it is (very slightly) more involved.</p>
<p>First of all let's separate the contributions of individual training examples to the overall error using the following observation:<br />
\begin{align} \frac{\partial E(\vec{w})}{\partial \vec{w}} = \sum_i \frac{\partial E_i(\vec{w})}{\partial \vec{w}}, \end{align}<br />
where <script type='math/tex'>E_i(\vec{w}) = (h_{\vec{w}}(\vec{x_i}) - y_i)^2</script>.</p>
<p>Then</p>
<p>\begin{align} \frac{\partial E_i(\vec{w})}{\partial w_{j \rightarrow k}} &#038;= \frac{\partial}{\partial w_{j \rightarrow k}} (h_{\vec{w}}(\vec{x_i}) - y_i)^2 \\ &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial w_{j \rightarrow k}} \\ &#038;=  2 (h_{\vec{w}}(\vec{x_i}) - y_i) \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_k} \frac{\partial s_k}{\partial w_{j \rightarrow k}} \\ &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_k} z_j. \end{align}</p>
<p>If <script type='math/tex'>k</script> is an output node, then<br />
\begin{align} \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_k} = \frac{d \;\; \sigma(s_k)}{d \; s_k}  = \sigma' (s_k)\end{align}<br />
and thus<br />
\begin{align} \frac{\partial E_i(\vec{w})}{\partial w_{j \rightarrow k}} &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (s_k)\; z_j. \end{align}</p>
<p>However, if <script type='math/tex'>k</script> is not an output node, then a change in <script type='math/tex'>s_k</script> can affect all the nodes which are connected to <script type='math/tex'>k</script>'s output, i.e.<br />
\begin{align} \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_k} &#038;= \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial z_k} \frac{\partial z_k}{\partial s_k} \\ &#038;= \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial z_k} \sigma ' (s_k) \\ &#038;= \sum_{o \in \{ v \; | \; v \text{ is connected to } k \}} \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_o} \frac{\partial s_o}{\partial z_k} \sigma ' (s_k) \\ &#038;= \sum_{o \in \{ v \; | \; v \text{ is connected to } k \}} \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_o} w_{k \rightarrow o} \; \sigma ' (s_k), \end{align}<br />
... and we are almost done! All what is left to do is to place the <script type='math/tex'>i</script><sup>th</sup> example at the inputs of our neural network, calculate <script type='math/tex'>s_k</script> and <script type='math/tex'>z_k</script> for all the nodes (the <em>forward-propagation</em> step) and to work our way backwards from the output node calculating <script type='math/tex'>\frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_k}</script> (hence the name, <em>backpropagation</em>).</p>
<p>To summarize, if <script type='math/tex'>k</script> is an output node, then</p>
<p>\begin{align} \frac{\partial E_i(\vec{w})}{\partial w_{j \rightarrow k}} &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (s_k)\; z_j, \end{align}</p>
<p>otherwise</p>
<p>\begin{align} \frac{\partial E_i(\vec{w})}{\partial w_{j \rightarrow k}} &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (s_k)\; z_j \sum_{o \in \{ v \; | \; v \text{ conn. to } k \}} \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_o} w_{k \rightarrow o}. \end{align}</p>
<p>Then after the following is obtained<br />
\begin{align} \frac{\partial E_i(\vec{w})}{\partial \vec{w}} = \left( \; \; \frac{\partial E_i(\vec{w})}{\partial w_{j \rightarrow k}}   \; \; \right), \forall j, k \end{align}<br />
the weight vector can either be updated in one go (<em>batch</em> update)<br />
\begin{align} \vec{w}_{t+1} := \vec{w_t} - \eta \frac{\partial E(\vec{w})}{\partial \vec{w}} \bigg|_{\vec{w_t}} =  \vec{w_t} - \eta \sum_i \frac{\partial E_i(\vec{w})}{\partial \vec{w}}\bigg|_{\vec{w_t}}, \end{align}<br />
or it can be updated <em>sequentially</em> using one training example at a time:<br />
\begin{align} \vec{w}_{t+1} := \vec{w_t} - \eta \frac{\partial E_i(\vec{w})}{\partial \vec{w}} \bigg|_{\vec{w_t}}.\end{align}</p>
<p><strong>4.1. <em>Example multilayer network</em></strong></p>
<input type="submit" name="sub_button" onclick="javascript:show_multiplelayer_applet()" style="width: 600px;" value="Launch the example multilayer neural network applet" width="600">
<p>If you launch and play with the applet above, you will see that it is able to separate classes non-linearly (indicating that it's using more than one perceptron). It is built using this two-layer neural network:</p>
<p><small><div class="wp-caption aligncenter" style="width: 440px"><img title="Two-layer neural network example" src="http://blog.zabarauskas.com/img/multilayer_example.gif" alt="Two-layer neural network example" width="430" height="297" /><p class="wp-caption-text">Two-layer neural network example</p></div></small></p>
<p>The weights vector <script type='math/tex'>\vec{w}</script> contains all the weights in the network, i.e.<br />
\begin{align} \vec{w} = ( w_{in_1 \rightarrow 1}, w_{in_x \rightarrow 1}, w_{in_y \rightarrow 1}, w_{in_1 \rightarrow 2}, ..., w_{in_y \rightarrow 5}, w_{in_1 \rightarrow 6}, w_{1 \rightarrow 6}, w_{2 \rightarrow 6}, ..., w_{5 \rightarrow 6}). \end{align}</p>
<p>Each perceptron is using <i>sigmoid</i> as its activation function and the output of the perceptron <script type='math/tex'>6</script> is the output for the whole network, i.e. <script type='math/tex'>h_{\vec{w}}(\vec{x_i}) = z_6</script>.</p>
<p>Then an individual point <i>i</i> (with <i>x</i> and <i>y</i> coordinates normalized) is considered as an <script type='math/tex'>i</script><sup>th</sup> training example and fed through the network. While it's being propagated, each <script type='math/tex'>s_i</script> and <script type='math/tex'>z_i</script> for <script type='math/tex'>i = 1, ..., 6</script> are stored.</p>
<p>Then the gradient of an <script type='math/tex'>i</script><sup>th</sup> error surface is calculated as follows:<br />
\begin{align}<br />
\frac{\partial E_i(\vec{w})}{\partial \vec{w}} &#038;= \left( \frac{\partial E_i(\vec{w})}{\partial w_{in_1 \rightarrow 1}},\frac{\partial E_i(\vec{w})}{\partial w_{in_x \rightarrow 1}}, ..., \frac{\partial E_i(\vec{w})}{\partial w_{in_y \rightarrow 5}},\frac{\partial E_i(\vec{w})}{\partial w_{in_1 \rightarrow 6}},\frac{\partial E_i(\vec{w})}{\partial w_{1 \rightarrow 6}},\frac{\partial E_i(\vec{w})}{\partial w_{2 \rightarrow 6}}, ..., \frac{\partial E_i(\vec{w})}{\partial w_{5 \rightarrow 6}} \right) , \end{align}<br />
where<br />
\begin{align} \frac{\partial E_i(\vec{w})}{\partial w_{in_1 \rightarrow 1}} &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (s_1)\; \frac{\partial h_{\vec{w}}(\vec{x_i})}{\partial s_6} w_{1 \rightarrow 6} \\<br />
&#038;= 2 (z_6 - y_i) \; \sigma (s_1) \; (1 -  \sigma (s_1)) \; \sigma (s_6) \; (1 - \sigma (s_6)) \; w_{1 \rightarrow 6}, \\<br />
\frac{\partial E_i(\vec{w})}{\partial w_{in_x \rightarrow 1}} &#038;= 2 (z_6 - y_i) \; \sigma (s_1) \; (1 -  \sigma (s_1)) \; {in}_x \; \sigma (s_6) \; (1 - \sigma (s_6)) \; w_{1 \rightarrow 6}, \\<br />
&#038; \vdots \\<br />
\frac{\partial E_i(\vec{w})}{\partial w_{in_y \rightarrow 5}} &#038;= 2 (z_6 - y_i) \; \sigma (s_5) \; (1 -  \sigma (s_5)) \; {in}_y \; \sigma (s_6) \; (1 - \sigma (s_6)) \; w_{5 \rightarrow 6}, \\<br />
\frac{\partial E_i(\vec{w})}{\partial w_{in_1 \rightarrow 6}} &#038;= 2 (h_{\vec{w}}(\vec{x_i}) - y_i) \; \sigma ' (s_6) \\<br />
&#038;= 2 (z_6 - y_i) \; \sigma (s_6) \; (1 -  \sigma (s_6)) , \\<br />
\frac{\partial E_i(\vec{w})}{\partial w_{1 \rightarrow 6}} &#038;= 2 (z_6 - y_i) \; \sigma (s_6) \; (1 -  \sigma (s_6)) \; z_1, \\<br />
\frac{\partial E_i(\vec{w})}{\partial w_{2 \rightarrow 6}} &#038;= 2 (z_6 - y_i) \; \sigma (s_6) \; (1 -  \sigma (s_6)) \; z_2, \\<br />
&#038; \vdots \\<br />
\frac{\partial E_i(\vec{w})}{\partial w_{5 \rightarrow 6}} &#038;= 2 (z_6 - y_i) \; \sigma (s_6) \; (1 -  \sigma (s_6)) \; z_5.<br />
\end{align}</p>
<p>Finally, the network is sequentially trained with the learning rate <script type='math/tex'>\eta = 0.5</script> (starting with a random initial weight vector <script type='math/tex'>w_0</script>)<br />
\begin{align} \vec{w}_{t+1} := \vec{w_t} - 0.5 \frac{\partial E_i(\vec{w})}{\partial \vec{w}} \bigg|_{\vec{w_t}}.\end{align}</p>
<p>That's it, I hope it sheds some light on the backpropagation!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/backpropagation-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Halfway There</title>
		<link>http://blog.zabarauskas.com/halfway-there/</link>
		<comments>http://blog.zabarauskas.com/halfway-there/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 12:57:39 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[cambridge university]]></category>
		<category><![CDATA[formal]]></category>
		<category><![CDATA[internship]]></category>
		<category><![CDATA[lent]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[redmoind]]></category>
		<category><![CDATA[sdet]]></category>
		<category><![CDATA[seattle]]></category>
		<category><![CDATA[software development engineer in test]]></category>
		<category><![CDATA[truemobilecoverage]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=729</guid>
		<description><![CDATA[Another term in Cambridge has gone by - four out of nine to go. In the meantime, here's a quick update of what I've been up to in the past few months. 1. Microsoft internship In January I had the opportunity to visit Microsoft's headquarters in Redmond, WA, to interview for the Software Development Engineer [...]]]></description>
			<content:encoded><![CDATA[<p><em>Another term in Cambridge has gone by - four out of nine to go. In the meantime, here's a quick update of what I've been up to in the past few months.</em></p>
<p><strong>1. Microsoft internship</strong></p>
<p><small><div class="wp-caption alignright" style="width: 160px">
<a href="http://blog.zabarauskas.com/img/seattle2.jpg" title="Redmond, WA, 2011" class="thickbox" rel="singlepic39" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/39__150x113_seattle2.jpg" alt="Redmond, WA, 2011" title="Redmond, WA, 2011" />
</a>
<p class="wp-caption-text">Redmond, WA, 2011</p></div></small></p>
<p>In January I had the opportunity to visit <a href="http://www.microsoft.com" target="_blank">Microsoft</a>'s headquarters in Redmond, WA, to interview for the <i>Software Development Engineer in Test</i> intern position in the <a href="http://office.microsoft.com" target="_blank">Office</a> team. In short - a great trip, in every aspect.</p>
<p>I left London Heathrow on January 11th, 2:20 PM and landed in Seattle Tacoma at 4:10 PM (I suspect that there might have been a few time zones in between those two points). I arrived in Mariott Redmond roughly an hour later, which meant that because of my anti-jetlag technique (<i>"do not go to bed until 10-11 PM in the new timezone no matter what"</i>) I had a few hours to kill. Ample time to unpack, grab a dinner in Mariott's restaurant and go for a short stroll around Redmond before going to sleep.</p>
<p>On the next day I had four interviews arranged. The interviews themselves were absolutely stress-free, it felt more like a chance to meet and have a chat with some properly smart (and down-to-earth) folks.<small><div class="wp-caption alignright" style="width: 310px">
<a href="http://blog.zabarauskas.com/img/seattle1_full.jpg" title="Top of the Space Needle. Seattle, WA, 2011" class="thickbox" rel="singlepic38" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/38__300x225_seattle1_full.jpg" alt="Top of the Space Needle. Seattle, WA, 2011" title="Top of the Space Needle. Seattle, WA, 2011" />
</a>
<p class="wp-caption-text">Top of the <a href='http://en.wikipedia.org/wiki/Space_Needle' target='_blank'>Space Needle</a>. Seattle, WA, 2011</p></div></small>  The structure of the interviews seemed fairly typical: each interview consisted of some algorithm/data structure problems, a short discussion about the past experience and the opportunity to ask questions (obviously a great chance to learn more about the team/company/company culture, etc). Since this was my third round of summer internship applications (I have worked as a software engineer for <a href="http://www.wolfsonmicro.com" target="_blank">Wolfson Microelectronics</a> in '09 and <a href="http://www.ms.com" target="_blank">Morgan Stanley</a> in '10), everything made sense and was pretty much what I expected.</p>
<p>My trip ended with a quick visit to Seattle on the next day: a few pictures of the Space Needle, a cup of Seattle's Best Coffee and there I was on my flight back to London, having spent $0.00 (yeap, Microsoft paid for everything - flights, hotel, meals, taxis, etc). Even so, the best thing about Microsoft definitely seemed to be the people working there; since I have received and accepted the offer, we'll see if my opinion remains unchanged after this summer!</p>
<p><strong>2. Lent term v2.0</strong></p>
<p><small><div class="wp-caption alignleft" style="width: 130px"><a href="http://truemobilecoverage.com" target="_blank"><img alt="TrueMobileCoverage group project" src="http://blog.zabarauskas.com/img/tmc1.jpg" title="TrueMobileCoverage group project" width="120" height="120" /></a><p class="wp-caption-text"><a href='http://truemobilecoverage.com' target='_blank'>TrueMobileCoverage</a> group project</p></div></small></p>
<p>Well, things are still picking up the speed. Seven courses with twenty-eight supervisions in under two months, plus managing a <a href="http://truemobilecoverage.com" target="_blank">group project</a> (crowd-sourcing mobile network signal strength, the link is on the left), a few basketball practices each week on top of that and you'll see a reason why this blog has not been updated for a couple of months.</p>
<p>It's not all doom and gloom, of course. Courses themselves are great, lecturers make some decently convoluted material understandable in minutes and an occasional <a href="http://en.wikipedia.org/wiki/Formal_%28university%29" target="_blank">formal hall</a> (e.g. below) also helps. </p>
<p>All in all, my opinion, that Cambridge provides a great opportunity to learn a huge amount of material in a very short timeframe, remains unchanged.</p>
<p><i>There will be more to come about some cool things that I've learnt in separate posts, but now speaking of learning - it's revision time... &#58;-)</i></p>
<p><small><div class="wp-caption alignleft" style="width: 610px"><img alt="Me and Ada at the CompSci formal. Cambridge, England, 2011" src="http://blog.zabarauskas.com/img/formal1.jpg" title="Me and Ada at the CompSci formal hall. Cambridge, England, 2011" width="600" height="500" /><p class="wp-caption-text">Me and Ada at the CompSci formal. Cambridge, England, 2011</p></div></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/halfway-there/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Conway&#039;s Game of Life (cont.)</title>
		<link>http://blog.zabarauskas.com/conways-game-of-life-cont/</link>
		<comments>http://blog.zabarauskas.com/conways-game-of-life-cont/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 16:40:30 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[altera]]></category>
		<category><![CDATA[conway]]></category>
		<category><![CDATA[de2]]></category>
		<category><![CDATA[fpga]]></category>
		<category><![CDATA[game of life]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=697</guid>
		<description><![CDATA[&#34;Beauty in things exists in the mind which contemplates them.&#34; - David Hume (1711-1776) Conway's Game of Life theme continues. Here is a short video with the Game of Life, this time running on Altera DE2 FPGA board with custom soft MIPS CPU.]]></description>
			<content:encoded><![CDATA[<p><i>
<p style="text-align: right;">&quot;Beauty in things exists in the mind which contemplates them.&quot;<br />
- David Hume (1711-1776)</p>
<p></i></p>
<p><a href="http://conwaylife.com/wiki/index.php?title=Main_Page" target="_blank">Conway's Game of Life</a> theme <a href="http://blog.zabarauskas.com/conways-game-of-life/" target="_blank">continues</a>. Here is a short video with the Game of Life, this time running on Altera DE2 <a href="http://en.wikipedia.org/wiki/Field-programmable_gate_array" target="_blank">FPGA</a> board with custom soft MIPS CPU.</p>
<p><small><div class="wp-caption alignleft" style="width: 610px"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/FRU_v3cGjmo?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="344" src="http://www.youtube.com/v/FRU_v3cGjmo?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object><p class="wp-caption-text">Game of Life running on Altera DE2 FPGA board.</p></div></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/conways-game-of-life-cont/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Morgan Stanley Internship</title>
		<link>http://blog.zabarauskas.com/morgan-stanley-internship/</link>
		<comments>http://blog.zabarauskas.com/morgan-stanley-internship/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 21:39:55 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[globalaxe]]></category>
		<category><![CDATA[internship]]></category>
		<category><![CDATA[majorca]]></category>
		<category><![CDATA[mallorca]]></category>
		<category><![CDATA[morgan stanley]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=649</guid>
		<description><![CDATA[Last week I received a short e-mail from my former manager at Morgan Stanley: "Hi Manfred, Just to let you know that GlobalAxe all went live last week and so far no issues at all." Since the people on the trading floor started using my system and it seems to be standing on its feet [...]]]></description>
			<content:encoded><![CDATA[<p><small><div class="wp-caption alignright" style="width: 310px">
<a href="http://blog.zabarauskas.com/img/ms2.jpg" title="After work (Canary Wharf, 2010)" class="thickbox" rel="singlepic17" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/17__300x400_ms2.jpg" alt="After work (Canary Wharf, 2010)" title="After work (Canary Wharf, 2010)" />
</a>
<p class="wp-caption-text">After work (Canary Wharf, 2010)</p></div></small>Last week I received a short e-mail from my former manager at Morgan Stanley:</p>
<p><em>"Hi Manfred,</em></p>
<p><em>Just to let you know that GlobalAxe all went live last week and so far no issues at all."</em></p>
<p>Since the people on the trading floor started using my system and it seems to be standing on its feet so far, it probably is a good time to recap on what had happened over my ten week internship at Morgan Stanley.</p>
<p>I was working as technology analyst in <a href="http://en.wikipedia.org/wiki/Repurchase_agreement" target="_blank">repo</a> trading team (in institutional securities group). My task was to develop and integrate a new screen into trading software, to create an associated e-mail subsystem generating daily/weekly reports for senior executives and to code a website which would provide access to the data for executives/sales people without the trading software on their machines.</p>
<p>Development-wise it involved working with quite a wide range of technologies, such as C# and <a href="http://en.wikipedia.org/wiki/Composite_UI_Application_Block" target="_blank">CAB</a> for UI development, Java/Spring for e-mail report generation/server backend, MVC under ASP.NET for the website, Transact-SQL for Sybase DB backend; everything interconnected with SOAP/XML and distributed locally over in-house <a href="http://en.wikipedia.org/wiki/Publish/subscribe" target="_blank">pubsub</a> systems or through IBM's MQ for inter-continental data transactions.</p>
<p>Even though working and learning about all these technologies was fun on it's own right, the best thing I would say about my experience was the people. <small><div class="wp-caption alignleft" style="width: 316px">
<a href="http://blog.zabarauskas.com/img/ms1.jpg" title="Night at Canary Wharf, 2010" class="thickbox" rel="singlepic15" >
	<img class="ngg-singlepic" src="http://blog.zabarauskas.com/wp-content/gallery/cache/15__306x440_ms1.jpg" alt="Night at Canary Wharf, 2010" title="Night at Canary Wharf, 2010" />
</a>
<p class="wp-caption-text">Night at Canary Wharf, 2010</p></div></small>There is no better feeling than having a quick call with traders in New York demoing them the stuff that you just wrote, then dropping an e-mail to Tokyo checking if your recent changes made it through to their database, discussing the architecture of your system with the guys in your team and then going to the global team video-meeting; all in the same day.</p>
<p>And sometimes you feel the need to pinch yourself, because the level of responsibility that you get as an intern is staggering. You have the same rights and responsibilities as any other team member: a screw up in your code can block sixty people from submitting their code before the end of the iteration, a failure to convince the head of traders in NY that what you are doing is going to help them will affect the name of the whole team, and so on.</p>
<p>But then, you <em>own</em> your project: you make the final design decisions, you implement it and you give it to the end-users, who often appear to be bigshots. And that more than makes up for a few late nights in the office. Plus, Canary Wharf is absolutely beautiful at night.</p>
<p>Without expanding too much (and breaching too many non-disclosure agreements) - it was definitely the best experience so far: in terms of team, project, technology, skill, involvement and everything else. And it seems like I will have a chance to repeat it again: I have already received an unconditional offer for the internship at MS next summer!</p>
<p>Oh, and regarding the summer days spent in glass, steel and stone towers... well, Majorca more than made up for it!</p>
<div class="ngg-galleryoverview" id="ngg-gallery-3-649">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-44" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/mallorca/ms31.jpg" title="Majorca, 2010" class="thickbox" rel="set_3" >
								<img title="Majorca, 2010" alt="Majorca, 2010" src="http://blog.zabarauskas.com/wp-content/gallery/mallorca/thumbs/thumbs_ms31.jpg" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-45" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/mallorca/ms41.jpg" title="Majorca, 2010" class="thickbox" rel="set_3" >
								<img title="Majorca, 2010" alt="Majorca, 2010" src="http://blog.zabarauskas.com/wp-content/gallery/mallorca/thumbs/thumbs_ms41.jpg" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-46" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/mallorca/ms51.jpg" title="Majorca, 2010" class="thickbox" rel="set_3" >
								<img title="Majorca, 2010" alt="Majorca, 2010" src="http://blog.zabarauskas.com/wp-content/gallery/mallorca/thumbs/thumbs_ms51.jpg" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-47" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/mallorca/ms61.jpg" title="Majorca, 2010" class="thickbox" rel="set_3" >
								<img title="Majorca, 2010" alt="Majorca, 2010" src="http://blog.zabarauskas.com/wp-content/gallery/mallorca/thumbs/thumbs_ms61.jpg" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-48" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://blog.zabarauskas.com/wp-content/gallery/mallorca/ms71.jpg" title="Majorca, 2010" class="thickbox" rel="set_3" >
								<img title="Majorca, 2010" alt="Majorca, 2010" src="http://blog.zabarauskas.com/wp-content/gallery/mallorca/thumbs/thumbs_ms71.jpg" width="112" height="84" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/morgan-stanley-internship/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CST Part 1A</title>
		<link>http://blog.zabarauskas.com/cst-part-1a/</link>
		<comments>http://blog.zabarauskas.com/cst-part-1a/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 18:18:05 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[exams]]></category>
		<category><![CDATA[part 1a]]></category>
		<category><![CDATA[studies]]></category>
		<category><![CDATA[subjects]]></category>
		<category><![CDATA[university of cambridge]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=629</guid>
		<description><![CDATA[... otherwise known as Part 1A of Computer Science Tripos in University of Cambridge has officially ended. All in all, a rather enjoyable year. From the introduction to ML by the brilliant Prof. Larry Paulson, to the realms of Discrete Mathematics II (with a wicked a proof of existance of ordinal numbers in the exam); [...]]]></description>
			<content:encoded><![CDATA[<p>... otherwise known as Part 1A of Computer Science Tripos in University of Cambridge has officially ended.</p>
<p>All in all, a rather enjoyable year. From the introduction to ML by the brilliant <a href="http://www.cl.cam.ac.uk/~lp15/" target="_blank">Prof. Larry Paulson</a>, to the realms of Discrete Mathematics II (with a wicked a proof of existance of ordinal numbers in the exam); from Algorithms to Software Design, from Digital Electronics to Operating Systems, from Floating-Point Computation to Regular Languages and Finite Automata; and everything in between.</p>
<p>A crash course, but the one that is definitely worth going through.</p>
<p>If you're just about to come to Cambridge (or just starting your part 1A), here are a few simple tips that proved to be helpful for me:</p>
<ul>
<li>Don't fall behind - in lectures, ticks, homeworks, supervision assignments - in Cambridge pace it's difficult to catch up.</li>
<li>Do things in advance - it's usually a very good idea and pays off well.</li>
<li>Make sure that you keep your work/life balance: do a bit of sports (many choices in <a href="http://www.societies.cam.ac.uk/" target="_blank">University of Cambridge Societies website</a>) and go out once in a while. Paradoxically, having a few hours off in a week will help you to stay on top of things.</li>
<li>Finally, keep an eye on these subjects: Discrete Mathematics II, Operating Systems II, Floating-Point Computation, HW ticks (sorted by the effort they took from me, in decreasing order). They might be different for you, but these particular ones are worth being aware of.</li>
</ul>
<p>But most importantly - enjoy what you're doing.<br />
Good luck and have fun.</p>
<img src="http://blog.zabarauskas.com/img/part1a.jpg" alt="" width="554" height="590" />
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/cst-part-1a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&quot;The Hard Way is the Right Way&quot;</title>
		<link>http://blog.zabarauskas.com/the-hard-way-is-the-right-way/</link>
		<comments>http://blog.zabarauskas.com/the-hard-way-is-the-right-way/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 20:03:11 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[bcs]]></category>
		<category><![CDATA[blues]]></category>
		<category><![CDATA[cambridge university]]></category>
		<category><![CDATA[citigroup]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[internship]]></category>
		<category><![CDATA[morgan stanley]]></category>
		<category><![CDATA[stefan grossman]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=508</guid>
		<description><![CDATA[While the Europe is paralyzed by the volcanic ash and I am restrained from coming back to Cambridge, here is a quick recap of what I have been doing for the past couple of months. &#160; 1. Guitar It looks like it is becoming a tradition - another vacation ends with a guitar video. This [...]]]></description>
			<content:encoded><![CDATA[<p><i>While the Europe is paralyzed by the <a href="http://news.bbc.co.uk/2/hi/europe/8626505.stm">volcanic ash</a> and I am restrained from coming back to Cambridge, here is a quick recap of what I have been doing for the past couple of months.</i><br />
&nbsp;<br />
<b>1. Guitar</b></p>
<p>It looks like it is becoming a tradition - another vacation ends with a guitar video. This time - a short slow blues in <a href="http://en.wikipedia.org/wiki/Stefan_Grossman">Stefan Grossman's</a> style. The usual apologies for the sound, video and playing quality apply.</p>
<div class="outobj">
<div class="obj" width="600"><object width="600" height="240"><param name="movie" value="http://www.youtube.com/v/SK7JAz1WkLw&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/SK7JAz1WkLw&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="600" height="240"></embed></object></div>
</div>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p><b>2. Professional</b><br />
<img class="alignright" title="The Chartered Institute for IT" src="http://blog.zabarauskas.com/img/bcs.jpg" alt="The Chartered Institute for IT" width="57" height="73" /><br />
I was accepted as a student member to the <a href="http://www.bcs.org">Chartered Institute for IT</a> (former British Computer Society). For the next two years (at least) I should be reachable through this e-mail: <em>manfredas&#46;zabarauskas&#64;bcs&#46;org</em>.</p>
<p>&nbsp;<br />
<b>3. Studies</b></p>
<p>Without getting into the gory details, the outcomes of the Lent (read: <em>second</em>) term in Cambridge can be summarized by:<br />
<small><div class="wp-caption alignright" style="width: 130px"><a href="http://www.cl.cam.ac.uk/teaching/0910/ProgJava/3star/tick3star-mz297.gif" target="_blank"><img class=" " title="Conways Game of Life" src="http://www.cl.cam.ac.uk/teaching/0910/ProgJava/3star/tick3star-mz297.gif" alt="Conways Game of Life" width="120" height="120" /></a><p class="wp-caption-text">Conway&#39;s Game of Life</p></div></small><small><div class="wp-caption alignright" style="width: 160px"><a href="http://blog.zabarauskas.com/img/wallpaper.png" target="_blank"><img class="     " title="Mandelbrot set" src="http://blog.zabarauskas.com/img/wallpaper.png" alt="Mandelbrot Set" width="150" height="120" /></a><p class="wp-caption-text">Mandelbrot set (1280x1024)</p></div></small></p>
<ol>
<li>a wallpaper "spit out" by ML depicting a rather standard <a href="http://en.wikipedia.org/wiki/Mandelbrot_set">Mandelbrot set</a> fractal (on the right),</li>
<li>an animation "spit out" by Java depicting eight-hundred generations of the spacefiller pattern in the <a href="http://blog.zabarauskas.com/conways-game-of-life/">Conway's Game of Life</a> (further on the right),</li>
<li>and an insane amount of material to prepare for the upcoming exams; both broad and not as shallow as I expected.</li>
</ol>
<p>I am still extremely enjoying it, even though the amount of my spare-time has decreased. (As an afterthought - I still had time to play basketball for <a href="http://www.cubbc.org.uk/">Blues, Lions and my college</a>, so maybe it was not <em>that </em>bad).</p>
<p>&nbsp;<br />
<b>4. Internship</b></p>
<p>Over the summer I will be working as a Technology Analyst for <a href="http://www.morganstanley.com">Morgan Stanley</a>, in their Innovative Data, Environments, Analytics &amp; Systems (IDEAS) group.<small><div class="wp-caption alignleft" style="width: 165px"><a href="http://www.flickr.com/search/?z=e&#038;w=all&#038;q=canary+wharf&#038;m=text" target="_blank"><img class=" " title="Canary Wharf" src="http://blog.zabarauskas.com/img/cw.jpg" alt="Canary Wharf" width="155" height="96" /></a><p class="wp-caption-text">Sunrise over Canary Wharf</p></div></small></p>
<p>During the interviews Morgan Stanley really left a very good impression both at the level of knowledge of the people working there and the communication and culture inside the company. We will see if that applies in day-to-day situations. In any case, I have nothing against spending the summer in <a href="http://en.wikipedia.org/wiki/Canary_Wharf">Canary Wharf</a> and seeing the investment banking industry from inside. </p>
<p>It will surely give me more things to write about in this blog, so be sure to check back once in a while.</p>
<p><small><div class="wp-caption alignleft" style="width: 610px"><img class=" " title="Internship Offers from Morgan Stanley and Citigroup." src="http://blog.zabarauskas.com/img/ms_vs_citi.jpg" alt="Internship Offer Packs from Morgan Stanley and Citigroup" width="600" height="298" /><p class="wp-caption-text">Competition: internship offer packs from Morgan Stanley and Citigroup.</p></div></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/the-hard-way-is-the-right-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Conway&#039;s Game of Life</title>
		<link>http://blog.zabarauskas.com/conways-game-of-life/</link>
		<comments>http://blog.zabarauskas.com/conways-game-of-life/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 11:20:34 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[cellular automata]]></category>
		<category><![CDATA[conway]]></category>
		<category><![CDATA[game of life]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=454</guid>
		<description><![CDATA[// Description In 1970s John Horton Conway (British mathematician and University of Cambridge graduate) opened a whole new field of mathematical research by publishing a revolutionary paper on the cellular automaton called the Game of Life. Suffice it to say that the game which he has described with four simple rules has the power of [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
 function show_applet() { var html_element, body_element, p_element, text_node; html_element = document.documentElement; body_element = html_element.lastChild; applet_element = document.createElement("applet"); text_node = document.createTextNode("Cannot start the applet! Please install the Java Runtime Environment."); applet_element.appendChild(text_node); applet_element.setAttribute("code", "uk.ac.cam.mz297.tick6star.GuiLifeApplet"); applet_element.setAttribute("archive", "http://www.zabarauskas.com/downloads/Game%20of%20Life/GameOfLife.jar"); applet_element.setAttribute("height", "0"); applet_element.setAttribute("width", "0"); body_element.appendChild(applet_element); }
// ]]&gt;</script></p>
<h3>Description</h3>
<p>In 1970s <a href="http://en.wikipedia.org/wiki/John_Horton_Conway">John Horton Conway</a> (British mathematician and University of Cambridge graduate) opened a whole new field of mathematical research by publishing a revolutionary paper on the <a href="http://en.wikipedia.org/wiki/Cellular_automaton">cellular automaton</a> called the <em>Game of Life</em>. Suffice it to say that the game which he has described with four simple rules has the power of a <a href="http://en.wikipedia.org/wiki/Universal_Turing_machine">universal Turing machine</a>, i.e. anything that can be computed algorithmically can be computed within Conway's Game of Life (outlines of a proof for given by Berlekamp et al; implemented by Chapman as a universal register machine within the Game of Life in 2002).<br />
<small><div class="wp-caption alignright" style="width: 81px"><a href="javascript:show_applet();"><img title="Launch the Game of Life..." src="http://blog.zabarauskas.com/img/gol_thumb.jpg" alt="Launch the Game of Life..." width="71" height="71" /></a><p class="wp-caption-text">Glider in the Game of Life</p></div></small><br />
The Game of Life is a zero-player game, i.e. the player interacts only by creating an initial configuration on a two-dimensional grid of square cells and then observing how it evolves. Every new generation of cells (which can be either live or dead) is a pure function of the previous generation and is described by this set of rules:</p>
<ol>
<li>Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.</li>
<li>Any live cell with more than three live neighbours dies, as if by overcrowding.</li>
<li>Any live cell with two or three live neighbours lives on to the next generation.</li>
<li>Any dead cell with exactly three live neighbours becomes a live cell.</li>
</ol>
<p>For more information, patterns and current news about the research involving Game of Life check out the brilliant <a href="http://conwaylife.com/wiki/index.php?title=Main_Page">LifeWiki at conwaylife.com</a>.<br />
&nbsp;</p>
<h3>Implementation</h3>
<p>The following applet visualising the Game of Life has been developed as part of the coursework for Object-Oriented Programming at the University of Cambridge, all code was written and compiled in Sun's Java SE 1.6. </p>
<p>Click on any of the screenshots or the button below to launch the Game of Life (and if nothing shows up, make sure that you have the <a href="http://www.java.com/en/download/index.jsp">Java Runtime Environment (JRE)</a> installed).</p>
<form name="gol" action="javascript:show_applet()" method="get">
<input type="submit" name="sub_button" onClick="this.disabled=true; this.value='The Game of Life is loading, please wait...';" style="width: 600px;" value="Launch the Game of Life!" width="600">
</form>
<p><small><div class="wp-caption alignleft" style="width: 610px"><a href="javascript:show_applet();"><img title="Spacefiller in the Game of Life" src="http://blog.zabarauskas.com/img/gol.jpg" alt="Game of Life Implementation by Manfredas Zabarauskas" width="600" height="419" /></a><p class="wp-caption-text">Spacefiller (Game of Life applet)</p></div></small><br />
<span id="more-454"></span><br />
<small><div class="wp-caption alignleft" style="width: 610px"><a href="javascript:show_applet();"><img title="Game of Life Implementation by Manfredas Zabarauskas" src="http://blog.zabarauskas.com/img/gol2.jpg" alt="Traffic circle in the Game of Life" width="600" height="419" /></a><p class="wp-caption-text">Traffic circle (Game of Life applet)</p></div></small></p>
<p><small><div class="wp-caption alignleft" style="width: 610px"><a href="javascript:show_applet();"><img title="Game of Life intial pattern editor" src="http://blog.zabarauskas.com/img/gol3.jpg" alt="Game of Life Implementation by Manfredas Zabarauskas" width="600" height="419" /></a><p class="wp-caption-text">Pattern editor (Game of Life applet)</p></div></small><br />
&nbsp;</p>
<h3>References</h3>
<p>1. Berlekamp, E. R.; Conway, J. H.; and Guy, R. K. "What Is Life?" Ch. 25 in Winning Ways for Your Mathematical Plays, Vol. 2: Games in Particular. London: Academic Press, 1982.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/conways-game-of-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unplugged in G</title>
		<link>http://blog.zabarauskas.com/unplugged-in-g/</link>
		<comments>http://blog.zabarauskas.com/unplugged-in-g/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 23:03:09 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[electrophoresis]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[unplugged]]></category>
		<category><![CDATA[vacation]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=413</guid>
		<description><![CDATA[Another vacation, another video - as usual, apologies for the sound, webcam and playing quality. Three days left 'till the journey back to Cambridge. Vacation status: haven't even touched anything related to Computer Science. On the other hand, brushed up on complex trigonometry/logarithms and series expansions (read: maths), and feel reasonably happy to discuss plant [...]]]></description>
			<content:encoded><![CDATA[<p><em>Another vacation, another video - as usual, apologies for the sound, webcam and playing quality. Three days left 'till the journey back to Cambridge.</em></p>
<p><small><div class="wp-caption alignright" style="width: 236px"><img class=" " title="Gel electrophoresis of Senecio vulgaris, S. squalidus and S. cambrensis DNA strands." src="http://blog.zabarauskas.com/img/electrophoresis.jpg" alt="Gel electrophoresis of Senecio vulgaris, S. squalidus and S. cambrensis DNA strands." width="226" height="164" /><p class="wp-caption-text"><a href='http://en.wikipedia.org/wiki/Agarose_gel_electrophoresis'>Gel electrophoresis</a> of <i>Senecio vulgaris, S. squalidus</i> and <i>S. cambrensis</i> DNA strands.</p></div></small>Vacation status: haven't even touched anything related to Computer Science. On the other hand, brushed up on complex trigonometry/logarithms and series expansions (read: <em>maths</em>), and feel reasonably happy to discuss plant evolution through polyploidy (read: <em>biology</em>, see: <em>picture on the right</em>).</p>
<p>Post-vacation status update: apparently I <i>did</i> have to discuss plant evolution through polyploidy in my exam! What were the odds...</p>
<p>Anyway, here's the video. Oh, yes, and while we're at it - happy New Year to you all.<br />
<small><br />
<div class="wp-caption alignleft" style="width: 340px"><br />
<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/X5A40WV9QWU&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/X5A40WV9QWU&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object><p class="wp-caption-text">Eric Clapton - Wonderful Tonight (0:00/3:50), <br/>Guns N' Roses - Wild Horses (3:54/6:16).</p></div></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/unplugged-in-g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It Literally Pays Off to Do Homework in Cambridge</title>
		<link>http://blog.zabarauskas.com/it-literally-pays-off-to-do-homework-in-cambridge/</link>
		<comments>http://blog.zabarauskas.com/it-literally-pays-off-to-do-homework-in-cambridge/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 20:18:07 +0000</pubDate>
		<dc:creator>Manfredas Zabarauskas</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[mips]]></category>
		<category><![CDATA[prize]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://blog.zabarauskas.com/?p=377</guid>
		<description><![CDATA[&#160; 45 minutes, 28 MIPS instructions and £25. Computer Science FTW. &#160; # Copyright Manfredas Zabarauskas, 2009. # MIPS routine that reads an array of ten integers # and prints the sorted array to console. .text main: sub $t7, $sp, 40 l_read: li $v0, 5 syscall sw $v0, 0($t7) add $t7, $t7, 4 bne $t7, [...]]]></description>
			<content:encoded><![CDATA[<p><small><div class="wp-caption alignleft" style="width: 590px"><img title="Well done! - joint shortest traditional (and practical :-) sort for the OS1a prize tick." src="http://blog.zabarauskas.com/img/sort.jpg" alt="Well done! - joint shortest traditional (and practical :-) sort for the OS1a prize tick." width="580" height="258" /><p class="wp-caption-text">&quot;Well done! - joint shortest traditional (and practical :<b></b>-) sort for the OS1a prize tick&quot;. Cambridge, 2009.</p></div></small></p>
<div style="clear: both;">&nbsp;<br />
45 minutes, 28 MIPS instructions and £25.<br />
Computer Science FTW.<br />
&nbsp;</div>
<pre># Copyright Manfredas Zabarauskas, 2009.
# MIPS routine that reads an array of ten integers
# and prints the sorted array to console.
.text
main:   sub $t7, $sp, 40
l_read: li $v0, 5
        syscall
        sw $v0, 0($t7)
        add $t7, $t7, 4
        bne $t7, $sp, l_read
l_out:  sub $t8, $sp, 36
        sub $t7, 40
l_inn:  add $t8, $t8, 4
        lw $t2, -8($t8)
        lw $t3, -4($t8)
        ble $t2, $t3, no_swp
        sw $t2, -4($t8)
        sw $t3, -8($t8)
        move $t7, $sp
no_swp: bne $t8, $sp, l_inn
        beq $t7, $sp, l_out
l_prnt: li $v0, 11
        li $a0, 10
        syscall
        li $v0, 1
        lw $a0, 0($t7)
        syscall
        add $t7, $t7, 4
        bne $t7, $sp, l_prnt
        li $v0, 10
        syscall
</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zabarauskas.com/it-literally-pays-off-to-do-homework-in-cambridge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://stats.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

