Yesterday I submitted an entry for the first round of Imagine Cup: Robotics & Algorithm. The first round involves programming the AI for a simulated sumo match between two iRobot Creates. Each robot has a webcam, two bumper sensors, and four IR sensors on the bottom to detect when it is over the outer circle. Here is a simulation of a match in Microsoft Robotics Developer Studio (my AI controls the blue robot):
One thing I dislike about this contest is the fact that the physics engine makes designing a more advanced AI almost completely pointless since when two robots are pushing against each other it is about a 50-50 chance that one will end up below the other and able to push it outside the ring. I tried creating a more advanced strategy to avoid this problem by ramming the other robot and backing away repeatedly, but this just gave the other robot an advantage. The strategy that I ended up submitting has a few tricks such as avoiding repetitive behaviors and randomly choosing between possible actions. However, modifying the AI didn't seem to have any affect on its performance during the matches. Since the matches happen in real-time simulation, it is impossible to simulate a large enough sample size to determine if one strategy is actually superior to another.
I have registered in a team to compete in BattleCode, a programming competition hosted by MIT to design a computer game AI. We haven't started working on it yet, but it looks like it should be a fun project.
Monday, February 16, 2009
Data Compression and Machine Learning
There is an interesting relationship between data compression and machine learning. Any data compression algorithm can be used to perform pattern recognition. This can be done by simply comparing the file size of two independently compressed files to the file size of compressing them together. In other words, compare the size of (compression(A)+compression(B)) to compression(A+B). If the two files contain common patterns, then compression(A+B) will be smaller than (compression(A)+compression(B)). By comparing the relative file size difference using solid compression, it is possible to rank the similarity of different data sets.
In my machine learning course last semester we had an optional project to do binary classification on a dataset with thousands of features. We were given data in a training set which were classified into one of two categories (positive/negative). We needed to write an algorithm to classify test data. To compare the quality of our solution, we were given an implementation of AdaBoost with the following error rates:
false negative rate = 0.1429 (over 350 positive data)
false positive rate = 0.1429 (over 350 negative data)
sum: 0.2858
I used a neural network to achieve a lower error rate:
false negative rate = 0.14 (over 350 positive data)
false positive rate = 0.12285714285714286 (over 350 negative data)
sum: 0.2628571428571429
This morning I tried comparing some different data compression algorithms to see how well they are at binary classification. Using 7z I got the following error rates:
false negative rate = 0.31142857142857144 (over 350 positive data)
false positive rate = 0.2542857142857143 (over 350 negative data)
I also tried using gzip and paq8p. gzip was fast but had a terrible error rate. I think paq8p would have done much better than 7z, but it is extremely slow so I couldn't finish running it on the test set. I assume that in general better (slower) compression algorithms will have a lower error rate.
In my machine learning course last semester we had an optional project to do binary classification on a dataset with thousands of features. We were given data in a training set which were classified into one of two categories (positive/negative). We needed to write an algorithm to classify test data. To compare the quality of our solution, we were given an implementation of AdaBoost with the following error rates:
false negative rate = 0.1429 (over 350 positive data)
false positive rate = 0.1429 (over 350 negative data)
sum: 0.2858
I used a neural network to achieve a lower error rate:
false negative rate = 0.14 (over 350 positive data)
false positive rate = 0.12285714285714286 (over 350 negative data)
sum: 0.2628571428571429
This morning I tried comparing some different data compression algorithms to see how well they are at binary classification. Using 7z I got the following error rates:
false negative rate = 0.31142857142857144 (over 350 positive data)
false positive rate = 0.2542857142857143 (over 350 negative data)
I also tried using gzip and paq8p. gzip was fast but had a terrible error rate. I think paq8p would have done much better than 7z, but it is extremely slow so I couldn't finish running it on the test set. I assume that in general better (slower) compression algorithms will have a lower error rate.
Sunday, February 01, 2009
Tuesday, January 06, 2009
PS3
I installed Yellow Dog Linux on my PS3. I tried running my vectorization program on it and was pleased to see that it runs about 50% faster than on my desktop. Here was the output (with 250 triangles and 200 iterations):
Monday, January 05, 2009
India Trip
I got back from my trip to India yesterday. Overall I had a great time. I had some problems trying to get into the country however. In ignorance, I assumed that I could get a tourist visa on arrival. This was not the case. When they discovered that I did not have a visa, they immediately tried to deport me. I was given two options: either fly to Sri Lanka in an attempt to get an Indian visa, or fly back to France. I was leaning towards the Sri Lanka option, but after lengthy negotiation I discovered a hidden third option. Several hours later I was issued a temporary landing permit. This allowed me to stay in India for three days. In those three days I visited the Bureau of Immigration and got an extended exit endorsement until the end of my trip.
I spent most of vacation relaxing at my parent's house by the beach. We did some exploring along the coast between Chennai and Mahabalipuram. We found a cool place with a network of pools surrounded by rock cliffs. After Christmas we took trip to Kerala for a few days. We stayed in Kumarakom and explored the backwaters, lake Vembanad, and a bird sanctuary. I was hoping to spend a few days on a house boat, but unfortunately we were visiting at the peak of tourist season so it was impossible to reserve one for a decent price. We took several boat rides and even rented our own canoe. Kerala is an incredibly beautiful place so I made sure to take plenty of pictures.
For Christmas I got a PS3. I managed to get video output to my monitor after buying an expensive HDMI to DVI cable. I have been having trouble trying to get the audio working. There are three audio output options: RCA, TOSLINK, and HDMI. I have a cable which converts RCA to a male TRS connector. If I want to get audio to my speakers/headphones, I need a female connector. Using the audio in/out ports of my computer would do the trick, but unfortunately I am having sound card driver issues in Ubuntu. If I fail at fixing the driver problems I'll need to buy another cable.
On my way to India I worked on a new version of Swarm. On the way back I worked on a vectorization program (see this blog entry). Neither of the projects turned out as well as I was hoping. I have now abandoned releasing the new version of Swarm since it isn't much of an improvement. The vectorization program is slow and does not seem to do a very good job. Here is the Mona Lisa with 100 triangles:
Original image:
Iteration 10:
Iteration 50:
Iteration 150:
It took about one hour to get to iteration 150 and its rate of improvement seemed to have leveled off. I assume that 100 triangles can represent the Mona Lisa much better than this solution, so I am going to work on improving both the efficiency and the effectiveness of the program.
I have finally finished reading Anathem. Overall I thought it was a great book, although I got really bored by some of the long philosophical discussions. Since I didn't bring GEB to India, I have started reading A Game of Thrones.
I spent most of vacation relaxing at my parent's house by the beach. We did some exploring along the coast between Chennai and Mahabalipuram. We found a cool place with a network of pools surrounded by rock cliffs. After Christmas we took trip to Kerala for a few days. We stayed in Kumarakom and explored the backwaters, lake Vembanad, and a bird sanctuary. I was hoping to spend a few days on a house boat, but unfortunately we were visiting at the peak of tourist season so it was impossible to reserve one for a decent price. We took several boat rides and even rented our own canoe. Kerala is an incredibly beautiful place so I made sure to take plenty of pictures.
For Christmas I got a PS3. I managed to get video output to my monitor after buying an expensive HDMI to DVI cable. I have been having trouble trying to get the audio working. There are three audio output options: RCA, TOSLINK, and HDMI. I have a cable which converts RCA to a male TRS connector. If I want to get audio to my speakers/headphones, I need a female connector. Using the audio in/out ports of my computer would do the trick, but unfortunately I am having sound card driver issues in Ubuntu. If I fail at fixing the driver problems I'll need to buy another cable.
On my way to India I worked on a new version of Swarm. On the way back I worked on a vectorization program (see this blog entry). Neither of the projects turned out as well as I was hoping. I have now abandoned releasing the new version of Swarm since it isn't much of an improvement. The vectorization program is slow and does not seem to do a very good job. Here is the Mona Lisa with 100 triangles:
Original image:
Iteration 10:
Iteration 50:
Iteration 150:
It took about one hour to get to iteration 150 and its rate of improvement seemed to have leveled off. I assume that 100 triangles can represent the Mona Lisa much better than this solution, so I am going to work on improving both the efficiency and the effectiveness of the program.I have finally finished reading Anathem. Overall I thought it was a great book, although I got really bored by some of the long philosophical discussions. Since I didn't bring GEB to India, I have started reading A Game of Thrones.
Thursday, December 18, 2008
Flight Cancelled
To save money I booked a bizarre flight path to India:
Seattle -> Vancouver -> Hong Kong -> Chennai
This means I had to take a bus from Vancouver to Seattle in order to fly back to Vancouver. In addition, the flight leaves in the morning so I had to stay in a hotel overnight. I couldn't just cancel the flight because that would cancel the connecting flights as well.
The flight from Seattle to Vancouver was cancelled this morning due to mechanical problems. There were no other flights to Vancouver in time for my connecting flight, and taking a taxi/bus probably wouldn't have made it in time either (especially with the snow). The only option was book a completely different flight path which leaves tomorrow:
Seattle -> Paris -> Chennai
Seattle -> Vancouver -> Hong Kong -> Chennai
This means I had to take a bus from Vancouver to Seattle in order to fly back to Vancouver. In addition, the flight leaves in the morning so I had to stay in a hotel overnight. I couldn't just cancel the flight because that would cancel the connecting flights as well.
The flight from Seattle to Vancouver was cancelled this morning due to mechanical problems. There were no other flights to Vancouver in time for my connecting flight, and taking a taxi/bus probably wouldn't have made it in time either (especially with the snow). The only option was book a completely different flight path which leaves tomorrow:
Seattle -> Paris -> Chennai
Monday, December 15, 2008
Projects
Now that exams are finished and I have submitted most of my grad school applications, I should finally have time to work on some projects I have been planning:
- Vectorization using stochastic local search: I read a cool blog entry about evolving a picture of the Mona Lisa using only 50 polygons. Inspired by the results, I think it would be cool to use stochastic local search to convert an arbitrary image to vector graphics. I will add a parameter to choose the number of polygons. I will try to animate it to show the progress of the algorithm as it optimizes the image representation in real-time.
- A new version of Arlisy: A generic neural network framework which can be applied to a variety of problems. It will have the ability to detect temporal patterns. I also plan on implementing an attention control mechanism which allows the framework to focus on a subset of its input, similar to the role that attention plays in biological perception by concentrating the use of mental resources on a particular aspect of the environment.
- Netflix prize: I haven't made much progress since last summer. I am going to try implementing singular value decomposition to combine with my neural network approach.
- A better version of Swarm: I know the algorithm I used for finding nearest neighbors in the old version can be made much more efficient. This will allow larger swarms to be simulated in real-time. I'll try adding some more advanced behavior rules as well.
- I am considering competing in the Robotics & Algorithm category of Imagine Cup 2009.
Tuesday, December 02, 2008
Exams!
Once again it is exam period, so if you are in need of some distraction here are two neat flash games I've found:
Auditorium: awesome concept for a puzzle game. Its a shame there are so few levels in the demo.
99 Bricks: my record is slightly over 700.
I have two exams tomorrow. I should really be studying right now.
Auditorium: awesome concept for a puzzle game. Its a shame there are so few levels in the demo.
99 Bricks: my record is slightly over 700.I have two exams tomorrow. I should really be studying right now.
Monday, November 24, 2008
Monday, November 17, 2008
Sunday, November 16, 2008
2008 ACM-ICPC Pacific Northwest Contest
Yesterday I competed in the regional ACM programming contest. There were 85 teams competing in our region. Here is the final ranking for the top five places:
1) Stanford
2) Stanford
3) University of California, Berkeley
4) UBC ^
5) UBC *
This was really frustrating because only two teams advance from a region to the world final (which is in Sweden this year). Since only one team can advance per university, UBC was only one spot away from advancing. There is actually still a chance that UBC might get to advance however, since there is a wildcard slot. I was on the UBC * team. We were ridiculously close to solving another problem in the last few minutes. If we had solved it, we would have jumped to 2nd place. We made a submission with about two minutes left which failed because it took too long to execute. However, with a minor modification to the code (just one or two lines) our solution probably would have run under the time limit. Both of my teammates were doing really well during the contest and did the majority of the work. They will both be at UBC next year, so I'm sure that their team will do really well at the next regional. Here were the results from last year's regional:
1) UBC ^
2) UBC *
3) Stanford
4) Simon Fraser University
5) University of California, Berkeley
1) Stanford
2) Stanford
3) University of California, Berkeley
4) UBC ^
5) UBC *
This was really frustrating because only two teams advance from a region to the world final (which is in Sweden this year). Since only one team can advance per university, UBC was only one spot away from advancing. There is actually still a chance that UBC might get to advance however, since there is a wildcard slot. I was on the UBC * team. We were ridiculously close to solving another problem in the last few minutes. If we had solved it, we would have jumped to 2nd place. We made a submission with about two minutes left which failed because it took too long to execute. However, with a minor modification to the code (just one or two lines) our solution probably would have run under the time limit. Both of my teammates were doing really well during the contest and did the majority of the work. They will both be at UBC next year, so I'm sure that their team will do really well at the next regional. Here were the results from last year's regional:
1) UBC ^
2) UBC *
3) Stanford
4) Simon Fraser University
5) University of California, Berkeley
Friday, November 14, 2008
Grad School Applications
I have finally decided on a list of schools I will be applying to:
University of California, Berkeley
Carnegie Mellon University
University of Washington
University of Illinois at Urbana-Champaign
University of Waterloo
McGill University
University of Alberta
University of British Columbia
University of Toronto
Most of the applications are due mid-December. I have a ridiculous amount of work due in the next two weeks, followed by final exams (which are all within 7 days). Hopefully I'll manage to submit the applications without having to sacrifice studying time. I will be so happy once finals are finished, instantly switching between having an overwhelming amount of work to having absolutely no work at all. Over Christmas vacation I will be traveling around southern India.
University of California, Berkeley
Carnegie Mellon University
University of Washington
University of Illinois at Urbana-Champaign
University of Waterloo
McGill University
University of Alberta
University of British Columbia
University of Toronto
Most of the applications are due mid-December. I have a ridiculous amount of work due in the next two weeks, followed by final exams (which are all within 7 days). Hopefully I'll manage to submit the applications without having to sacrifice studying time. I will be so happy once finals are finished, instantly switching between having an overwhelming amount of work to having absolutely no work at all. Over Christmas vacation I will be traveling around southern India.
Monday, November 10, 2008
Wednesday, November 05, 2008
Hotmail
A few hours ago I was automatically "upgraded" to a new version of Hotmail. I am not picky about what additional features an email client has or how stylish the interface is as long as I can conveniently read/send emails. I have had my Hotmail account for about five years. When Gmail came out I decided not to switch since I didn't want to go through the hassle of changing my contact information. With the newest version of Hotmail I am finally considering making the switch.
When logging into Hotmail I am greeted with this page:
It tells me to upgrade my browser despite the fact that I am using Firefox version 3.0.3, the latest version for Linux. After logging in it takes me two clicks to reach my inbox (which is two clicks too many in my opinion).
This is what happens when I try to compose an email:
Notice that the text formatting buttons are grayed out. I tried clicking on the whitespace below that panel to find that there is no text box. That's right, there is absolutely no way for me to send emails because I don't have any way to enter text. I am probably not the only person with this problem. With the most critical functionality of Hotmail broken, I have no choice but to switch providers.
When logging into Hotmail I am greeted with this page:
It tells me to upgrade my browser despite the fact that I am using Firefox version 3.0.3, the latest version for Linux. After logging in it takes me two clicks to reach my inbox (which is two clicks too many in my opinion).This is what happens when I try to compose an email:
Notice that the text formatting buttons are grayed out. I tried clicking on the whitespace below that panel to find that there is no text box. That's right, there is absolutely no way for me to send emails because I don't have any way to enter text. I am probably not the only person with this problem. With the most critical functionality of Hotmail broken, I have no choice but to switch providers.
Wednesday, October 29, 2008
Sad
Well the exchange rate has continued rising, making me really regret trading when I did.The next month is going to be extremely busy/stressful for me:
- I will have a series of midterms over the next few weeks.
- I have to send out grad school applications. This includes finalizing my list of schools, filling out applications, and writing numerous essays.
- I am part of a team for the ACM programming competition. UBC has three teams (UBC^, UBC*, and UBC+). I am part of UBC* (UBC^ is the best team). There is a regional competition hosted by UBC on November 15th. We will have up to 10 hours of practice every week until the regionals. The world finals will be in Sweden in 2009.
- I have two big papers due in Psychology and Philosophy.
- All of my exams are packed in between December 3rd through 10th.
- I have other commitments like my part time job as a TA, assignments, meetings, etc...
Saturday, October 18, 2008
Update
Since my last post about the exchange rate, the US to Canadian dollar rate has been skyrocketing upward. I exchanged money at exactly the wrong time. I won't feel too bad about it though since I had no choice but to exchange in order to pay for tuition. Luckily I only exchanged enough to pay for tuition and left the rest in US dollars. A few days ago I converted the rest of my money:
Hopefully this time the exchange rate won't significantly increase immediately after my trade. Predicting exchange rate fluctuations is frustratingly difficult.
In other news, there have been two separate incidents happen to my bike since it was almost stolen. A few weeks ago the bike was knocked over and the disc brake was severely bent (I had to replace the unit). Since the disc is a fairly solid piece of metal, it must have been deliberately stepped on in order to bend it. This morning I found that the mudguard had been stolen and the seat was also adjusted to a lower position (I am not quite sure why the thief would feel compelled to adjust the level of the seat).
Hopefully this time the exchange rate won't significantly increase immediately after my trade. Predicting exchange rate fluctuations is frustratingly difficult.In other news, there have been two separate incidents happen to my bike since it was almost stolen. A few weeks ago the bike was knocked over and the disc brake was severely bent (I had to replace the unit). Since the disc is a fairly solid piece of metal, it must have been deliberately stepped on in order to bend it. This morning I found that the mudguard had been stolen and the seat was also adjusted to a lower position (I am not quite sure why the thief would feel compelled to adjust the level of the seat).
Friday, October 10, 2008
Anathem and GEB
Earlier this week I ordered two books online. I received the books today in a surprisingly quick display of international delivery. Behold:
Neal Stephenson's Anathem and Douglas Hofstadter's Gödel, Escher, Bach: an Eternal Golden Braid. I have very high expectations for both books. I just flipped a coin (really!) and it looks like I will be reading Anathem first. Given the length/density of the books, it should take me quite a while to get through them.
Neal Stephenson's Anathem and Douglas Hofstadter's Gödel, Escher, Bach: an Eternal Golden Braid. I have very high expectations for both books. I just flipped a coin (really!) and it looks like I will be reading Anathem first. Given the length/density of the books, it should take me quite a while to get through them.
Thursday, October 09, 2008
Smiley Value Decomposition
For an assignment in my machine learning course I performed principal components analysis (PCA) using singular value decomposition (SVD) on some smiley faces:
Reducing the dimensionality of a data matrix of smiley vectors allows us to visualize smiley face features in two dimensions. Yay!
Reducing the dimensionality of a data matrix of smiley vectors allows us to visualize smiley face features in two dimensions. Yay!
Saturday, October 04, 2008
Exchange Rate
Saturday, September 06, 2008
Friday, September 05, 2008
Somebody tried to steal my bike!
I found my bike tipped over this morning and there was a big cut made into my bike lock. I am glad I invested in a decent quality lock! Bike theft is a pretty big problem at UBC. The cut made it entirely through the outer plastic layer of the lock and partially through the metal interior. I think I will buy another (even more secure) lock since another theft attempt at the weakened part of the lock might make it all the through. There was never a theft attempt on my old bike during my last four years at UBC. This was probably due to the fact that I bought that bike for $20 (significantly cheaper than my current bike). However, some of the accessories were stolen from my old bike (cyclocomputer and portable bike pump). Some of my friends have had pieces of their bikes stolen (a wheel, a seat, etc) and at least four people I know had their entire bike stolen.
Saturday, August 30, 2008
GRE
I took the GRE this morning. It started with two writing sections. My essays weren't spectacular, but the topics were interesting so at least I had something to write about. The next section was the math section. I did really well on this and finished just barely on time. I switched the answer for my last question with less than 5 seconds to spare! Next was a verbal section which went about as well as could be expected (English is not one of my strong points). I thought that would be the end of the exam but was surprised when another math section started. My practice tests only had one math section so I was annoyed that the test wasn't finished. This second math section went terrible since by then I was getting tired. I was working way too slow and still had 7 questions remaining with only one minute left. I had to randomly guess for the last few questions. I was surprised to see in the end that my scores were 800 in math and 600 in English. I am really lucky that the second math section must not have been scored. Apparently they put in an extra unmarked experimental section. I will have to wait for the scores to be sent to me before I get the marks for the essays.
Tuesday, August 26, 2008
Internship Finished
I finished my internship at Microsoft last Friday. It has been a great summer. Almost every weekend there was some Microsoft event taking place. I took part in two puzzle events. One of them was non-stop for 36 hours and really well organized (our team came in third)! A few weeks ago I went cave exploring at Ape Cave Lava Tube near Mount St. Helens. Two days ago (my birthday) I saw Dark Knight at IMAX - incredible movie.
On August 30th I will be taking the GRE. I haven't done much studying for it yet, so I plan on studying for the next few days. Over the next semester I will start applying for grad schools. I have decided where I will be applying for six out of my nine applications:
- Carnegie Mellon
- MIT
- Stanford
- UBC
- Waterloo
- University of Toronto
- ?
- ?
- ?
The other three will most likely come from this list. I will be applying to AI programs. I am currently planning to focus on learning about pattern recognition. Since I eventually plan on doing industry research, hopefully I can get research internships over the next few summers.
On August 30th I will be taking the GRE. I haven't done much studying for it yet, so I plan on studying for the next few days. Over the next semester I will start applying for grad schools. I have decided where I will be applying for six out of my nine applications:
- Carnegie Mellon
- MIT
- Stanford
- UBC
- Waterloo
- University of Toronto
- ?
- ?
- ?
The other three will most likely come from this list. I will be applying to AI programs. I am currently planning to focus on learning about pattern recognition. Since I eventually plan on doing industry research, hopefully I can get research internships over the next few summers.
Saturday, June 07, 2008
Saturday, May 31, 2008
Summer
I have been working for Microsoft for almost a month now. So far it has been a great experience. The company has a ton of amazing benefits and it has been really interesting learning about their software development practices. I am working on a product called Office Live Workspace. There have been a lot of fun intern events such as a poker night, video games, movies, and a trip to the zoo. I have also attended a few research/tech talks on campus. We get all the free drinks we want here and also occasional free food (if you know where to look).
There are a lot of things to see and do around Seattle. A few weeks ago I went to the Pacific Science Center. I think its better than the one in Vancouver. I saw Speed Racer at IMAX. It was pretty dissapointing, but I wasn't too surprised based on its score at IMDB. Yesterday I went to see a Cirque Du Soleil show called Corteo. It was an excellent production, but I liked the Mystère show I saw in Las Vegas better.

I got a new bike earlier this month. There are supposed to be some really nice bike trails in this area, so I plan on exploring a few of them over the summer.
Here is a photo album I will be uploading pictures to over the summer.
There are a lot of things to see and do around Seattle. A few weeks ago I went to the Pacific Science Center. I think its better than the one in Vancouver. I saw Speed Racer at IMAX. It was pretty dissapointing, but I wasn't too surprised based on its score at IMDB. Yesterday I went to see a Cirque Du Soleil show called Corteo. It was an excellent production, but I liked the Mystère show I saw in Las Vegas better.

I got a new bike earlier this month. There are supposed to be some really nice bike trails in this area, so I plan on exploring a few of them over the summer.
Here is a photo album I will be uploading pictures to over the summer.
Netflix Prize
One of my summer projects will be working on the Netflix prize. It is a competition to write a program to predict user ratings of movies. We are provided with a huge dataset of actual user ratings from the Netflix database. We are also provided with a test set of <user, movie> tuples for which we need to predict ratings. After submitting the predictions Netflix returns the root mean squared error (RMSE) for a subset of the test set. Netflix already has the actual ratings for the test set, which is how they score the predictions. The three submissions I have made so far have gotten the following RMSE:
1.0533
0.9992
0.9844
Netflix's own algorithm (Cinematch) gets a RMSE of 0.9525. In order to win the competition and get the one million dollar prize a team must have a submission with a RMSE below 0.8572. The best team currently has a score of 0.8643. The three submissions I have made so far just use basic statistics for the predictions. I have three main ideas on how to approach the problem - two of them involve clustering algorithms and one of them uses temporal neural networks.
1.0533
0.9992
0.9844
Netflix's own algorithm (Cinematch) gets a RMSE of 0.9525. In order to win the competition and get the one million dollar prize a team must have a submission with a RMSE below 0.8572. The best team currently has a score of 0.8643. The three submissions I have made so far just use basic statistics for the predictions. I have three main ideas on how to approach the problem - two of them involve clustering algorithms and one of them uses temporal neural networks.
Sunday, May 11, 2008
Temporal Patterns
I have finished implementing a neural network framework for detecting temporal patterns. I made a small demo of it using a single bit input. In theory the framework should scale well to much larger problems with many inputs. It is capable of detecting both spatial and temporal patterns and making predictions of what the next input will be. The framework can be used for a huge variety of applications and problems. I tried testing it for part-of-speech tagging but the results were disappointing. Due to the huge number of neurons/inputs I had to use, the network was taking several seconds to process each input. Since the network needs to be trained on huge corpora consisting of thousands of words, it would take a really long time before it can make accurate predictions. A good property of neural networks is that they are highly parrellelizable so that all of the neurons can be processing information at the same time. On a single CPU my computer processes information for one neuron at a time. Given the right hardware, neural networks can have a constant upper bound on computational time. This means that an arbitrary number of neurons/inputs could be added to the network without affecting the processing time.
Friday, May 09, 2008
First Publication!
A paper I have been working on about AIspace has been accepted for publication at the AAAI 2008 AI Education Colloquium. I will be headed to Chicago on July 13th!
Knoll, B., Kisyński, J., Carenini, G., Conati, C., Mackworth, A., Poole, D. 2008. AIspace: Interactive Tools for Learning Artificial Intelligence. In Proceedings of the AAAI 2008 AI Education Workshop. BibTeX
Knoll, B., Kisyński, J., Carenini, G., Conati, C., Mackworth, A., Poole, D. 2008. AIspace: Interactive Tools for Learning Artificial Intelligence. In Proceedings of the AAAI 2008 AI Education Workshop. BibTeX
Friday, April 25, 2008
RoboCup Simulator
Here is a short video of what the simulator I made for the RoboCup soccer competition looks like:
[link]
The low quality video is due to the fact that I recorded my monitor using a digital camera. I tried a variety of screencast software (ffmpeg, vlc, xvidcap, istanbul, and vnc2swf) but none of them could capture at decent quality/framerate. I think its time to upgrade my computer (this one is now four years old).
In the video the red team has been assigned the "offensive" strategy and the blue team has been assigned the "dibs" strategy. I haven't implemented all of the RoboCup rules yet (e.g. the ball always gets reset to the center when it goes out of bounds). You can learn more about the AI by reading a report I wrote for one of my classes.
[link]
The low quality video is due to the fact that I recorded my monitor using a digital camera. I tried a variety of screencast software (ffmpeg, vlc, xvidcap, istanbul, and vnc2swf) but none of them could capture at decent quality/framerate. I think its time to upgrade my computer (this one is now four years old).
In the video the red team has been assigned the "offensive" strategy and the blue team has been assigned the "dibs" strategy. I haven't implemented all of the RoboCup rules yet (e.g. the ball always gets reset to the center when it goes out of bounds). You can learn more about the AI by reading a report I wrote for one of my classes.
Sunday, March 23, 2008
Thursday, February 28, 2008
Meet Jon Arbuckle
Apparently an unfunny comic strip can be made hilarious with some minor modifications. Above we see Garfield minus Garfield. The comic strips below are referred to as Realfield. Making a strip out of random Garfield panels can also lead to some amusing results.
Friday, February 22, 2008
Patterns
The universe is chaotic. Within the chaos there are patterns. These patterns are due to emergent properties of relatively simple rules underlying the unimaginably complex interactions of matter. Patterns can be found almost anywhere in nature, from the organization of stars and galaxies to the symmetry of ice crystals in a snowflake. This phenomenon is not unique to nature; incredibly complex patterns can be observed by applying very simple rules such as in the Mandelbrot set or in cellular automata. These emergent properties are also responsible for the origin of life on Earth and the evolution which guides it.

Life is a striking example of the organization of matter. When suitable chemical and physical conditions arose in early Earth, organic compounds eventually organized themselves into a form allowing self-replication. Natural selection takes advantage of patterns in an organism's environment to gradually optimize its suitability for a particular environment. This process has lead to the huge variety and complexity of life forms seen today. The process of evolution has also created patterns within its creations, such as the fractals seen in Romanesco broccoli. Intelligent biological systems have evolved to actively recognize and exploit the patterns in their environment in order to gain an evolutionary advantage. Learning from the success of biological cognition may help in the pursuit of creating truly intelligent machines.

A crucial step in designing an intelligent machine is understanding the fundamental ways in which patterns are organized in nature. The ability to accurately predict and complete patterns allows a system to act intelligently in its environment. In order to make predictions about patterns a machine needs to be capable of learning from past experiences and recognizing both spatial and temporal patterns. Almost all current neural network techniques are only capable of detecting spatial patterns and cannot detect patterns through time. The fact that the human brain is capable of intelligence provides proof that intelligence is possible given limited computational resources, giving hope that computational intelligence may be achieved in the near future.
M74 Spiral Galaxy

Life is a striking example of the organization of matter. When suitable chemical and physical conditions arose in early Earth, organic compounds eventually organized themselves into a form allowing self-replication. Natural selection takes advantage of patterns in an organism's environment to gradually optimize its suitability for a particular environment. This process has lead to the huge variety and complexity of life forms seen today. The process of evolution has also created patterns within its creations, such as the fractals seen in Romanesco broccoli. Intelligent biological systems have evolved to actively recognize and exploit the patterns in their environment in order to gain an evolutionary advantage. Learning from the success of biological cognition may help in the pursuit of creating truly intelligent machines.
Aloe Polyphylla

A crucial step in designing an intelligent machine is understanding the fundamental ways in which patterns are organized in nature. The ability to accurately predict and complete patterns allows a system to act intelligently in its environment. In order to make predictions about patterns a machine needs to be capable of learning from past experiences and recognizing both spatial and temporal patterns. Almost all current neural network techniques are only capable of detecting spatial patterns and cannot detect patterns through time. The fact that the human brain is capable of intelligence provides proof that intelligence is possible given limited computational resources, giving hope that computational intelligence may be achieved in the near future.
Wednesday, February 20, 2008
Terror
This morning I woke up in an extremely unpleasant way. While I was still blissfully asleep I heard some scratching sounds coming from somewhere close to my head. I groggily opened my eyes to see a squirrel staring down at me from the windowsill directly above my bed. In horror I made some loud noises and quick movements with my arms in the squirrel's direction. This successfully got the squirrel to flee out of the window.
Tuesday, February 19, 2008
Reading Week
Reading week has been amazing so far. Today I went on a bike ride to Stanley Park. I went around the seawall and then rode back to UBC. I was having so much fun that I decided to do some biking around Pacific Spirit Regional Park as well. I regret not bringing my camera since there was some beautiful scenery. I have also been watching lots of anime, reading, working on some programming projects, and playing tons of video games. I accepted an internship position from Microsoft, so I am really looking forward to working there over the summer.

Unfortunately our team didn't make the qualifiers for the RoboCup competition in China. We are going to be working on trying to qualify for a regional competition instead. The AI is progressing well. I made a simulator so we can continue working on the AI without needing physical robots. We have finished most of the lower level behaviors so I am going to start making some different playing strategies. Different strategies can be assigned to competing teams, so simulating matches will show which strategies are superior.

Unfortunately our team didn't make the qualifiers for the RoboCup competition in China. We are going to be working on trying to qualify for a regional competition instead. The AI is progressing well. I made a simulator so we can continue working on the AI without needing physical robots. We have finished most of the lower level behaviors so I am going to start making some different playing strategies. Different strategies can be assigned to competing teams, so simulating matches will show which strategies are superior.
Saturday, February 16, 2008
Video Games
After a pretty bad week (which included four midterms) I am looking forward to reading week. Originally I was planning on going on a road trip to the Rockies with some friends but unfortunately I don't think those plans are going to work out. With the free time I will finally get a chance to enjoy some video games I have been waiting to play:
-The Longest Journey (PC)
-Grim Fandango (PC)
-BioShock (PC)
-Final Fantasy XII (PS2)
I just finished installing Windows XP to replace my Vista partition. After struggling to get The Longest Journey working in Vista, I eventually gave up and decided to reformat the partition. It just doesn't make sense for me to be using Vista when the only reason I have a Windows partition in the first place is to take advantage of its compatibility.
Here is a list I compiled of some of my favorite games:
Adventure:
-Legend of Zelda: Ocarina of Time (N64) and Legend of Zelda: Majora's Mask (N64)
-Beneath a Steel Sky (PC)
-Day of the Tentacle (PC), Full Throttle (PC), and The Dig (PC)
-Monkey Island series (PC)
-Myst series (PC)
RPG:
-Baldur's Gate II: Shadows of Amn (PC)
-Star Wars: Knights of the Old Republic (PC)
-Final Fantasy VI (SNES), VII (PSX), VIII (PSX), IX (PSX), and X (PS2).
-Elder Scrolls IV: Oblivion (PC)
-Chrono Trigger (SNES) and Chrono Cross (PSX)
-Guild Wars (PC)
FPS:
-The Orange Box (PC)
-Quake (PC) and Quake III Arena (PC)
-Crysis (PC)
-Deus Ex (PC)
-Unreal Tournament series (PC)
Action:
-God of War (PS2) and God of War II (PS2)
-Prince of Persia: The Sands of Time (PS2)
-Shadow of the Colossus (PS2)
-Super Mario 64 (N64)
-Another World (PC)
Strategy:
-Advance Wars (GBA)
-Total Annihilation (PC)
-Rise of Nations (PC)
-Sacrifice (PC)
-Black & White (PC)
And for the sake of completeness, here is a list of all the consoles my family has owned:
-Atari 2600 (1977)
-Nintendo Entertainment System (1983)
-Sega Mega Drive (1988)
-Game Boy (1989)
-Game Gear (1990)
-Sega Mega-CD (1991)
-Virtual Boy (1995)
-Nintendo 64 (1996)
-PlayStation 2 (2000)
-Game Boy Advanced (2001)
-PlayStation Portable (2004)
-The Longest Journey (PC)
-Grim Fandango (PC)
-BioShock (PC)
-Final Fantasy XII (PS2)
I just finished installing Windows XP to replace my Vista partition. After struggling to get The Longest Journey working in Vista, I eventually gave up and decided to reformat the partition. It just doesn't make sense for me to be using Vista when the only reason I have a Windows partition in the first place is to take advantage of its compatibility.
Here is a list I compiled of some of my favorite games:
Adventure:
-Legend of Zelda: Ocarina of Time (N64) and Legend of Zelda: Majora's Mask (N64)
-Beneath a Steel Sky (PC)
-Day of the Tentacle (PC), Full Throttle (PC), and The Dig (PC)
-Monkey Island series (PC)
-Myst series (PC)
RPG:
-Baldur's Gate II: Shadows of Amn (PC)
-Star Wars: Knights of the Old Republic (PC)
-Final Fantasy VI (SNES), VII (PSX), VIII (PSX), IX (PSX), and X (PS2).
-Elder Scrolls IV: Oblivion (PC)
-Chrono Trigger (SNES) and Chrono Cross (PSX)
-Guild Wars (PC)
FPS:
-The Orange Box (PC)
-Quake (PC) and Quake III Arena (PC)
-Crysis (PC)
-Deus Ex (PC)
-Unreal Tournament series (PC)
Action:
-God of War (PS2) and God of War II (PS2)
-Prince of Persia: The Sands of Time (PS2)
-Shadow of the Colossus (PS2)
-Super Mario 64 (N64)
-Another World (PC)
Strategy:
-Advance Wars (GBA)
-Total Annihilation (PC)
-Rise of Nations (PC)
-Sacrifice (PC)
-Black & White (PC)
And for the sake of completeness, here is a list of all the consoles my family has owned:
-Atari 2600 (1977)
-Nintendo Entertainment System (1983)
-Sega Mega Drive (1988)
-Game Boy (1989)
-Game Gear (1990)
-Sega Mega-CD (1991)
-Virtual Boy (1995)
-Nintendo 64 (1996)
-PlayStation 2 (2000)
-Game Boy Advanced (2001)
-PlayStation Portable (2004)
Monday, January 28, 2008
一週間
Last Sunday I went out with some friends to see a new ferry that BC Ferries is introducing into the fleet. We got a complete tour of the ferry (including the engine room and the bridge). We also got a free cookie, a drink, and a balloon! One of my friends was interviewed and appeared on the local news.
I had two job interviews last week. The first one was a phone interview with IBM on Monday. I am applying for the Extreme Blue program. The second was an on-campus interview with Google on Friday. I think the Google interview went better than the IBM one. I really don't like phone interviews. They actually made me write code and dictate it over the phone. As I was reading it aloud I noticed mistakes in my code and started trying to correct things. I even started doing crazy stuff like changing variable names and adding features to the code as I was dictating. Of course, this turned out to be a terrible idea since I immediately lost track of what I was trying to do and got confused -_-. I have another phone interview with them in a week, so this time I will try to act a little less flustered.
On Thursday Google invited all the interviewees to a dinner. I thought this was a great event - a good opportunity to learn more about Google, eat free food, and get a Google umbrella. The problems in the Google interview were similar to a typical programming competition. There were three problems which I had to solve and provide time and space complexity. After solving the initial problem, two of the problems had additional twists to make them a bit more interesting.
Today I attended a talk by David Suzuki. I really enjoyed the talk. He is an excellent speaker and covered a wide variety of topics. He started with some background information about his early life and academic career. The main focus of his talk was the potentially negative impact academic research can have on society. He also discussed topics such as Canadian politics, racism, genetics, and ecology. I found it amusing that he voiced a few direct criticisms about UBC. One of these criticisms was the fact that the high tuition fees for international students is not justified and discourages diversity. Another criticism was that UBC Forestry has biased views about logging in British Columbia due to the fact that logging companies are sponsoring and providing financial support to the faculty. After the Suzuki talk I went directly to a presentation by Business Objects. I don't think this is the type of company I would like to work at (I will not be applying for an internship there this summer) but at least there was free pizza.
I had two job interviews last week. The first one was a phone interview with IBM on Monday. I am applying for the Extreme Blue program. The second was an on-campus interview with Google on Friday. I think the Google interview went better than the IBM one. I really don't like phone interviews. They actually made me write code and dictate it over the phone. As I was reading it aloud I noticed mistakes in my code and started trying to correct things. I even started doing crazy stuff like changing variable names and adding features to the code as I was dictating. Of course, this turned out to be a terrible idea since I immediately lost track of what I was trying to do and got confused -_-. I have another phone interview with them in a week, so this time I will try to act a little less flustered.
On Thursday Google invited all the interviewees to a dinner. I thought this was a great event - a good opportunity to learn more about Google, eat free food, and get a Google umbrella. The problems in the Google interview were similar to a typical programming competition. There were three problems which I had to solve and provide time and space complexity. After solving the initial problem, two of the problems had additional twists to make them a bit more interesting.
Today I attended a talk by David Suzuki. I really enjoyed the talk. He is an excellent speaker and covered a wide variety of topics. He started with some background information about his early life and academic career. The main focus of his talk was the potentially negative impact academic research can have on society. He also discussed topics such as Canadian politics, racism, genetics, and ecology. I found it amusing that he voiced a few direct criticisms about UBC. One of these criticisms was the fact that the high tuition fees for international students is not justified and discourages diversity. Another criticism was that UBC Forestry has biased views about logging in British Columbia due to the fact that logging companies are sponsoring and providing financial support to the faculty. After the Suzuki talk I went directly to a presentation by Business Objects. I don't think this is the type of company I would like to work at (I will not be applying for an internship there this summer) but at least there was free pizza.
Wednesday, January 23, 2008
AIspace Release
We have redesigned the CIspace website and changed its name to AIspace. The new website URL is http://aispace.org. The old CIspace website will continue to exist until March 1st, after which all CIspace URLs will be automatically forwarded to AIspace. Here are some of the technologies I used to redesign the site:
- Server Side Includes: using SHTML, common sections of the website were placed into a single file instead of duplicating the code for each webpage. This allows site wide changes (such as adding a new tab) by editing just one file instead of having to edit each page on the website.
- Cascading Style Sheets: used to define colors, fonts, and the overall layout of the website.
- HTML validation: all of the webpages have been validated to ensure cross-browser compatibility. A button has been added to the bottom-right of each webpage to check its validation using the W3C validation service.
- The website and applet logos were redesigned using vector graphics in Inkscape.
- Server Side Includes: using SHTML, common sections of the website were placed into a single file instead of duplicating the code for each webpage. This allows site wide changes (such as adding a new tab) by editing just one file instead of having to edit each page on the website.
- Cascading Style Sheets: used to define colors, fonts, and the overall layout of the website.
- HTML validation: all of the webpages have been validated to ensure cross-browser compatibility. A button has been added to the bottom-right of each webpage to check its validation using the W3C validation service.
- The website and applet logos were redesigned using vector graphics in Inkscape.
Sunday, December 30, 2007
Saturday, December 29, 2007
Game Theory in Las Vegas
I tried to use a bit of game theory to increase my odds when gambling in Vegas. Of course, I already know that the casinos have a house advantage so I wasn't surprised to see negative expected utilities when calculating the odds of a game. The rational choice would of course be not to gamble. Instead I just gambled a little.
After doing a bit of research on Wikipedia, some of the games with the worst odds are Keno and slot machines. However, these are the games I ended up playing. The games with better odds such as blackjack and roulettes had much higher minimum bets (especially compared to the one cent slots). Games which involve skill allow you minimize the house advantage.
Keno was slightly more interesting than slots because each casino had different paytables and specialty bets. You can choose bets with different payoffs and different probabilities of winning. I could calculate when one type of bet had a lower expected utility than another.
My brother came into Vegas with his own gambling strategy. Given a game with fifty-fifty odds and double payoff, his strategy was to continue doubling his bet until he wins. In the end, if he had an infinite amount of money to bet, this guarantees that he will win exactly the value of the first bet. For example: lose $1, lose $2, lose $4, win $8, profit=$1. However, with a finite amount of money to bet I tried to persuade him that the strategy does not make any sense. It is risking losing lots of money (with a low probability) and gaining a little (with a high probability). In the end this does not change your expected utility (which is zero for the game I described above). The strategy also doesn't make sense because of the concept of sunk cost. Once he loses money in previous games, it should not affect his future betting strategy. Despite my complaints he ended up making a profit o_o
Kevin Leyton-Brown gave an interesting guest lecture about game theory in my Cognitive Systems 300 class last year. Near the end of class we had several different types of auctions for $5 bills. He let us know that any profits would go to charity. I thought one of the auctions was particularly interesting in which the highest bidder would win the prize as normal but the second highest bidder would also have to pay their bid. This means as soon as there was more than two bids over $2.50 Kevin was guaranteed to make a profit on the $5 bill. I made bids over $2.50 even though I knew it wasn't an optimal strategy (it was for charity after all). Being the second highest bidder you are really tempted to outbid the highest in an attempt to win the prize and avoid a complete loss. Another guy in the class and I continued bidding against eachother until the bids actually got over $5. This means Kevin is getting over $10 for his $5 bill :). I eventually gave up and ended up being the second highest bidder. The highest bidder only lost a few cents while I lost over $5. I thought the auction was fascinating due to the temptation for the two highest bidders to continue outbidding eachother despite going over the actual value of the prize (let alone the optimal maximum of $2.50). I'll keep this auction in mind as a fun thing to try with my friends (except this time I will be the auctioneer).
After doing a bit of research on Wikipedia, some of the games with the worst odds are Keno and slot machines. However, these are the games I ended up playing. The games with better odds such as blackjack and roulettes had much higher minimum bets (especially compared to the one cent slots). Games which involve skill allow you minimize the house advantage.
Keno was slightly more interesting than slots because each casino had different paytables and specialty bets. You can choose bets with different payoffs and different probabilities of winning. I could calculate when one type of bet had a lower expected utility than another.
My brother came into Vegas with his own gambling strategy. Given a game with fifty-fifty odds and double payoff, his strategy was to continue doubling his bet until he wins. In the end, if he had an infinite amount of money to bet, this guarantees that he will win exactly the value of the first bet. For example: lose $1, lose $2, lose $4, win $8, profit=$1. However, with a finite amount of money to bet I tried to persuade him that the strategy does not make any sense. It is risking losing lots of money (with a low probability) and gaining a little (with a high probability). In the end this does not change your expected utility (which is zero for the game I described above). The strategy also doesn't make sense because of the concept of sunk cost. Once he loses money in previous games, it should not affect his future betting strategy. Despite my complaints he ended up making a profit o_o
Kevin Leyton-Brown gave an interesting guest lecture about game theory in my Cognitive Systems 300 class last year. Near the end of class we had several different types of auctions for $5 bills. He let us know that any profits would go to charity. I thought one of the auctions was particularly interesting in which the highest bidder would win the prize as normal but the second highest bidder would also have to pay their bid. This means as soon as there was more than two bids over $2.50 Kevin was guaranteed to make a profit on the $5 bill. I made bids over $2.50 even though I knew it wasn't an optimal strategy (it was for charity after all). Being the second highest bidder you are really tempted to outbid the highest in an attempt to win the prize and avoid a complete loss. Another guy in the class and I continued bidding against eachother until the bids actually got over $5. This means Kevin is getting over $10 for his $5 bill :). I eventually gave up and ended up being the second highest bidder. The highest bidder only lost a few cents while I lost over $5. I thought the auction was fascinating due to the temptation for the two highest bidders to continue outbidding eachother despite going over the actual value of the prize (let alone the optimal maximum of $2.50). I'll keep this auction in mind as a fun thing to try with my friends (except this time I will be the auctioneer).
Wednesday, December 26, 2007
Vegas
Pictures of my trip can be found here.
December 20:
I left from Vancouver to Las Vegas at 2pm. There was some severe turbulence on the descent into Vegas (enough to start some of the passengers screaming). In Vegas I met my brother, his wife, and her parents. There was a sandstorm when we were driving through town that night so that probably had something to do with the turbulence. The sandstorm was actually interesting to see since I have never been in one before. We were staying at a hotel called Harrah's which was right on The Strip. That night we went to Fremont Street. The massive display on the ceiling was very impressive. The slot machines I used on Fremont Street also turned out to be the only profitable gambling I did in Vegas.
December 21:
We started the day by going to the top of the Stratosphere. This is high enough that you can immediately feel a change in air pressure as you are riding up the elevator. It is way taller than any of the other buildings in Vegas so there are some amazing views. Our next destination was Hoover Dam. On the way there there was some authentic desert with cacti. The dam was a very impressive display of engineering. That night we had dinner at Sam's Town and saw a laser light show.
December 22:
I spent the morning sleeping in while everyone else went to the grand canyon. I had decided not to get tickets to go since it was very pricey. That afternoon we visited a few of the hotels and casinos along The Strip. Each hotel has very unique themes and shows in order to attract visitors. Two shows that I enjoyed were the fountains at the Bellagio and the volcano at the Mirage.
December 23:
We saw a car show in the morning and spent the rest of the day touring The Strip. That night we went to the best part of the trip for me - Cirque du Soliel. We went to Mystère at Treasure Island. This was by far the best circus I have ever seen. The music, theater, and performances combined perfectly to create a magical show. I was so impressed by the quality of it that I now want to see the other Cirque du Soliel shows in hope that they are as good.
December 24:
We went to a few more famous hotels and casinos along The Strip. My favorite building was the Luxor; an Egyption themed hotel/casino in the shape of a pyramid. The MGM had some lions on display. Some other cool places we saw were Caesar's Palace, Paris, New York, The Venetian, and Excalibur.
December 25:
We had a relaxing Christmas, mostly enjoying The Strip and playing some poker. Our hotel had an excellent buffet selection. It was almost overwhelming the number of different food options there were so I inevitably ended up eating way too much. I am fairly sure that I have gained a decent amount of weight in the last six days ;)
December 26:
I had to wake up at 4am to catch a very early flight. I was pleased to see that there was some snow when I returned to Vancouver. Waiting for me at my apartment was the PS2 lens I ordered. I spent about five hours working on the PS2. Although the lens was non-functional when I first installed it, I eventually got it to read original DVDs. It refuses to read any CDs or burnt DVDs however. At least it wasn't a total waste since I can now play a few games in my collection. The fact that it still isn't completely working implies that the lens was not the only problem.
For the rest of vacation I will be splitting my time between Robocup and CIspace. I am also playing the following games right now: Final Fantasy Tactics (on PSP), Grim Fandango, Unreal Tournament 3, and Crysis. Although these are all great games, the game I really want to play is Final Fantasy XII. That is why I have been putting so much effort into getting the PS2 working.
December 20:
I left from Vancouver to Las Vegas at 2pm. There was some severe turbulence on the descent into Vegas (enough to start some of the passengers screaming). In Vegas I met my brother, his wife, and her parents. There was a sandstorm when we were driving through town that night so that probably had something to do with the turbulence. The sandstorm was actually interesting to see since I have never been in one before. We were staying at a hotel called Harrah's which was right on The Strip. That night we went to Fremont Street. The massive display on the ceiling was very impressive. The slot machines I used on Fremont Street also turned out to be the only profitable gambling I did in Vegas.
December 21:
We started the day by going to the top of the Stratosphere. This is high enough that you can immediately feel a change in air pressure as you are riding up the elevator. It is way taller than any of the other buildings in Vegas so there are some amazing views. Our next destination was Hoover Dam. On the way there there was some authentic desert with cacti. The dam was a very impressive display of engineering. That night we had dinner at Sam's Town and saw a laser light show.
December 22:
I spent the morning sleeping in while everyone else went to the grand canyon. I had decided not to get tickets to go since it was very pricey. That afternoon we visited a few of the hotels and casinos along The Strip. Each hotel has very unique themes and shows in order to attract visitors. Two shows that I enjoyed were the fountains at the Bellagio and the volcano at the Mirage.
December 23:
We saw a car show in the morning and spent the rest of the day touring The Strip. That night we went to the best part of the trip for me - Cirque du Soliel. We went to Mystère at Treasure Island. This was by far the best circus I have ever seen. The music, theater, and performances combined perfectly to create a magical show. I was so impressed by the quality of it that I now want to see the other Cirque du Soliel shows in hope that they are as good.
December 24:
We went to a few more famous hotels and casinos along The Strip. My favorite building was the Luxor; an Egyption themed hotel/casino in the shape of a pyramid. The MGM had some lions on display. Some other cool places we saw were Caesar's Palace, Paris, New York, The Venetian, and Excalibur.
December 25:
We had a relaxing Christmas, mostly enjoying The Strip and playing some poker. Our hotel had an excellent buffet selection. It was almost overwhelming the number of different food options there were so I inevitably ended up eating way too much. I am fairly sure that I have gained a decent amount of weight in the last six days ;)
December 26:
I had to wake up at 4am to catch a very early flight. I was pleased to see that there was some snow when I returned to Vancouver. Waiting for me at my apartment was the PS2 lens I ordered. I spent about five hours working on the PS2. Although the lens was non-functional when I first installed it, I eventually got it to read original DVDs. It refuses to read any CDs or burnt DVDs however. At least it wasn't a total waste since I can now play a few games in my collection. The fact that it still isn't completely working implies that the lens was not the only problem.
For the rest of vacation I will be splitting my time between Robocup and CIspace. I am also playing the following games right now: Final Fantasy Tactics (on PSP), Grim Fandango, Unreal Tournament 3, and Crysis. Although these are all great games, the game I really want to play is Final Fantasy XII. That is why I have been putting so much effort into getting the PS2 working.
Thursday, December 20, 2007
Eyes

I found a cool webpage with a collection of detailed images of eyes. Its amazing how complex the patterns are and the amount of variation there is between different people.

I tried photographing my own eye but it turned out to be surprisingly difficult. Not only are reflections hard to avoid but my eye was half closed in most of the pictures:

I eventually got a picture with a full image of my iris and did some photoshoping to get this:

Not quite as interesting as the other eyes on the webpage :(
Wednesday, December 05, 2007
PS2 Frustration
I recently received my old PS2 and a fairly large collection of games shipped here from India. Shipping it here turned out to be a very bad plan. Despite the fact that it was packaged fairly securely, the CD spindle that the games were in was shattered. Luckily the CDs/DVDs were undamaged. However, when I tested the PS2 it would not read any discs. The memory card was also unreadable.
I have been struggling to find a way to fix the disc reader. After a combination of cleaning the laser lens (using alcohol and Q-tips) and cleaning the components which allow the lens to move to different locations on a disc, I have gotten it to reliably read audio CDs and PS2 CDs. It does not read PS2 DVDs or DVD movies however. I have been waiting over a year to play a certain DVD game.

Despite upcoming exams, I have spent several hours adjusting the lens alignment in an attempt to get it to read DVDs. There are many different alignment settings, and testing each setting requires assembling and disassembling the drive (to avoid hazardous laser radiation when the drive is powered up). Every time I make a minor adjustment a completely different set of sounds and vibrations are made when it tries to read a disc. None of the settings successfully read DVDs.
The cost of a replacement lens is $40. I am trying not to let the sunk cost of $67 for shipping the PS2 here play a factor in my decision. I am still not entirely sure if a replacement lens will fix the problem. Despite the fact that the amount of money that I have spent is approaching that of a brand new PS2, I have just finished ordering a new lens. I will post an update on whether it works when it arrives.
I have been struggling to find a way to fix the disc reader. After a combination of cleaning the laser lens (using alcohol and Q-tips) and cleaning the components which allow the lens to move to different locations on a disc, I have gotten it to reliably read audio CDs and PS2 CDs. It does not read PS2 DVDs or DVD movies however. I have been waiting over a year to play a certain DVD game.

Despite upcoming exams, I have spent several hours adjusting the lens alignment in an attempt to get it to read DVDs. There are many different alignment settings, and testing each setting requires assembling and disassembling the drive (to avoid hazardous laser radiation when the drive is powered up). Every time I make a minor adjustment a completely different set of sounds and vibrations are made when it tries to read a disc. None of the settings successfully read DVDs.
The cost of a replacement lens is $40. I am trying not to let the sunk cost of $67 for shipping the PS2 here play a factor in my decision. I am still not entirely sure if a replacement lens will fix the problem. Despite the fact that the amount of money that I have spent is approaching that of a brand new PS2, I have just finished ordering a new lens. I will post an update on whether it works when it arrives.
Monday, November 26, 2007
Thursday, November 15, 2007
Programming Contests
UBC dominated the regional ACM programming contest last weekend. The three teams placed first, second, and tenth (out of 76 teams). Here are some news articles about the event: [link] [link]
I am going to try to do some practicing over the next year to get ready for the next qualifiers. I think it would be a great experience to be on the team. This week I competed in two online contests (Google Code Jam and TopCoder). There are some really interesting problems in these contests. I feel like I can solve the majority of the problems, but the only problem is that I am extremely slow at doing so. It is really impressive to see the speed at which the top coders can create solutions.
I am going to try to do some practicing over the next year to get ready for the next qualifiers. I think it would be a great experience to be on the team. This week I competed in two online contests (Google Code Jam and TopCoder). There are some really interesting problems in these contests. I feel like I can solve the majority of the problems, but the only problem is that I am extremely slow at doing so. It is really impressive to see the speed at which the top coders can create solutions.
Thursday, October 25, 2007
Busy
This has been by far the busiest semester I have ever had. Four out of five of my courses have weekly assignments. I am close to getting through my midterms - the last one is tomorrow. Besides coursework, I have also gotten involved in some activities outside of class which take up a lot of time.
I have started volunteering at Thunderbird Robotics. I will be working on the AI for UBC's RoboCup entry. RoboCup is a robot soccer competition (we will be competing in the small size league).
I work about 8 hours a week on CIspace. Some recent major releases include the customizable applets section of the website and a new version of the Bayesian Network applet. The customizable applets allow you to choose which interface elements should be included in an applet and then embed it in a webpage. It should be helpful for creating tutorials about AI concepts. I am currently working on the robot navigation applet. I have added a RSS feed to CIspace so you can subscribe to keep track of the latest releases.
I have also been going to practices for the UBC ACM programming competition team. Every weekend there is a small practice contest between universities. We separate into small groups of 2-3 people and work on interesting (and frustrating) programming problems. There are usually around 7 problems to work on and the contests last about 3-5 hours. Waterloo seems to have very strong teams. UBC also does very well and seems to do better than Stanford. There are some incredible people on the team - its amazing to see how fast they can solve difficult problems.
I was also part of a team for vPortfolio. vPortfolio is a competition for creating a short video related to Computer Science. Unfortunately since I didn't have very much time to work on it (and neither did the other team members), we decided to forfeit.
There are some advantages to having a busy schedule. With less free time, I become much more selective at what I do for entertainment. This means I prioritize the highest quality entertainment first, saving myself many wasted hours of low quality entertainment I previously indulged in ^_^. I have still managed to get through several anime series, movies, and video games this semester however. I am currently enjoying the incredible video game compilation The Orange Box. Given how busy this semester has been, I worry about next semester in which I will be taking six extremely work intensive courses.
I have started volunteering at Thunderbird Robotics. I will be working on the AI for UBC's RoboCup entry. RoboCup is a robot soccer competition (we will be competing in the small size league).
I work about 8 hours a week on CIspace. Some recent major releases include the customizable applets section of the website and a new version of the Bayesian Network applet. The customizable applets allow you to choose which interface elements should be included in an applet and then embed it in a webpage. It should be helpful for creating tutorials about AI concepts. I am currently working on the robot navigation applet. I have added a RSS feed to CIspace so you can subscribe to keep track of the latest releases.
I have also been going to practices for the UBC ACM programming competition team. Every weekend there is a small practice contest between universities. We separate into small groups of 2-3 people and work on interesting (and frustrating) programming problems. There are usually around 7 problems to work on and the contests last about 3-5 hours. Waterloo seems to have very strong teams. UBC also does very well and seems to do better than Stanford. There are some incredible people on the team - its amazing to see how fast they can solve difficult problems.
I was also part of a team for vPortfolio. vPortfolio is a competition for creating a short video related to Computer Science. Unfortunately since I didn't have very much time to work on it (and neither did the other team members), we decided to forfeit.
There are some advantages to having a busy schedule. With less free time, I become much more selective at what I do for entertainment. This means I prioritize the highest quality entertainment first, saving myself many wasted hours of low quality entertainment I previously indulged in ^_^. I have still managed to get through several anime series, movies, and video games this semester however. I am currently enjoying the incredible video game compilation The Orange Box. Given how busy this semester has been, I worry about next semester in which I will be taking six extremely work intensive courses.
Wednesday, October 03, 2007
MSN Attacks!
For the last week I have been flooded with requests from random people I don't know to add me to their contact list. I find it unlikely that I have been infected with some sort of worm/virus since I use Linux. The people who try to add me are real and they seem just as confused as I am on why they added me to their list. I have started denying anyone who tries to add me, which is annoying since I can't tell which requests are legitimate.
Thursday, September 20, 2007
Last Lecture
I just watched a sad video of a Computer Science professor giving his last lecture. He is dying of pancreatic cancer and gave a presentation reflecting on his life.
Article: http://www.post-gazette.com/pg/07262/818671-85.stm
Here is a video of the lecture: http://www.cs.cmu.edu/front_im/pausch_9-18-07.wmv
Article: http://www.post-gazette.com/pg/07262/818671-85.stm
Here is a video of the lecture: http://www.cs.cmu.edu/front_im/pausch_9-18-07.wmv
Sunday, September 16, 2007
The Classics of Science Fiction
Here is a list of my favorite science fiction books and movies (only included works that were made before I was born):
Movies:
Blade Runner (1982) - This movie is one of the greatest science fiction films ever made. Everything about it comes together to form a fascinating universe combining many complex themes. If you are only going to watch one movie from this list, watch Blade Runner.
Solyaris (1972) - I regret watching the 2002 remake of this movie before the original. I actually really liked the remake when I saw it, but after seeing the original I know that the only reason I liked was because it was merely a glimpse at this incredible film.
Alien (1979) - Although I would consider this movie more of a horror/thriller than science fiction, it is still an excellent movie that deserves a place on this list.
2001: A Space Odyssey (1968) - It's unfortunate that humans haven't reached the level of technological development predicted in this film. An excellent novel by Arthur C. Clarke was released at the same time as the movie. The only thing stopping me from declaring this as my favorite sci-fi movie is that I didn't like the ending. In my opinion the movie would have been better off if it had ended at the discovery of the third monolith near Jupiter.
Stalker (1979) - This is an incredibly unique and bizarre movie. It may require some open-mindedness to watch because of its complexity and slow pace. However, it deals with many fascinating themes such as human psychology which really make the film rewarding.
Books:
Dune (Frank Herbert, 1965) - This is by far the best book I have ever read. It flawlessly combines culture, religion, technology, ecology, politics, and psychology into an unforgettable story. A movie, two mini-series, and numerous video games have been released based on the book, but none of them even come close to capturing the Dune universe.
Ender's Game (Orson Scott Card, 1985) - I am currently reading the third book in the Ender series. Given that I just started reading the series a little over a week ago, you can see that I have become so involved in the series that it has taken priority over homework.
Neuromancer (William Gibson, 1984) - This book has had a fairly large cultural impact. It popularized the term "cyberspace" and defined hacker culture long before the World Wide Web was even created.
Rendezvous With Rama (Arthur C Clarke, 1973) - Even though I was still in middle school the last time I read this, I still remember the entire plot of the series due to the fact that it was so interesting and original.
Foundation (Isaac Asimov, 1951) - The Foundation series involves an epic story about human civilization spanning over several hundred years.
Movies:
Blade Runner (1982) - This movie is one of the greatest science fiction films ever made. Everything about it comes together to form a fascinating universe combining many complex themes. If you are only going to watch one movie from this list, watch Blade Runner.
Solyaris (1972) - I regret watching the 2002 remake of this movie before the original. I actually really liked the remake when I saw it, but after seeing the original I know that the only reason I liked was because it was merely a glimpse at this incredible film.
Alien (1979) - Although I would consider this movie more of a horror/thriller than science fiction, it is still an excellent movie that deserves a place on this list.
2001: A Space Odyssey (1968) - It's unfortunate that humans haven't reached the level of technological development predicted in this film. An excellent novel by Arthur C. Clarke was released at the same time as the movie. The only thing stopping me from declaring this as my favorite sci-fi movie is that I didn't like the ending. In my opinion the movie would have been better off if it had ended at the discovery of the third monolith near Jupiter.
Stalker (1979) - This is an incredibly unique and bizarre movie. It may require some open-mindedness to watch because of its complexity and slow pace. However, it deals with many fascinating themes such as human psychology which really make the film rewarding.
Books:
Dune (Frank Herbert, 1965) - This is by far the best book I have ever read. It flawlessly combines culture, religion, technology, ecology, politics, and psychology into an unforgettable story. A movie, two mini-series, and numerous video games have been released based on the book, but none of them even come close to capturing the Dune universe.
Ender's Game (Orson Scott Card, 1985) - I am currently reading the third book in the Ender series. Given that I just started reading the series a little over a week ago, you can see that I have become so involved in the series that it has taken priority over homework.
Neuromancer (William Gibson, 1984) - This book has had a fairly large cultural impact. It popularized the term "cyberspace" and defined hacker culture long before the World Wide Web was even created.
Rendezvous With Rama (Arthur C Clarke, 1973) - Even though I was still in middle school the last time I read this, I still remember the entire plot of the series due to the fact that it was so interesting and original.
Foundation (Isaac Asimov, 1951) - The Foundation series involves an epic story about human civilization spanning over several hundred years.
Sunday, September 09, 2007
Mandelbrot Set

I spent the day making a Mandelbrot set fractal generator. Here is a link to the applet. I was originally hoping that it would be possible to have real-time zooming to allow convenient exploration of the fractal. However, since rendering each frame takes a significant amount of time, I gave up and just added a simpler zooming system.
It really is amazing the infinite complexity and beauty that arises from such a simple function. I spent at least an hour just exploring different parts of the fractal. I saw patterns which have never been seen before due its infinite complexity. I found it interesting that although you should be able to zoom in infinitely, there is actually a zoom limit in my applet due to the limitation of 64 bit double precision numbers. Here is an excellent documentary by Arthur C. Clarke about the Mandelbrot set.
Friday, September 07, 2007
Java Games
I recently made two simple Java games:
Ping:
Online applet
.jar file
This is a remake of a game I made in highschool [link]. It is based on the classic game Pong.
Swarm:
Online applet
.jar file
This actually started off as a little project I was working on to create emergent behaviors. After assigning a few simple rules to dots on the screen, the dots could actually interact with eachother in complex patterns. These are the rules which each dot follows:
- Move towards closest neighbor
- Move towards left mouse click (proportional to distance from click)
- Move away from right mouse click (proportional to distance from click)
- Move randomly
I thought it was interesting how the dots movement seemed similar to insect swarms. I then decided to make this into a simple game by adding worms which hunt down the dots. The user tries to control the dots to avoid the worms. I made the worms using Bézier curves and trigonometric functions. I had a few problems with the transition between the sin/cos functions (used to animate the worms wiggling), so occasionally a worm might have some strange movements ;)
(Note: the game is CPU intensive, so it might run slowly on older computers. It will probably run faster as an application from the .jar file than as an applet.)
Ping:
Online applet
.jar file
This is a remake of a game I made in highschool [link]. It is based on the classic game Pong.
Swarm:
Online applet
.jar file
This actually started off as a little project I was working on to create emergent behaviors. After assigning a few simple rules to dots on the screen, the dots could actually interact with eachother in complex patterns. These are the rules which each dot follows:
- Move towards closest neighbor
- Move towards left mouse click (proportional to distance from click)
- Move away from right mouse click (proportional to distance from click)
- Move randomly
I thought it was interesting how the dots movement seemed similar to insect swarms. I then decided to make this into a simple game by adding worms which hunt down the dots. The user tries to control the dots to avoid the worms. I made the worms using Bézier curves and trigonometric functions. I had a few problems with the transition between the sin/cos functions (used to animate the worms wiggling), so occasionally a worm might have some strange movements ;)
(Note: the game is CPU intensive, so it might run slowly on older computers. It will probably run faster as an application from the .jar file than as an applet.)
Monday, August 27, 2007
New Laptop!
I got a Gateway MT3705 for my birthday. So far I am really pleased with it. It has similar specs to my desktop (which is now over three years old) but was half its price. I have named the laptop Trillian. I am dual-booting Vista and Ubuntu on it. My only complaint so far is that audio isn't working at all under Linux. I found a thread full of people with the same problem - hopefully I will figure out how to get it working soon.
When I returned to my room with my new laptop in hand, I noticed my desktop was making a rattling noise. I narrowed the sound down to being produced by the video card fan. I tried to remove the video card, but the screw holding it in place was stuck. Trying to unscrew it with the tiny screwdriver I had gave me two really bad blisters. I went out, purchased a screwdriver with a better grip, and successfully removed the video card. After spraying the fan with some compressed air I returned it to the desktop. Unfortunately the computer then refused to boot. After running almost continuously for the last three years, my computer breaks down on the same day that I get the new laptop.
After randomly fiddling with the video card I actually got the computer booting again. However the fan has completely stopped, so I don't expect it to last for very long.
When I returned to my room with my new laptop in hand, I noticed my desktop was making a rattling noise. I narrowed the sound down to being produced by the video card fan. I tried to remove the video card, but the screw holding it in place was stuck. Trying to unscrew it with the tiny screwdriver I had gave me two really bad blisters. I went out, purchased a screwdriver with a better grip, and successfully removed the video card. After spraying the fan with some compressed air I returned it to the desktop. Unfortunately the computer then refused to boot. After running almost continuously for the last three years, my computer breaks down on the same day that I get the new laptop.
After randomly fiddling with the video card I actually got the computer booting again. However the fan has completely stopped, so I don't expect it to last for very long.
Saturday, August 25, 2007
Thursday, August 02, 2007
Fireworks
I am currently taking my second week of vacation and enjoying Pender Island. Work has been going really well and I feel like I have been making some real progress on CIspace. I will be posting new versions of almost all the applets very soon. I have already started making plans for this Christmas vacation - I will be heading to South India.
Monday, July 23, 2007
UAI Conference
For the last four days I was attending the Uncertainty in Artificial Intelligence conference. I got free registration by volunteering to help out with the conference. I ended up staffing the registration desk for a few shifts as well as helping move some boxes. Not a bad deal for getting to attend interesting AI talks and eating lots of free conference food.
Most of the talks were actually very hard to follow. They dealt with advanced topics and assumed that the audience was already familiar with the concepts being discussed. I still enjoyed the talks however since there were some really interesting applications for the techniques being discussed. I probably also picked up some important AI terminology which should prove useful.
Most of the talks were actually very hard to follow. They dealt with advanced topics and assumed that the audience was already familiar with the concepts being discussed. I still enjoyed the talks however since there were some really interesting applications for the techniques being discussed. I probably also picked up some important AI terminology which should prove useful.
Tuesday, June 12, 2007
CIspace
After a month and a half of hard work, I have released new versions of the following CIspace applets:
I have been putting most of my effort into adding features for the neural network applet and the bayes applet. Depending on how progress goes, I should be able to release the new versions in a week or two. Some ideas we had for future CIspace projects included customizable inline applets, a new robot navigation applet, and a natural language processing applet using hidden Markov models.
I have really been enjoying working in the LCI lab. I get to attend a lot of interesting presentations about artificial intelligence. Hopefully I should be able to go to the upcoming AAAI conference (one of my supervisors is the president of AAAI!).
In other news, I have decided to spend a fifth year here at UBC and get a double major. I will be majoring in Computer Science and Cognitive Systems (Cognition and Brain stream). After I graduate I plan on attending graduate school (most likely in the U.S.).
- Search - Version 4.4.0
- CSP - Version 4.5.0
- Stochastic Local Search for CSP - Version 4.5.0
- Decision Tree - Version 4.3.0
- Deduction - Version 4.2.0
I have been putting most of my effort into adding features for the neural network applet and the bayes applet. Depending on how progress goes, I should be able to release the new versions in a week or two. Some ideas we had for future CIspace projects included customizable inline applets, a new robot navigation applet, and a natural language processing applet using hidden Markov models.
I have really been enjoying working in the LCI lab. I get to attend a lot of interesting presentations about artificial intelligence. Hopefully I should be able to go to the upcoming AAAI conference (one of my supervisors is the president of AAAI!).
In other news, I have decided to spend a fifth year here at UBC and get a double major. I will be majoring in Computer Science and Cognitive Systems (Cognition and Brain stream). After I graduate I plan on attending graduate school (most likely in the U.S.).
Sunday, June 10, 2007
Friday, June 08, 2007
In Celebration of Spork
Sunday, May 27, 2007
Penalty Box
Tuesday, May 08, 2007
Numbers

I am now the exclusive owner of the number 6D 37 00 22 9A 51 7D D7 5D 26 5B 75 2B 02 D2 6F. This number is mine and you are not allowed to know about it.
You too can claim a number (service may be unavailable due to the Slashdot effect).
"We own integers,
Says AACS LA.
You can own one too."
(C) 2007 Edward W. Felten
Subscribe to:
Posts (Atom)

















