<?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>Gedanken: Stream of consciousness</title>
	<atom:link href="http://gedanken451.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gedanken451.wordpress.com</link>
	<description>Stream of randomised thoughts from Bryant Tan, Freelance coder</description>
	<lastBuildDate>Mon, 09 Aug 2010 22:33:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gedanken451.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Gedanken: Stream of consciousness</title>
		<link>http://gedanken451.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gedanken451.wordpress.com/osd.xml" title="Gedanken: Stream of consciousness" />
	<atom:link rel='hub' href='http://gedanken451.wordpress.com/?pushpress=hub'/>
		<item>
		<title>New Site&#8230;</title>
		<link>http://gedanken451.wordpress.com/2010/07/12/new-site/</link>
		<comments>http://gedanken451.wordpress.com/2010/07/12/new-site/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 17:58:27 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=1002</guid>
		<description><![CDATA[N.B. This blog has moved to arctanb.wordpress.com I&#8217;ve been through several different usernames but I think I&#8217;ll settle with arctanb. Which means goodbye gedanken451.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=1002&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><span style="color:#ff0000;">N.B. This blog has moved to</p>
<p></span> <a href="http://arctanb.wordpress.com/"><span style="color:#ff0000;">arctanb.wordpress.com</span></a><span style="color:#ff0000;"></span></h2>
<p>I&#8217;ve been through several different usernames but I think I&#8217;ll settle with arctanb. Which means goodbye gedanken451.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/1002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/1002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/1002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/1002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/1002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/1002/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/1002/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/1002/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=1002&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/07/12/new-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>
	</item>
		<item>
		<title>This year in retrospect</title>
		<link>http://gedanken451.wordpress.com/2010/06/30/this-year-in-retrospect/</link>
		<comments>http://gedanken451.wordpress.com/2010/06/30/this-year-in-retrospect/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 11:40:47 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[chemistry]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=981</guid>
		<description><![CDATA[Caution: [abnormally] high levels of egocentricity are present in this blog post and it&#8217;s therefore probably not of interest to anyone but myself :P Academics In approximate descending order of success: Computing Despite doing this outside the timetable, I feel computing has been my greatest success this year. I learnt the entire syllabus over the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=981&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:red;"><strong>Caution</strong></span>: [abnormally] high levels of egocentricity are present in this blog post and it&#8217;s therefore probably not of interest to anyone but myself :P</p>
<div id="attachment_982" class="wp-caption alignnone" style="width: 310px"><a href="http://gedanken451.files.wordpress.com/2010/06/image1.png"><img class="size-medium wp-image-982" title="ExamTime" src="http://gedanken451.files.wordpress.com/2010/06/image1.png?w=300&#038;h=196" alt="" width="300" height="196" /></a><p class="wp-caption-text">My last set of secondary school exams</p></div>
<h3>Academics</h3>
<p>In approximate descending order of success:</p>
<p><strong>Computing</strong></p>
<p>Despite doing this outside the timetable, I feel computing has been my greatest success this year. I learnt the entire syllabus over the course of a day from a book and managed to do every question on the paper (the proportion of my answers that were correct is a whole different matter), became the lead developer of Firefly&#8217;s secondary product and used that work for the A2 computing project, did some really cool (theory-based) personal projects (<a href="http://gedanken451.wordpress.com/2010/01/09/complex-hearts-ai/">1</a>, <a href="http://gedanken451.wordpress.com/2010/03/05/group-table-completion-program/">2</a>), was invited to the next round of the British Informatics Olympiad (which I unwillingly turned down for Chemistry) and <a href="http://gedanken451.wordpress.com/2010/04/30/my-google-saga/">got a Google internship offer</a> (which I was also forced unwillingly to reject by time constraints).</p>
<p><strong>Physics</strong></p>
<p>The olympiad was a complete disaster, but I had the best physics teacher in the world teaching me (CAPS), and in terms of learning stuff and inspiration, this has by far been my best year for Physics. The sheer amount, level and depth of material we went through this year is incredible. And I now have a beautiful, high-quality set of notes which I will probably be using as reference material throughout my university course and beyond.</p>
<p><strong>Chemistry</strong></p>
<p>I&#8217;ve discovered I&#8217;m frankly hopeless at this subject &#8211; especially the organic side &#8211; but by some freak accident managed to get into <a href="http://gedanken451.wordpress.com/2010/03/29/british-chemistry-olympiad-round-2/">the second round of the chemistry olympiad</a>. So apart from one success, it&#8217;s not been a great year.</p>
<p><strong>Maths</strong></p>
<p>Maths has been an unmitigated disaster for me this year. I attained a &#8216;certificate of participation&#8217; in the *first* round of the UKMT, needless to say not progressing to BMO. I seem to have got even worse at mental arithmetic and my inability to complete any of the STEP 3 questions from this year is a fitting end to my &#8216;career&#8217; (as TCIM put it) in the subject.</p>
<h3>Academics dash (mathmos will get this)</h3>
<p>Work aside, it&#8217;s been a fantastic year. In the first term I revived my interest in sailing by taking the games half. I also <a href="http://gedanken451.wordpress.com/2010/01/31/juggling/">started juggling again</a>, made some <a href="http://www.youtube.com/user/invtanb">youtube vids</a>, shifted my bouldering red point from V0 to V4 and onsighted a couple of V3s, co-developed <a href="http://www.universityinterviews.com/">universityinterviews.com</a> (and am collaborating on something else with <a href="http://www.jamesscottbrown.com/wordpress/">the same developer</a>), finally started on Bach&#8217;s Ciaconne (from the second partita for solo violin in Dmin), performed the 2nd mvt of the Franck Sonata, made a piano arrangement of Bohemian Rhapsody, picked up scottish dancing, ceroc and catapulting (with a Barnett Black Widow), and discovered the wonders of G&amp;T and tweed. It&#8217;s a fitting end to my time at St Paul&#8217;s and hopefully a taste of years to come!</p>
<p>EDIT: Oh yeah, and I also met Jimmy Wales and Tim Hunt :P</p>
<h3>Summer</h3>
<p>I&#8217;ll be hiking in the Skye Mountains (the furthest north I&#8217;ll have ever been), driving to Spain with my parents, doing some more work for Firefly, going to Florida to watch a NASA rocket launch (hopefully), travelling even further north to Norway to launch a CanSat, then finally flying to Stanford to start a new life (kinda). I&#8217;m really looking forward to all that; it should be an amazing summer and I&#8217;ll probably wear out the shutter button on my camera :)</p>
<p>Pax</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/981/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/981/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/981/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=981&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/06/30/this-year-in-retrospect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>

		<media:content url="http://gedanken451.files.wordpress.com/2010/06/image1.png?w=300" medium="image">
			<media:title type="html">ExamTime</media:title>
		</media:content>
	</item>
		<item>
		<title>Magnetic Breakfast Cereal</title>
		<link>http://gedanken451.wordpress.com/2010/06/08/magnetic-breakfast-cereal/</link>
		<comments>http://gedanken451.wordpress.com/2010/06/08/magnetic-breakfast-cereal/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 19:57:02 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[chemistry]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=976</guid>
		<description><![CDATA[According to Brainiac S01E03, cereal is magnetic. According to Wikipedia, iron is added to breakfast cereal as a dietary supplement in the form of elemental iron powder. I couldn&#8217;t resist trying it out for myself, and it&#8217;s true (see video below)! Further, this iron can be extracted by grinding the cereal, adding the resultant powder [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=976&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>According to Brainiac S01E03, cereal is magnetic. According to Wikipedia, iron is added to breakfast cereal as a dietary supplement in the form of elemental iron powder. I couldn&#8217;t resist trying it out for myself, and it&#8217;s true (see video below)!</p>
<p>Further, this iron can be extracted by grinding the cereal, adding the resultant powder to water to dissolve small saccharides etc that might be trapping the iron in the cereal, and then using a magnet to pick up particles of iron. Supposedly this iron reacts with HCl in the stomach to form soluble iron salts that can be absorbed into the body.</p>
<span class='embed-youtube' style='text-align:center; display:block;'><object width='450' height='284'><param name='movie' value='http://www.youtube.com/v/DRVKTggr2yA?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/DRVKTggr2yA?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='450' height='284' wmode='opaque'></embed> </object></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/976/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/976/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/976/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/976/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/976/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/976/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/976/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/976/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=976&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/06/08/magnetic-breakfast-cereal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>
	</item>
		<item>
		<title>Exam Rant</title>
		<link>http://gedanken451.wordpress.com/2010/05/19/exam-rant/</link>
		<comments>http://gedanken451.wordpress.com/2010/05/19/exam-rant/#comments</comments>
		<pubDate>Wed, 19 May 2010 18:54:31 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=956</guid>
		<description><![CDATA[I&#8217;m about to sit my last ever batch of secondary school exams (A2 modules), so it&#8217;s past paper season and a rant is called for. In fact, I&#8217;m generally happy with the exams that we&#8217;re sitting. The Maths syllabus and exams are interesting and cover extremely useful and interesting topics, particularly differential equations and a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=956&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m about to sit my last ever batch of secondary school exams (A2 modules), so it&#8217;s past paper season and a rant is called for.</p>
<p>In fact, I&#8217;m generally happy with the exams that we&#8217;re sitting. The Maths syllabus and exams are interesting and cover extremely useful and interesting topics, particularly differential equations and a massive amount of Newtonian mechanics, with some quasi-Lagrangian stuff thrown in at M4; my only major qualms are that the course is weak on linear algebra (a personal interest) and contains nothing on vector calculus, an enormous topic which would have been enormously useful for getting a handle on understanding the extra-curricular physics and fluid dynamics we were shown in lessons (rather than just commenting on the shapes of the symbols). Most importantly the exams do the subject justice; for the further maths modules, it is necessary to be proficient at the subject to do well, which, from my experience so far, for UK exams based on the national curriculum, is almost unique. And of course there&#8217;s always STEP which I fail at due to lack of ability rather than lack of exam technique which suggests it&#8217;s a good exam.</p>
<p>Physics and computing are similar; the exams are mathematical, quantitative and logical in nature, requiring few wordy answers, of which almost all are worth few marks and have entirely reasonable mark schemes. Though CAPS has been giving us questions from past A level and Oxbridge physics papers throughout the year, and not only are the questions from those demanding &#8211; both mathematically and conceptually &#8211; but they are also genuinely interesting and by doing them, candidates develop a deep understanding of aspects of some of the topics involved; the rainbow made beautiful in the style of Lilley&#8217;s &#8216;Discovering Relativity for Yourself&#8217; &#8211; through working out the answers to a series of exquisitely well-thought-out questions. The current physics exams are almost entirely uninteresting slogs in comparison, though still good.</p>
<p>And now we come to chemistry, and the body of my rant. Perhaps I&#8217;m simply biased because I&#8217;m not a good chemist in the first place (or at least I&#8217;m even worse at chemistry than I am at all my other subjects). Or maybe I just want to blame the fact that I scored a low B on both chemistry mocks on something (which is by today&#8217;s standards terrible; according to CAPS last time a C was a perfectly respectable grade owing to the difficulty of the exams). Either way, I maintain that it isn&#8217;t entirely my fault that my marks are atrocious (though I concede that it is to a large extent).</p>
<p>It&#8217;s an old and possibly overused complaint that mark schemes / exams are badly written, and is consequently often taken lightly. Unfortunately I really do think think it&#8217;s gotten to such a stage that the Monster Raving Loony Party&#8217;s idea about education wouldn&#8217;t be that much worse than how it is currently: &#8220;It is proposed that, before the beginning of exams, the exam board will select a certain obscure phrase which will be kept secret. If any pupil inadvertently writes this phrase in any exam, he/she will automatically receive straight A* grades, and a free teddy.&#8221;</p>
<p>I&#8217;ll cite what I think are some of the worst examples of chemistry exam madness:<br />
1. The mark scheme insisted that one E0 value was &#8216;more positive than&#8217; another, but specifically rejected &#8216;greater than&#8217;.<br />
2. To obtain the mark for one question, it was necessary to specify movement of *electron* lone pairs, not just lone pairs. Though personally I&#8217;ve never heard of lone pairs of anything other than electrons in any context.<br />
3. The &#8216;Quality of Written Communication&#8217; (QWC) mark is normally awarded for writing &#8216;two complete sentences&#8217;. But if you write a single long complicated sentence containing many subclauses with impeccable grammar that conveys meaning effectively and efficiently, you wouldn&#8217;t get that mark. Also, why on earth is grammar being tested in a chemistry exam? And more importantly, why does the government (or whoever it is whose fault this is) deem it necessary to test the ability of 18 year olds to construct cogent sentences!? (I admit my proficiency at written and spoken English is evidently imperfect but even the stuff I write makes sense. Doesn&#8217;t it? DOESN&#8217;T IT?)<br />
4. Displayed formulae. Nobody uses them. Ever. Everything is skeletal. Also, the OH group is a single atom and should always be depicted as one&#8230;<br />
5. Questions like &#8220;Discuss isomerism in complex ions&#8221; for 12 marks. They invariably have a really tight accompanying mark scheme with exactly 12 scoring points. One could conceivably (and entirely legitimately given the vagueness of the question) write an engaging paper on group theory or electronic orbitals in response and only receive the single QWC mark&#8230;</p>
<p>Allow me at this stage to cite Bill Watterson.</p>
<p><a target="_blank" href="http://gedanken451.files.wordpress.com/2010/05/ch940127.jpg"><img src="http://gedanken451.files.wordpress.com/2010/05/ch940127.jpg?w=450" alt="" title="C&amp;H Exams" class="alignnone size-medium wp-image-958" /></a></p>
<p>This image was taken from <a href="http://progressiveboink.com/archive/calvinhobbes.htm" target="_blank">a fantastic blog post</a> which more or less summarises why I love Calvin &amp; Hobbes. Anyways, suffice it say Calvin&#8217;s words, &#8220;You&#8217;ve taught me nothing except how to cynically manipulate the system&#8221;, form an accurate representation of the national curriculum: learn answers to questions, rather than be educated.</p>
<p>But maybe all this is good preparation for the real world after all. Today I sat the &#8216;Life in the UK test&#8217;, one of the critical stages on the way to becoming a British citizen (apparently wearing tweed, drinking G&amp;T and occasional Scottish dancing isn&#8217;t enough; trust me, I asked), for which I had to study (read: flick through Schott&#8217;s half an hour before leaving). And it can mostly be frankly and truthfully summarised as b/s: memorising dates (e.g. the precise year women were first allowed to divorce their husbands [1857 or something]), statistics and numbers (some of which as obscure and inconsequential as the percentage of Christians in the UK who are Roman Catholic [10%], some of which are required to be known to an unreasonable degree of accuracy such as the percentage of the UK&#8217;s population that is Muslim to 2sf [2.7% as of a few years ago, probably now different], and some of which don&#8217;t even make sense such as the coastline of Britain [infinite by my {and Mandelbrot's} reckoning but that wasn't an option]), and mundane facts (e.g. that 1941 was the only year the UK didn&#8217;t have a census). They might as well have asked &#8216;who put Gordon with the bigoted woman?&#8217; [definitely Sue]. There was also what might be described as &#8216;jack all&#8217; about geography, particularly mountains and weather, information which I personally consider much more central to Britain than the ethnicity of the bus drivers employed in the 1950&#8242;s [West Indies and Carribbean] (or even important things like the number of seats in the Commons).</p>
<p>So it seems that even after the horrors of OCR (&#8220;Recognising Achievement&#8221;) are over, life continues to be dominated by &#8216;cynically manipulating the system&#8217;; learning useless facts or effecting pointless tasks to satisfy some criterion for something really important. I guess that&#8217;s just what life is about and I&#8217;ll have to learn to live with it, willingly or not; if you can&#8217;t fight it, join it. Sucks to be human&#8230;</p>
<p>Anyways, rant over, and it&#8217;ll probably be the last before the end of June when my exams end&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/956/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/956/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/956/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/956/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/956/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/956/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/956/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/956/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=956&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/05/19/exam-rant/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>

		<media:content url="http://gedanken451.files.wordpress.com/2010/05/ch940127.jpg" medium="image">
			<media:title type="html">C&#38;H Exams</media:title>
		</media:content>
	</item>
		<item>
		<title>My Google Saga</title>
		<link>http://gedanken451.wordpress.com/2010/04/30/my-google-saga/</link>
		<comments>http://gedanken451.wordpress.com/2010/04/30/my-google-saga/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 21:38:21 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=952</guid>
		<description><![CDATA[Google is an amazing place to work; they have the best projects, employ the best people and have the best decor. In fact I was at Google HQ in London at the end of last summer for Young Rewired State, a hack day for 15-18 year olds, and we even got food with Google logos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=952&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/192/"><img alt="" src="http://imgs.xkcd.com/comics/working_for_google.png" title="XKCD Google" class="alignnone" width="400" /></a></p>
<p>Google is an amazing place to work; they have the best projects, employ the best people and have the best decor. In fact I was at Google HQ in London at the end of last summer for <a href="http://gedanken451.wordpress.com/2009/08/23/young-rewired-state/">Young Rewired State</a>, a hack day for 15-18 year olds, and we even got food with Google logos on it! So I applied earlier this term for a summer job / internship / work experience (how synonymous are these terms anyway?) at Google HQ at Mountain View, CA.</p>
<p>There&#8217;s a great deal of mystery surrounding the Google selection process, but having gone through Cambridge and Stanford applications, from my point of view it wasn&#8217;t anywhere near as baffling. It was made clear what qualities are expected of candidates (I inferred that these are primarily programming and algorithmic fluency and an interest in at least one of the company&#8217;s projects), the decision process at Google&#8217;s end was surprising in speed (a weekend) and Google made sure to keep paperwork to a minimum (a mere few PDFs); more than I can say for any of my university applications!</p>
<p>The process was also pretty simple in comparison. Since, from what I can tell, Google normally only recruit interns from the pool of compsci students currently attending university and I&#8217;m still at secondary school, I had to contact them directly via email (with the help of a contact) to get started. I was bounced around a bit and sent my CV and cover letter to a number of different departments until I was given instructions to fill in some application forms. A couple of days afterwards I received an email informing me Google want to interview me (technical interviews) and requesting a list of dates and times I&#8217;m available. Just over two weeks later I got a reply informing me I had two interviews at 10 and 11 pm GMT (!) with some links to advice about what to brush up on. Google technical interviews are conducted by phone from the US with the help of Google Docs (interviewees code directly into the google doc &#8211; no IDE / debugger!) and are entirely about algorithms and programming. From what I read leading up to my interviews, data structures (esp. linked lists and binary trees) come up in pretty much every interview. C++ seems to be the language of choice of most Googlers, though I was allowed to use C# (whose syntax pretty much identical to C++ anyway and almost literally identical to java) when I admitted that I&#8217;m crap with pointers :P. I&#8217;m not at liberty to disclose interview details, but to cut a long story short I did a few retarded things and failed an algorithm question but was complimented on my speed of coding in both interviews.</p>
<p>Of course, it wasn&#8217;t over yet. &#8220;I have good news for you.&#8221; quoth an email that arrived days later. They wanted to move forward with the next step and identify a project (including a further interview), and warned that there are no guarantees. As it turned out, I got the job after this (non-technical) interview with the potential project manager but didn&#8217;t have the mandatory 11 weeks&#8217; contiguous holiday to spare, and consequently had to (very reluctantly) turn down the offer &#8211; accepting would have meant missing hiking in the Skye Mountains, watching the penultimate NASA space shuttle launch in Florida and launching a CanSat from the Andoya Rocket Range in Norway (Skye and Norway being the furthest North I&#8217;ll have ever gone).</p>
<p>But anyways, I&#8217;ve now survived literally the two toughest interviews of my life (I definitely struggled a lot more with these than my Cambridge ones &#8211; but then I&#8217;m a bit crap at inventing clever algorithms and know nothing compared to an actual compsci student) and I&#8217;ll have a better idea of what to expect next time when I apply again next summer!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/952/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/952/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/952/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/952/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/952/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/952/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/952/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/952/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=952&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/04/30/my-google-saga/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>

		<media:content url="http://imgs.xkcd.com/comics/working_for_google.png" medium="image">
			<media:title type="html">XKCD Google</media:title>
		</media:content>
	</item>
		<item>
		<title>British Chemistry Olympiad Round 2</title>
		<link>http://gedanken451.wordpress.com/2010/03/29/british-chemistry-olympiad-round-2/</link>
		<comments>http://gedanken451.wordpress.com/2010/03/29/british-chemistry-olympiad-round-2/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 18:12:42 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=941</guid>
		<description><![CDATA[It&#8217;s been a pretty epic weekend. Keeping it brief: Friday: Journey to Cambridge I actually went up with a friend who was going to the Informatics Olympiad (BIO2) to which I had been invited but clashed (to the hour) with the chemistry one &#8211; I chose chemistry as I did BIO2 last year and sought [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=941&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a pretty epic weekend. Keeping it brief:</p>
<h3>Friday: Journey to Cambridge</h3>
<p>I actually went up with a friend who was going to the Informatics Olympiad (BIO2) to which I had been invited but clashed (to the hour) with the chemistry one &#8211; I chose chemistry as I did BIO2 last year and sought variety. After my customary meal at Wagamama I dropped my stuff at St Cats (where BChO2 was to be held) and started wandering round Cambridge. When I got back I met up with some of the people from last Summer&#8217;s training week who had made it to round 2 this year. We were all standing around in a circle when the inevitable titration jokes started &lt;- actually true ;)</p>
<p>All 20 of us were taken out to dinner at Pizza Express by the olympiad committee (which itself consisted of over 10 members), an event which lasted about four hours due to slowness of cooking / service (&#8230;) but was great fun. We planned the pub trip for the next day and went to bed with the knowledge that we would wake up to six hours of chemistry.</p>
<p>A curious tradition of the olympiad, enforced to prevent bias, is for each person to be randomly assigned an element as a pseudonym and for us to use those throughout the competition for written work. I was Phosphorus, which I think I might have spelt wrong&#8230;</p>
<h3>Saturday: The hardest exam I have done / will ever do</h3>
<p>There was a practical exam in the morning which I had been dreading slightly owing to my invariably highly chaotic past lab experiences. As it turns out there was nothing impossibly demanding that we had to do and I managed not to emerge awash with pyridine / phenol / some other nasty reagent, and we all did a TLC, learning on the job, which was completely new to me and cool to do; they seemed to like my TLC plate (woo!). I was really impressed with the facilities (in comparison to St Paul&#8217;s anyways &#8211; to me having a fume hood each is a luxury) though it was impossible to tap whiz the burettes (an invention of NAL: turning the burette tap 180° letting through about 0.5 cm<sup>3</sup>)! I even managed to get excited about the pipette fillers (get me&#8230;) &#8211; squeezy rubber things that suck automatically with virtually no effort on the experimentalist&#8217;s part, rather than the really annoying cylindrical plastic ones we get at school that you have to crank with your thumb and never work / fit. It was also the first time I&#8217;d ever worn a lab coat.</p>
<p>We had been promised that we would sit a particularly difficult theoretical paper, and it was revealed just before we started that it was in fact the hardest paper they had ever set. Being the worst organic chemist you&#8217;ll ever meet, I think I just about managed to get through the ones that would have looked plausible in a physics paper and drew some structures for the organic questions that would certainly have made my teachers cry from despair (if not laughter)&#8230;</p>
<p>Walking dazedly through the streets of Cambridge and making conscious and desperate attempts not to talk about anything related to electron movement, we filed into a pub. At some point there was a formal dinner where we each got a glass of each of three different wines, including a rather exquisite dessert wine which was discussed in great detail in terms of aldehydes, esters and hexane (&#8230;)</p>
<p>The rest of the evening can probably be found on Facebook.</p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://i40.tinypic.com/28inqbk.jpg"><img alt="" src="http://i40.tinypic.com/28inqbk.jpg" title="EtOH" width="400" /></a><p class="wp-caption-text">Chemists are good fun</p></div>
<h3>Sunday: The aftermath</h3>
<p>We basically got sat in a room after breakfast, got given goodie bags (including RSC Sigg bottles, a book of Chemistry cryptic crosswords, scientist-shaped memory sticks, safety specs, and a T-shirt) and certificates, and the team was announced. Congrats to those who got in, especially to David Edey for having got through while still in the year below!</p>
<p>It goes without saying that I didn&#8217;t get through, but it was an enjoyable weekend and I met some awesome people (who I will be seeing next year)!</p>
<p>Pax</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/941/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/941/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/941/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/941/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/941/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/941/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/941/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/941/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=941&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/03/29/british-chemistry-olympiad-round-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>

		<media:content url="http://i40.tinypic.com/28inqbk.jpg" medium="image">
			<media:title type="html">EtOH</media:title>
		</media:content>
	</item>
		<item>
		<title>Group table completion program</title>
		<link>http://gedanken451.wordpress.com/2010/03/05/group-table-completion-program/</link>
		<comments>http://gedanken451.wordpress.com/2010/03/05/group-table-completion-program/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 20:21:28 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=928</guid>
		<description><![CDATA[The Further Maths syllabus incorporates group theory, a fairly useful but abstract concept. It&#8217;s all very interesting and somewhat reminiscent of our semi-formal introduction to set theory and functions with GL last year. Unfortunately, interesting as groups may be, exam questions can ask you to fill out a group table, a task whose tedium is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=928&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Further Maths syllabus incorporates group theory, a fairly useful but abstract concept. It&#8217;s all very interesting and somewhat reminiscent of our semi-formal introduction to set theory and functions with GL last year. Unfortunately, interesting as groups may be, exam questions can ask you to fill out a group table, a task whose tedium is comparable with plotting graphs with pen and paper. While completing a group table in class, after remarking that it&#8217;s somewhat similar to doing a SuDoku (each element appears exactly once in each column and row), I pointed out writing a computer program to do this would be interesting and much more fulfilling than bashing through a group table completion. And that&#8217;s exactly what I did.</p>
<p>The code is fairly self-explanatory but probably full of bad habits and other rubbish; the only reason I&#8217;m making a blog post about it is because it&#8217;s the first time I&#8217;ve ever implemented (albeit quite messily) a Breadth-First-Search-type algorithm for a vaguely realistic problem, making it particularly interesting (to me).</p>
<p>The algorithm for finding the value for a cell (derived from elements i and j, e.g. ij if the group is multiplicative) is basically this, in really loose structured English:</p>
<p>Concatenate i, j. Call this concatenation c.<br />
Look up if c is an element of the group.<br />
If so, done.<br />
&nbsp;&nbsp;&nbsp;Set c as the table&#8217;s value at (i,j).<br />
Else: Add this expression to a previously empty list.<br />
&nbsp;&nbsp;&nbsp;Repeatedly:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For each expression in the list:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find character sequences which can be simplified by examining the existing table<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For each of these simplifications<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the mono-simplified expression (simplified once) to the end of the list<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If this simplification is an element of the group, we&#8217;re done.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the expression from the list</p>
<p>In other words the simplification algorithm systematically takes the expression, finds lots of equivalent expressions (by looking up simplifications in the half-completed group table) and chooses the equivalent expression that happens to be an element of the group. This obviously requires closure, or the algorithm will keep searching forever and never complete. For this reason I implemented a counter-measure to infinite runtime &#8211; it&#8217;s a bit of a hack but hey&#8230;</p>
<p>The program prompts for input. The first line is N, the number of elements in the group. The next N lines are string representations of the elements, e.g. a, aa, ab, bba etc. The next N^2 lines are the existing table &#8211; the program needs something to start with to simplify anything.</p>
<p>Here&#8217;s my example test data:</p>
<pre class="brush: plain;">
6
e
a
aa
b
ab
aab
e
a
aa
b
ab
aab
a
-
e
aab
-
-
aa
e
-
ab
-
-
b
-
-
e
-
-
ab
-
-
-
-
-
aab
-
-
-
-
-
</pre>
<p>This represents the following group table:</p>
<pre class="brush: plain;">
e   a   aa  b   ab  aab
a   -   e   aab -   -
aa  e   -   ab  -   -
b   -   -   e   -   -
ab  -   -   -   -   -
aab -   -   -   -   -
</pre>
<p>The program&#8217;s output is:</p>
<pre class="brush: plain;">
e   a   aa  b   ab  aab
a   aa  e   aab b   ab
aa  e   a   ab  aab b
b   ab  aab e   a   aa
ab  aab b   aa  e   a
aab b   ab  a   aa  e
</pre>
<p>Incidentally this is (hopefully) the answer to one of the questions set for this week&#8217;s homework.</p>
<p>Here&#8217;s the C#.NET code:</p>
<pre class="brush: plain;">
using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace Groups
{
    class Program
    {
        public static string[] elements;
        public static int[,] table;
        public static int N;
        public static int depth;
        public static ArrayList simplifications = new ArrayList();

        static void Main(string[] args)
        {
            Console.WriteLine(&quot;Size of group&quot;);
            N = Convert.ToInt32(Console.ReadLine());

            elements = new string[N];
            Console.WriteLine(&quot;Group elements&quot;);
            for (int n = 0; n &lt; N; n++) elements[n] = Console.ReadLine();

            table = new int[N,N];
            Console.WriteLine(&quot;Existing group table:&quot;);
            for (int j = 0; j &lt; N; j++)
            {
                Console.WriteLine(&quot;row &quot; + j.ToString());
                for (int i = 0; i &lt; N; i++)
                    table[i, j] = str2index(Console.ReadLine());
            }

            PrintTable();

            while (true)
            {
                Console.ReadKey();

                FillTable();
                PrintTable();
            }
        }

        public static void PrintTable()
        {
            for (int j = 0; j &lt; N; j++)
            {
                Console.WriteLine();
                for (int i = 0; i &lt; N; i++)
                {
                    if (table[i, j] == -1) Console.Write(&quot;-   &quot;);
                    else
                    {
                        Console.Write(elements[table[i, j]]);
                        for (int a = 0; a &lt; 4 - elements[table[i, j]].ToString().Length; a++) Console.Write(&quot; &quot;);
                    }
                }
            }
            Console.WriteLine();
        }

        public static void FillTable()
        {
            // for each thing:
                // concatenate strings
                // look up if concatenation is an element. If so, done.
                // else look up from table if part of concatenation simplifies.
                // search through all simplifications until one which is an elment is found

            for (int i = 0; i &lt; N; i++)
            {
                Console.WriteLine(&quot;now doing row &quot; + i);
                for (int j = 0; j &lt; N; j++)
                {
                    if (table[i, j] == -1)
                    {
                        string s = elements[i] + elements[j];
                        if (str2index(s) != -1)
                        {
                            table[i, j] = str2index(s);
                        }
                        else
                        {
                            simplifications = new ArrayList();
                            simplifications.Add(s);
                            depth = 0;
                            Simplify();
                            table[i, j] = str2index((string)simplifications[0]);
                        }
                    }
                }
            }

        }

        /// &lt;summary&gt;
        /// Simplifies the single element in simplifications.
        /// When done, will leave a single element simplifications[0] in simplifications.
        /// That will be the simplified string, which is hopefully an element.
        /// Told you it's a messy implementation
        /// &lt;/summary&gt;
        public static void Simplify()
        {
            depth++;

            if (depth &gt; 20 || simplifications.Count &gt; 1000)
            {
                simplifications = new ArrayList();
                simplifications.Add(&quot;-&quot;);
                return;
            }

            int origsize = simplifications.Count;
            Console.WriteLine(origsize);
            string ret = &quot;!&quot;;

            for (int q=0; q&lt;origsize; q++)
            {
                string[] simps = simplify((string)simplifications[q]);
                foreach (string t in simps)
                    if (str2index(t) != -1) ret = t;
                foreach (string t in simps)
                {
                    if (!simplifications.Contains(t)) simplifications.Add(t);
                }
            }

            for (int a = 0; a &lt; origsize; a++) simplifications.RemoveAt(0);
            if (ret != &quot;!&quot;)
            {
                simplifications = new ArrayList();
                simplifications.Add(ret);
            }
            else Simplify();
        }

        /// &lt;summary&gt;
        /// Finds all single-step simplifications of a string
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;s&quot;&gt;&lt;/param&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public static string[] simplify(string s)
        {
            string[] ret = new string[1000];
            int n = 0;
            for (int startat = 0; startat &lt; s.Length - 1; startat++)
            {
                for (int a = 0; a &lt; N; a++) // first element
                {
                    if (s.Length &gt;= startat + elements[a].Length)
                    {
                        if (s.Substring(startat, elements[a].Length) == elements[a])
                        {
                            for (int b = 0; b &lt; N; b++) // second element
                            {
                                if (s.Length &gt;= startat + elements[a].Length + elements[b].Length)
                                {
                                    if (s.Substring(startat + elements[a].Length, elements[b].Length) == elements[b])
                                    {
                                        if (table[a, b] != -1)
                                        {
                                            ret[n++] = s.Substring(0, startat) +  elements[table[a, b]] + s.Substring(startat + elements[a].Length + elements[b].Length);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            string[] realret = new string[n];
            for (int a = 0; a &lt; n; a++) realret[a] = ret[a];
            return realret;
        }

        public static int str2index(string str)
        {
            for (int a=0; a&lt;elements.Length; a++)
            {
                if (elements[a] == str) return a;
            }
            return -1;
        }
    }
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/928/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=928&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/03/05/group-table-completion-program/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>
	</item>
		<item>
		<title>Ongoing Projects</title>
		<link>http://gedanken451.wordpress.com/2010/02/04/ongoing-projects/</link>
		<comments>http://gedanken451.wordpress.com/2010/02/04/ongoing-projects/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 22:10:08 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sceptic]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=923</guid>
		<description><![CDATA[At the moment, thanks to the post-university interviews honeymoon, I&#8217;m involved in some cool projects I&#8217;d like to write a bit about. ESA European CanSat Competition This is a very interesting competition organised by the European Space Agency and is quite likely the biggest scientific project I have ever undertaken. In brief, each team (consisting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=923&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the moment, thanks to the post-university interviews honeymoon, I&#8217;m involved in some cool projects I&#8217;d like to write a bit about.</p>
<h3>ESA European CanSat Competition</h3>
<p>This is a very interesting competition organised by the European Space Agency and is quite likely the biggest scientific project I have ever undertaken. In brief, each team (consisting of 10 members) has to design a &#8216;satellite&#8217; (mislabelled in my opinion for this competition) that can perform some interesting and/or useful scientific experiment when dropped from a height of 1km. There are lots of requirements/restrictions, e.g. everything has to fit into a european soda can (hence &#8216;cansat&#8217;) and the budget is limited to 1K Euros (more details <a href="http://www.esa.int/esaMI/Education/SEMR59AK73G_0.html">here</a>). Needless to say this is immensely exciting for us; we are representing the UK in a massive engineering competition, and are one of only 12 teams in Europe to be chosen to go through with the construction and launch of this thing (at Andøya, in the Arctic Circle on the Norwegian island of Andenes, to which some of our team members will be going[!!]).</p>
<p>Our idea is for our cansat to act as a dropsonde &#8211; it will take data which would allow the construction of a wind profile of the descent to enable precise placement of a hypothetical second payload (an idea we got from one of the talks at the Aerospace Competition finals last summer). We have <a href="http://teameclipse.wordpress.com/">a blog</a> and more details will emerge as time passes (a press release is in the pipeline). You can also follow @<a href="http://twitter.com/cansat_eclipse">cansat_eclipse</a>. We&#8217;re also using Google Wave for coordination :)</p>
<h3>Homeopathy Investigation</h3>
<p>My attention was drawn recently to the <a href="http://www.1023.org.uk/">1023 Campaign</a>, a campaign aimed at bringing to public attention the reality of homeopathy: that as far as science is concerned, it&#8217;s just water, and apart from the placebo effect is as good at curing diseases as cistern water (which, famously, is potable). As the St Paul&#8217;s Sceptical Society, a group of us decided to take part in the 1023 event, a mass homeopathic &#8216;overdose&#8217; to demonstrate confidence that there&#8217;s literally nothing in it. As Paulines we of course missed the date, but instead are planning a serious double-blind test involving pseudo-random number generators and proper statistical analysis and planning to investigate the effect of homeopathic coffee on drowsiness. We wanted to do a Wilcoxon test but we think in the end we&#8217;ll just go for a t distribution based investigation, which assumes a normal distribution but seems to be well-respected in the scientific world. This is an important project for me since it will be the first real scientific investigation I&#8217;ve been involved in, and especially since it&#8217;s both topical and sceptical in nature, I&#8217;m looking forward to seeing some results.</p>
<h3>UniversityInterviews.com</h3>
<p>This project started some time ago but I never got round to blogging about it. When the university interview madness began last term, a friend and I had the idea of building a site for people to share their interview experiences, and <a href="http://www.universityinterviews.com/">this</a> is the result. I&#8217;m quite pleased with what we&#8217;ve made and I hope to see it being well-used in years to come.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/923/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/923/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/923/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=923&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/02/04/ongoing-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>
	</item>
		<item>
		<title>Juggling</title>
		<link>http://gedanken451.wordpress.com/2010/01/31/juggling/</link>
		<comments>http://gedanken451.wordpress.com/2010/01/31/juggling/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 22:15:36 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[juggling]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=920</guid>
		<description><![CDATA[My slightly random interest in juggling seems to have been revived recently by Stewart Brand who came to my school to give a talk on environmentalism and started off by showing the rather famous clip of Chris Bliss&#8217; juggling finale (Golden Slumbers). Juggling might seem like a completely irrelevant and useless &#8220;skill&#8221;, and in many [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=920&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My slightly random interest in juggling seems to have been revived recently by Stewart Brand who came to my school to give a talk on environmentalism and started off by showing the rather famous clip of Chris Bliss&#8217; juggling finale (Golden Slumbers). Juggling might seem like a completely irrelevant and useless &#8220;skill&#8221;, and in many respects it is. But it seems like most of the people I know who juggle reasonably well are scientists or mathematicians (head of physics at my school, a biology teacher at my school, some guy on a poster in my maths teacher&#8217; classroom), and there appear to be lots of fascinating parallels between juggling and maths. So in a way juggling is a unique activity combining skill, dexterity, coordination and performance with an intellectual allure irresistible to scientists and mathematicians &#8230; and for the sake of some hilarity I&#8217;ve made a Youtube vid!</p>
<span class='embed-youtube' style='text-align:center; display:block;'><object width='450' height='284'><param name='movie' value='http://www.youtube.com/v/YnSJPk3ssU0?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/YnSJPk3ssU0?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='450' height='284' wmode='opaque'></embed> </object></span>
<p>Order:<br />
1. Cascade, MM, BM, RR<br />
2. Cascade, BB, MM, BM, MM, RR, (near drop), RR, Cascade, BB, MM, BM<br />
3. Box<br />
4. Improvisation</p>
<p>MM = Mills Mess BM = Boston Mess BB = Burke&#8217;s Barrage RR = Rubenstein&#8217;s Revenge</p>
<p><b>Siteswap notation</b></p>
<p>There&#8217;s a pretty good article explaining what this is <a href="http://plus.maths.org/issue52/features/polster/index.html">here</a> that also investigates the maths of juggling; it&#8217;s basically a way of writing a juggling pattern that has mathematical curiosity.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/920/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/920/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/920/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/920/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/920/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/920/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/920/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/920/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=920&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/01/31/juggling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>
	</item>
		<item>
		<title>Complex Hearts AI</title>
		<link>http://gedanken451.wordpress.com/2010/01/09/complex-hearts-ai/</link>
		<comments>http://gedanken451.wordpress.com/2010/01/09/complex-hearts-ai/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 19:07:25 +0000</pubDate>
		<dc:creator>Bryant Tan</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Maths]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://gedanken451.wordpress.com/?p=893</guid>
		<description><![CDATA[For some reason from the moment I heard of it, I&#8217;ve really loved the game of Complex Hearts. It&#8217;s not even that mathematical by nature&#8211;you just have to keep track of two sets of scores&#8211;but the idea of casually saying &#8220;I have -4 + 13i points&#8221; makes it an awesome game to play. So I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=893&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For some reason from the moment I heard of it, I&#8217;ve really loved the game of <a href="http://gedanken451.wordpress.com/2009/12/12/complex-hearts/">Complex Hearts</a>. It&#8217;s not even that mathematical by nature&#8211;you just have to keep track of two sets of scores&#8211;but the idea of casually saying &#8220;I have -4 + 13i points&#8221; makes it an awesome game to play. So I wrote an AI for it. It&#8217;s one of the most complex (this will never get old) things I&#8217;ve ever written and it feels like a great achievement (until it epically fails against humans), so I thought I&#8217;d say something about it. It was written in C#, OOP is fairly central to its inner workings, and it uses just the four standard libraries for C# console apps (System, System.Collections.Generic, System.Linq [I did actually use Linq believe it or not. Sorting a list by value], System.Text) &#8211; I got by without using a single ArrayList!</p>
<p><b>Principles of operation</b></p>
<p>The program hinges around this single critical function GetExpectedScore(&#8230;), which attempts to determine the expected score one would accumulate after that trick if a certain card (c) is played. It&#8217;s the largest function in the program, and produces some rather convincing results. It looks at each player (p) in turn and attempts to sum the expected accumulated score from each. It does this by getting a list of point cards below the value of c, finding the probability that p has card c, arranging the point cards in order of point magnitude, then finally summing points*probabilities. It sums points by assuming each player will play the highest point card he can without winning the trick (i.e. dump the most painful card he can on you), and takes into account probabilities of being void, so there&#8217;s a sort of cascade going on. Letting P(c) be the probability p has card c, N(n) be the nth most painful card playable by p and V(n) be the score given by the nth most painful card:</p>
<p>ExpectedScore =<br />
P(N(1))*V(1) +<br />
(1-P(N(1)))*P(N(2))*V(2) +<br />
(1-P(N(1)))*(1-P(N(2)))*P(N(3))*V(3) + &#8230;</p>
<p>The program sort of has two hearts, a bit like The Doctor. The first (over 200 lines) is two custom types: each player is an object, and, more importantly, the game itself is an object. This allows a trivially easy-to-implement and foolproof undo function, as well as the ability to create a duplicate game for the sake of simulations. This also includes a really primitive function for attempting to assign probabilities to players having cards (see screenshot below). It appears to be sufficient.</p>
<p>The second is about 350 lines of code enclosed in a region aptly labelled &#8216;clever stuff&#8217;. This is where the interesting functions which determine the best card to play, or the best cards to pass, all of which make use of GetExpectedScore (which itself is in this region). The best card to play is the one that has the lowest expected score determined by GetExpectedScore, and the best cards to pass are those with the highest expected scores. These tend to be high hearts, and spades of value above and including the queen.</p>
<p><b>User interface</b></p>
<p>I love console programs, and I don&#8217;t think I could have made a better UI for this using a Windows form. It&#8217;s all nicely colour coded: cyan for &#8216;info&#8217;, yellow for &#8216;notice&#8217;, red for &#8216;important&#8217;, green for &#8216;question&#8217; and gray for &#8216;debug&#8217;. I even wrote a procedure to print each player&#8217;s table of card probabilities:</p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://i46.tinypic.com/153qul4.jpg"><img src="http://i46.tinypic.com/153qul4.jpg" width="400" /></a><p class="wp-caption-text">Click to embiggen.</p></div>
<p><b>Seems to work</b></p>
<p>I&#8217;ve test run it a couple of times with actual games, though personally playing the other three players slightly invalidates the testing! The AI seems to make good decisions and appears surprisingly good at not picking up points, hence doing pretty well for itself in my opinion! Apart from some interesting encounters involving code that looks like it was written while drunk (my code is normally pretty terrible) and functions I defined but never finished coding resulting in very strange happenings (&#8220;just make it return &#8217;1&#8242; for now, I&#8217;ll code it later&#8221;), I&#8217;ve needed to add minor caveats here and there, such as taking into account the cards currently on the table when evaluating the probability of winning the trick and the points currently on the table when evaluating the expected score from winning that trick, and taking into account the player&#8217;s current score when deciding which card to play.</p>
<div class="wp-caption alignnone" style="width: 410px"><a href="http://i45.tinypic.com/300winl.jpg"><img alt="" src="http://i45.tinypic.com/300winl.jpg" title="Test run" width="400" /></a><p class="wp-caption-text">Test run. The two previous players have played the Ace of Spades (AS) followed by the Queen of Spades (QS). The player has two spades from which to choose (JS and KS). The AI recognises that although KS beats QS, potentially winning unwanted points, it realises any spade played will be beaten by AS with probability 1, so the expected accrued score from each card is 0 + 0i.</p></div>
<p><b>Limitations</b></p>
<p>The AI doesn&#8217;t know about shooting, or, more importantly, the existence of the 10 of clubs. I really don&#8217;t know how to incorporate that into the current structure which is a real pity considering that&#8217;s in a way the entire point of having complex scoring (otherwise you&#8217;d just have two separate sets of scores to keep track of which have nothing to do with each other). I have yet to code in the rule about breaking hearts, though it&#8217;s pretty unlikely to lead with hearts anyway considering that would tend to result in picking up points (unless you play 2H or something). It is also extremely defensive: it assumes every other player is attempting to screw it over, and consequently doesn&#8217;t bother trying to screw other players over at all. Perhaps I should include a constant that decides the aggressiveness of the program &#8211; the AI will choose to play the card that most screws over another player (c) provided that c&#8217;s expected score is no higher than a certain value, or no higher than a certain fraction of c&#8217;s value, or something. Additionally, the algo for working out expected scores is actually wrong &#8211; it makes an underestimate because it doesn&#8217;t use Bayes&#8217; Theorem (though it&#8217;s still quite good). I should implement an improvement soon.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gedanken451.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gedanken451.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gedanken451.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gedanken451.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gedanken451.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gedanken451.wordpress.com/893/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gedanken451.wordpress.com/893/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gedanken451.wordpress.com/893/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gedanken451.wordpress.com&amp;blog=4498753&amp;post=893&amp;subd=gedanken451&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gedanken451.wordpress.com/2010/01/09/complex-hearts-ai/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Bryant</media:title>
		</media:content>

		<media:content url="http://i46.tinypic.com/153qul4.jpg" medium="image" />

		<media:content url="http://i45.tinypic.com/300winl.jpg" medium="image">
			<media:title type="html">Test run</media:title>
		</media:content>
	</item>
	</channel>
</rss>
