![]() |
TCHS 4O 2000 [4o's nonsense] alvinny [2] - csq - edchong jenming - joseph - law meepok - mingqi - pea pengkian [2] - qwergopot - woof xinghao - zhengyu HCJC 01S60 [understated sixzero] andy - edwin - jack jiaqi - peter - rex serena SAF 21SA khenghui - jiaming - jinrui [2] ritchie - vicknesh - zhenhao Others Lwei [2] - shaowei - website links - Alien Loves Predator BloggerSG Cute Overload! Cyanide and Happiness Daily Bunny Hamleto Hattrick Magic: The Gathering The Onion The Order of the Stick Perry Bible Fellowship PvP Online Soccernet Sluggy Freelance The Students' Sketchpad Talk Rock Talking Cock.com Tom the Dancing Bug Wikipedia Wulffmorgenthaler ![]() ![]() ![]() ![]() ![]() ![]() |
bert's blog v1.21 Powered by glolg Programmed with Perl 5.6.1 on Apache/1.3.27 (Red Hat Linux) best viewed at 1024 x 768 resolution on Internet Explorer 6.0+ or Mozilla Firefox 1.5+ today's page views: 642 (30 mobile) all-time page views: 3247862 most viewed entry: 18739 views most commented entry: 14 comments number of entries: 1214 page created Sat Apr 19, 2025 22:33:00 |
- tagcloud - academics [70] art [8] changelog [49] current events [36] cute stuff [12] gaming [11] music [8] outings [16] philosophy [10] poetry [4] programming [15] rants [5] reviews [8] sport [37] travel [19] work [3] miscellaneous [75] |
- category tags - academics art changelog current events cute stuff gaming miscellaneous music outings philosophy poetry programming rants reviews sport travel work tags in total: 386 |
![]() | ||
|
- changelog - changelog v1.15a --------------- * Issue with Google Friend Connect showing up uninvited fixed. It's Mr. Ham here again, after taking the hour off from my job of getting dropped on the head (see previous post). Being productive is the only way for us hamsters to gain our rightful place in the world, especially with artificial creations gaining in popularity. I'm all for robot hamsters, as long as they don't nick my hard-won position. Scary possessed-looking little buggers they can be, but let's see how tough they are after plummeting to the hard floor a few times. I'm not sure how the human caretaker got into graduate school, as it was almost painful watching him struggling through his algorithms problems; I mean, it was so obvious that deceit can be profitable in the Stable Marriage problem, and that a minimum bottleneck tree is not necessarily a minimum spanning tree over a graph, and that's just up to Chapter Four. As it is, I think it's pointless tutoring him on the nuances of computational theory. And even in more practical problems, such as the issue of whether it is best to claim an Energy Pack in Mafia Wars (and similar clones - e.g. Chakra Pack in Naruto Shippuden) immediately after it becomes available, he's not the sharpest. Oh, it is simple enough to show that the answer is a big fat no in general, using a counterexample, but he got stuck on how to decide whether to claim one, and in the end fell back on his unsubstantiated and inferior human intuition. ![]() I am sorry that you saw fit to bother me with such trivialities It is so obvious that the Mafia War Energy Pack problem can be easily solved, given the parameters of Energy (flow) per hour, Maximum Energy, Time Between Energy Packs, Average Energy to Experience conversion rate, Experience per level etc etc, and making a few trivial assumptions (such as conversion of Energy to Experience taking negligible time). First, it is easily noted that it is impossible for waiting an entire Energy Pack cycle to result in a higher Level-cum-Experience score than using the Energy Pack immediately (proof left to the reader). Therefore, we need but consider T possibilities at each decision point, where T is the Time Between Energy Packs (in hours). This is just a dynamic programming problem, and to determine the highest Experience level that may be obtained after any H hours, and the times at which Energy Packs should be claimed to achieve that, we simply construct the H by T matrix and populate it column by column by referring to the appropriate previously computed entries. Of course, the plan that is best for H may very well be incompatible for H plus or minus a bit (easily noted by considering that the optimal maximization when an Energy Pack arrives at H is to use it immediately - a parallel with the last step in a repeated game), but no problem: just compute for a sufficiently large H (beyond the typical human or online game lifespan, in hours), and we are set. Well, this is at least my intuition - I'm a big idea kind of hamster - and of course we could fall back on simulated annealing or something if this is too difficult for our graduate student to comprehend... unhand me! Stop squeezing me! Okay, okay, no more comments on your academic failings... they are beginning to be overshadowed by your pretend football punting ones anyw... *Glurk* $829/$1000 after a few unfortunate weeks, with the Gunners slipping up, and Villa only managing a draw. $100 on Tottenham to beat Aston Villa (at 2.60) Where are Ferguson and Benitez on the same side?
- academics - My first paper as a grad student won't be the finest I've ever taken, but it's over and that's that. It's probably useful to start getting used to feeling stupid, all the more as I've gotten into the habit of categorizing all knowledge into two groups:
Props to Mr. Ham for helping me out here, with a system that may yet become widespread: ![]() Honourable Jobs for Honest Hamsters
- Anonymous A second tip would be not to attempt past year exam papers from nearly a decade ago - the syllabus might have changed greatly since then, and having no idea how to proceed with half the questions doesn't do one's confidence much good. Not having blogged seriously for some time means a buildup of material - to begin with, there's a fresh way to look at movies from xkcd, and a photoessay on what it may mean to be a run-of-the-mill soldier for two years (the guy managed to turnover a number of girlfriends in that period). Then there's someone who's earning near US$70k a year just by wearing T-shirts, a bunch of Zen stories that kept me going through those early project mornings, a collection of projects far more interesting than mine, and something that I might have slipped into a project, given enough advance notice (from jq). This is followed by some polar bear and dog action, and the Thierry Henry "Hand of Frog" incident (play a game inspired by it), which has escalated tensions between Ireland and France. I wonder how long it will be before FIFA allows video referees at high-profile matches, or at least a few more match officials; heck, tennis has at least six linesmen to help the umpire watch two players on a court maybe an eighth the size of a football field, and video replays on request on top of that. There isn't much point blaming the referee otherwise, since it's likely near humanly impossible to catch all the minutiae that goes on. It's already amazing how linesmen get so many offside decisions right, since that they can't watch everything at once [referenced paper] (the linked article suggests that the linesmen keep an eye on the last defender, and listen for the sound of the ball being kicked, which brings with it its own issues, i.e. the speed of sound). In Henry's defense, he admitted to the infraction readily enough and was up for a replay if FIFA would have it so, perhaps secure in the knowledge that FIFA were not about to grant one (and to make doubly sure, the French Football Federation rejected the Irish appeal too). The incident has at least done more for Irish reconciliation that any politician in living memory, so it seems that the luck of the Irish may simply have manifested itself in an unanticipated way this time. Perhaps another way of looking at the incident is "If you're not cheating, you're not trying hard enough". Yes, yes, cheaters never prosper, but frankly rules are bent so often in football that it's a part of the game. I have seen too many respected players sneak in a tug at the jersey or a hand to the shoulder, or put in a snide little kick to the knees or fly just a bit too theatrically, to have any confidence in ever watching a really "clean" game. From what I can see, openly fouling carries little stigma in sports, at least where there is no intention to escape the punishment - see Solskjaer "taking one for the team" when he put in a foul tackle as the last man in an effort to win United the title, for example, or the "Hack-a-Shaq" strategy employed by numerous NBA teams when Shaquille O'Neal was in his prime. If you pay for it, it's alright. Therefore, it seems acceptable to cheat as part of a method of winning if the cheater is caught, but completely unforgivable to cheat to win if the cheater gets away with it. If an outfield player dives and uses his arm to punch a ball away in the final minute of extra time in the World Cup, getting sent off and giving away a penalty in the process, I doubt that he would be castigated, especially if the penalty ended up being saved (or missed). This seems a good time to introduce Hajime no Ippo, a manga about boxing that I blazed through in the past week. The main character is a honest, hardworking and very hard-punching lad named Ippo Makunochi, who is at the same time completely uninteresting and is used mainly to monotonously drum in the morally correct statement that determination, grit and courage blah blah always wins out in the end. Almost all of his fights follow the script of a Power Rangers episode, where he starts out getting beaten badly due to some special ability of his opponent, before he regains the upper hand thanks to his prior hard work/trust in his coach/purity of heart (pick one) and he knocks the other guy out cold. Yawn. My favourite bout in the entire series so far is then the one between Sawamura and Mashiba, and little needs to be told about them except that they are more or less huge bastards. Hey, if you're going to watch two men pound each other into the dust, it helps if they're both scary f**kers who probably deserve it. Sawamura then edges Mashiba (and the nigh-invincible Mamoru Takamura) as my favourite boxer of them all, due to being just a bit more of a f**ker. Quick sketch time: ![]() Ryuhei Sawamura In the story, Sawamura suffered from a rather lonely childhood, thanks to being abandoned by his mother after stabbing her abusive boyfriend to protect her, and after that shunned by his schoolmates due to rumours of him wringing the necks of birds (though this was not confirmed, I think, but which was at least plausible given his image). Well, this is a society where twisting the necks of a few pigeons is the mark of an inhuman psychopath, but doyens of society shooting birds out of the air is a charming afternoon of entertainment, and slaughtering tens of thousands of wretched animals a day for the tastes of the public is simply good business. Shrug. Oh, Sawamura is a cheater too. He almost goes out of his way to draw blood, and will happily knee his opponent in the face if the opportunity presents himself (interestingly, it was once legal to stand over a downed opponent and hit him again once his knees left the ground). Not that I approve, but at least it's better than cheating to lose (as happened with the Black Sox, and also in the manga with one Malcolm Gedo, who due to his poverty in early life is motivated to get as much money out of boxing as possible) The part that I actually admire about him is his total indifference to the opinion of the masses - to put it bluntly, he completely doesn't care if the crowd, or indeed the entire world, is against him. Much has been said about the virtues of teamwork, but whacking the whole of existence by oneself remains a seductive proposition. And of course, such a guy would be written to have a career-ending road accident right after he wins the title. Meh. In the red again at $829/$900 after the international break... $50 on Sunderland to draw Arsenal (at 3.75) $50 on Aston Villa to beat Burnley (2.03)
- academics - And so it happens that all three modules this semester happen to have a large project component. Of the three, the one on databases was the most conventional, and which for my part mostly reduced to implementing an external sort-merge in Java. Integrating code was a bit of a sweat, but we got through that. DNSRA Challenge For algorithms, we had a new project this year - a DNSRA Challenge, which goes well with the biotech direction of the local planned economy. ![]() Making the wall of text that follows slightly more agreeable (Sources: L' esule cinefilo & Imp Awards) A teeny bit of background: Recall the big news some years ago on the (more-or-less) completion of the Human Genome Project, which aimed to produce a complete representation of human DNA. IANAB, but from introductory biology modules, DNA can be thought of as a long strand (possibly circular) of four bases - Adenine (A), Cytosine (C), Guanine (G) and Thymine (T), which is nearly completely identical for members of the same species, and often largely similar even between species. There has been much excitement about using this genetic data to understand how the human body works, especially in relation to hereditary diseases, but perhaps even abilities (see Designer Baby). For us CS people, however, this is not exactly within our scope, and the project focuses on how to obtain the genetic DNA sequence in the first place. A popular misconception might be that this is pretty straightforward - the DNA sequence is some long double-helix thingy in a cell, right? So, isn't it just a case of pulling out this thingy from a human cell, straightening it, and feeding it into some billion-dollar machine and sitting by idly, optionally humming, while waiting for the results? Well, the basic idea is there, but the problem is that we can read only a relatively tiny number of bases each time with any measure of reliability. Traditionally, this number was around a thousand bases, not a lot considering that the human genome has billions of bases. Then, a few years ago, a new method of sequencing DNA appeared on the market, which produces DNA fragments mere dozens of bases long. Wait - is this even an improvement over thousand-base fragments? It turns out that the answer is yes, if far, far more of these short fragments could be produced far more quickly and at a far lower price. Of course, as could be expected, putting these tiny fragments together becomes even more difficult than before. If assembling thousand-base fragments is akin to putting together a jigsaw puzzle of an overexposed sunset, assembling 30-base fragments might then be putting together that same jigsaw - but after dousing it in orange paint and throwing the pieces through a shredder. Strictly speaking, the assembly problem is in general NP-hard (in layman's terms, good luck solving it perfectly for large cases). However, in practice, a good-enough solution is often very useful - few refuse to take medication because one in a million people die from complications, and even the very simple heuristic of sorting the fragments by popularity, and putting them together if there are no conflicting fragments, works quite well sometimes. Our eventual solution was to analyse the output from several such heuristics (including one of our own), and then attempt to further merge the contiguous fragment output into even larger fragments. Some improvement was observed, but whether this applies generally would require far more varied test data. [Bonus tidbit for meticulous future students who just may come across this blog post while doing creative research: It is recommended to run large datasets on the Tembusu cluster, but there were no explicit directions on how to login that I could find. In the end, the method used was to ssh -t -l {username} tembusu2 from sunfire. Uploading files could then be done with wget, and downloading done by first transferring to sunfire with scp] License Plate Recognition Used SlideShare above to display our group's presentation for this, which was for the Computer Vision and Pattern Recognition module. If one thinks that license plate recognition is a rather mature technology, I would most probably agree, considering all the fines that can be collected from speed traps (then again, getting a human to pore over these images probably wouldn't cut too deeply into profits either). The professionals may have specialized equipment such as infrared cameras with super-high shutter speeds and known positions, though, while this project deals with rather more... varied conditions. The presentation should cover most of the main points adequately, but here's a bit extra on adaptive boosting (AdaBoost). The idea is similar to neural networks, as explained about this time last year - given some characteristics of an object, the computer decides how to classify it. As an example, suppose we wish to identify a critter as either a hamster or a mouse, based on its characteristics. Using the characteristic "furry" wouldn't help much, even if we were generous and chucked a few hairless mice into the mix. "Length of tail" is very promising though, and might be good enough by itself. The magic of AdaBoost is that it can combine numerous weak classifiers (such as "furry" above) into a single strong classifier, as long as the weak classifiers have a slightly better than 50% chance of making the correct prediction. ![]() Left: Hypotheses all parallel to axis Right: Unrestricted hypotheses As an example, consider a dense bunch of blue dots concentrated at one end of a sparser spread of red dots. To generate a strong classifier, a weak hypothesis can first be guessed at at random (i.e. a line drawn), which states that all dots to one side should be blue, and all those to the other side, red. Obviously, the very first line cannot be a very good hypothesis, since no single line can divide the blue and red dots neatly. It does sets us up nicely for the key step: of increasing the weight of all dots that were classified incorrectly, so that the next weak classifier to be tried will try harder to classify them correctly. This process is repeated until the error (as measured against the sample data) becomes sufficiently small, and the (weighted) weak classifiers are then linearly combined into the final strong classifier. ![]() Slightly harder example That's it for the projects of this semester, and it's a relief not to have one's desktop half covered by icons any longer. Will be returning to the more usual fare soon, together with commencing revision...
Revelation: My beloved Perl is just not very fast. That's it for this week, as I continue with my module projects. Virtual $100 Challenge update: Currently at $829/$900. Today: $50 on Man City (-1.5) vs Burnley (at 1.85) $50 on Tottenham to draw Sunderland (3.60)
|
![]() |
||||||||||||||||||||
![]() Copyright © 2006-2025 GLYS. All Rights Reserved. |