The Netflix Prize contest is officially over. One month ago BellKor's Pragmatic Chaos made a submission with a 10.05% improvement over Cinematch. The contest ends 30 days after any submission over 10%. Yesterday a new team called The Ensemble made a submission at 10.09% accuracy (a 0.01% improvement over BellKor's Pragmatic Chaos). Today, 24 minutes before the contest finished BellKor's Pragmatic Chaos made a submission of 10.09%. Four minutes before the end The Ensemble made their final submission with a 10.10% improvement. Both of these teams were actually a combination of many smaller teams. In the end the key to victory was combining the results of a myriad of different algorithms/approaches.
Now that the Netflix Prize has finished I will start focusing on a new contest ☺. Eternity II is a puzzle with a two million dollar prize. I have written a solver using stochastic local search. My solution currently has a score of 437 out of 480. Last year the highest score was 467 (with a $10,000 prize).
Sunday, July 26, 2009
Sunday, July 19, 2009
Rhythm Recognition
I just posted a new applet on my website which can learn simple rhythms. The rhythms are input by clicking on a button. I plan on creating a few more applets which demonstrate some of the things temporal pattern recognition can be used for.
I actually think that temporal pattern recognition can be used for any task which requires intelligence. Intelligence is equivalent to the ability to recognize and predict patterns. The only reason that we haven't created intelligent AI is because pattern recognition is a difficult problem. Since the code I am using to recognize patterns is terrible compared to what most animals can accomplish, my demos will have to be constrained to relatively simple problems.
I actually think that temporal pattern recognition can be used for any task which requires intelligence. Intelligence is equivalent to the ability to recognize and predict patterns. The only reason that we haven't created intelligent AI is because pattern recognition is a difficult problem. Since the code I am using to recognize patterns is terrible compared to what most animals can accomplish, my demos will have to be constrained to relatively simple problems.
Thursday, July 16, 2009
Wednesday, July 15, 2009
The Blob
The vast majority of my time working on Time Stop was spent making the blob. There were two main challenges in creating it:
Physics:
Since Box2D only simulates rigid body physics, I had to create the elastic body using many rigid components. I first created a grid of circles to act as the main body of the blob. The circles are allowed to overlap and are connected together using many forces. The forces keep the circles at a reasonable distance apart while still allowing them to move relative to each other. This is what gives the blob its elastic properties. I then added a chain of thin rectangles around the edge of the circles to act as a membrane. The membrane helps define the shape of the blob and also acts as a barrier for colliding objects.
Graphics:
OpenGL can only render straight lines. This creates difficulties when trying to render curves (a blob). A curve can be approximated using many straight lines. The straighter parts of the curve require less lines while the rounder part of the curve requires more lines. I used NURBS to create a smooth curve using the rectangles on the membrane as control points. In order to fill in the interior of the blob I used many solid triangles all connected at a central point.
I have released a new version of Time Stop. This version has better blob physics, faster game play, and a new (challenging) level.
Physics:
Since Box2D only simulates rigid body physics, I had to create the elastic body using many rigid components. I first created a grid of circles to act as the main body of the blob. The circles are allowed to overlap and are connected together using many forces. The forces keep the circles at a reasonable distance apart while still allowing them to move relative to each other. This is what gives the blob its elastic properties. I then added a chain of thin rectangles around the edge of the circles to act as a membrane. The membrane helps define the shape of the blob and also acts as a barrier for colliding objects.
Graphics:OpenGL can only render straight lines. This creates difficulties when trying to render curves (a blob). A curve can be approximated using many straight lines. The straighter parts of the curve require less lines while the rounder part of the curve requires more lines. I used NURBS to create a smooth curve using the rectangles on the membrane as control points. In order to fill in the interior of the blob I used many solid triangles all connected at a central point.
I have released a new version of Time Stop. This version has better blob physics, faster game play, and a new (challenging) level.
Tuesday, July 14, 2009
Time Stop
The first version of my new game has been released! Time Stop is a 2D physics based puzzle game. It uses the Box2D physics engine, OpenGL, and Creative Commons background music. There is a single level which demonstrates the core game play mechanics. The game can be run by either compiling from source or using one of the Linux/Windows executables (the Windows version currently has some bugs).
Friday, July 10, 2009
Lost in Translation
I found my name in a German article about Imagine Cup. Here is what Google translate outputs on the relevant paragraph:
"
The word "Medaillienspiegel" is no coincidence. As the Olympic Games allegedly making the youth of the world, it is also the meeting of the young programmers conjunctive effect, especially on the development goals (Millennium Development Goals) is the UN. But the spectacle flag at the foot of the Pyramids, the Microsoft of a dispensation granted by the Egyptian government could carry out, showed otherwise. Uninhibited celebrated especially Brazil, China and Poland, with flags and speaking choirs, if a country team, a winner had reached space. The award presented to the winners banners schwenkend, only the Nationalhymen missing. Only the winners from the UK, Canada, the Czech Republic and the United States without a plume occurred at. "I do not know that my code is code is a Canadian," said Byron Knoll at the end of the Finals, as the nations around frenetically celebrated their winner.
"
I think it is commenting on the fact that I didn't have a Canadian flag at the event (most of the other competitors brought flags). As for my quote "I do not know that my code is code is a Canadian" I have a feeling that much of its original meaning has been lost in the English->German->English translation. I have no idea what my original statement was, so I'm not sure if the German translation is accurate ^_^
"
The word "Medaillienspiegel" is no coincidence. As the Olympic Games allegedly making the youth of the world, it is also the meeting of the young programmers conjunctive effect, especially on the development goals (Millennium Development Goals) is the UN. But the spectacle flag at the foot of the Pyramids, the Microsoft of a dispensation granted by the Egyptian government could carry out, showed otherwise. Uninhibited celebrated especially Brazil, China and Poland, with flags and speaking choirs, if a country team, a winner had reached space. The award presented to the winners banners schwenkend, only the Nationalhymen missing. Only the winners from the UK, Canada, the Czech Republic and the United States without a plume occurred at. "I do not know that my code is code is a Canadian," said Byron Knoll at the end of the Finals, as the nations around frenetically celebrated their winner.
"
I think it is commenting on the fact that I didn't have a Canadian flag at the event (most of the other competitors brought flags). As for my quote "I do not know that my code is code is a Canadian" I have a feeling that much of its original meaning has been lost in the English->German->English translation. I have no idea what my original statement was, so I'm not sure if the German translation is accurate ^_^
Thursday, July 09, 2009
Trip Summary
I have posted some pictures and videos of the trip. Here is a summary:
June 26th:
My desktop stopped working right as I was about to start packing. It is definitely a hardware problem but I am not sure which components are broken. I can't boot into my normal operating systems and I can sometimes boot into Linux live CDs. Running fsck detects errors in the file system but crashes when attempting to fix the problems. Running a memtest succeeds. It is more than just a hard disk failure since there are also problems reading from CDs and using the network card. Given that so many problems occurred simultaneously, it is most likely a problem with the motherboard or power supply :'(
June 27th:
There were a total of seven Thunderbots team members leaving from Vancouver. We were meeting another two members in Frankfurt and the tenth member in Graz. We left for Frankfurt in the evening. The plane ride was kind of boring since everyone went to sleep and the seats did not have personal screens. My ticket to Frankfurt was extremely cheap; $350 including tax. There was a crazy guy sitting across the aisle from me who was acting really weird. He spent almost the entire flight constantly staring at me. Since I was sitting further back than him, he was sitting completely sideways in his seat with his head always turned towards me. He would also mumble very random sentences occasionally.
June 28th:
After flying to Frankfurt we rented three cars and drove to Graz. We used walkie-talkies to communicate during the drive. Immediately after leaving the airport we managed to lose each other and get out of walkie-talkie range. We eventually found each other again with some luck in a small village. After driving all night on the Autobahn we arrived in Graz early the next morning.
June 29th:
In Graz we stayed at a really nice guest house. The first floor of the house was for the owner's family but the second and third floors were entirely for us. The house was next to a forested area and had a nice view. After the sun came up a few of us decided to take a small hike in the forest. Later in the morning we all headed to the RoboCup contest site. There were two huge halls dedicated to the different RoboCup leagues. The halls were filled with a huge variety of robots. Definitely the place to be for robot enthusiasts. We immediately got to work getting set up for the contest. We brought a desktop computer to hook up to our cameras and run the AI. When we plugged the desktop into a transformer it made a loud bang and started smoking. Without a computer there was no way we could compete in the contest. We couldn't use our laptops because they didn't have the right firewire ports to plug in the cameras. We don't know why the computer exploded when we plugged it in since we used the transformer correctly. This was definitely the low point of the trip. Not only were we all completely exhausted from a lack of sleep but it seemed like we might not even get to compete after working so hard the last couple of months. Our first match was scheduled in two days.
June 30th:
We attempted to fix the desktop by replacing a variety of components (including the power supply, motherboard, CPU and memory). We got the computer booting but it would randomly shutdown after being run for a while. We had no idea why it kept shutting down (its possible that the new power supply we purchased was faulty). Before coming to Austria the greatest number of robots we ever had working at a single time was three. Since teams typically have five robots you can imagine that the AI was lacking proper testing. We brought a total of seven robots but at least one did not work at all and we only had four working gyros (a component that is important for robot movement).
July 1st:
We decided to compete in the first match even though it was likely that the desktop would shut down, instantly turning all our robots into bricks. The game was absolute chaos but surprisingly the computer managed to remain powered on throughout the game. There were a variety of problems in our first match. One problem with the AI was that our robots repeatedly went close to the ball when it was against the rules (when the opposing team had a free kick). This resulted in four of our robots getting yellow cards. When a robot gets a yellow card it is removed from the field for a few minutes. It was just our goalie versus five enemy robots. Luckily the opposing team also seemed to be having some problems and they only managed to score one goal. When the yellow carded robots were put back into play they had some mechanical problems. The referee made us take one of the robots out since it started smoking. Occasionally our robots would randomly start going crazy and spinning at ridiculously fast speeds. We actually had a few really good opportunities to score. If this wasn't our first match I think we could have beaten the opposing team. Throughout the game we were all screaming at each other to fix various problems, so we also had some communication problems. Whenever we lifted a robot off the field its wheels would start spinning up to max speed, making a lot of noise and making handling the robot difficult. One of our team members' hand was bleeding after the match. It must have been quite entertaining for anyone watching the game ^_^
July 2nd:
Our second match was much less chaotic. Once again the computer managed to stay on throughout the match. The team we were playing against was much better than us though, so we lost 10 to 0. During the day we purchased some laptop components which allowed us to plug our two cameras into two laptops. The laptops shared data over a network and one of the laptops ran the AI. We knew that the desktop would not suffice for future matches. That afternoon we had our third match. This match we were clearly better than the opposing team. Some of their robots appeared to move around almost completely randomly. Despite this fact we didn't make a single goal in the first half. Part of the problem is that the AI would sometimes assign an important task (such as chasing/shooting the ball) to a robot which was not capable of moving correctly (perhaps due to a lack of gyro, low batteries, or some other mechanical problem). During half time I decided to switch to a new strategy. Instead of playing with a partially functional team of five robots, I thought it would be better to play with two robots which we knew worked well. One robot would be the goalie and the other robot would be in charge of shooting goals. This strategy seemed to work well and we scored three goals in the second half. Here is a video of one of our goals. Given how hard everyone had been working up to this point, winning a game was a great experience. After the game we finally had a chance to relax and visit a cool mountain castle in Graz.
July 3rd:
I left Graz on a train at six in the morning. I really enjoyed the train ride since there was some beautiful scenery between Graz and Munich. Half way through I had to switch trains. The amount of time I had to switch trains was originally supposed to be five minutes. However, since the train was running seven minutes behind schedule I was forced to switch trains in negative two minutes. That evening I flew from Munich to Cairo.
July 4th:
The robotics & algorithm competition started in the morning. The contest was to program the AI for simulated sumo robots. We could also get one bonus point for programming a "dance" for a physical robot and three bonus points for programming the robot to do some sort of image processing task in addition to the dance. We got 24 hours to do the coding. I finished programming most of the AI within the first couple of hours. The only changes I made after that were tweaking parameters. In order to tweak the parameters I ran a huge number of simulated matches. Since the matches run in real-time, it took many hours to run enough games in order properly test if one set of parameters was superior to another. While I was waiting for the simulated matches to run I programmed the physical robot in order to get the bonus points. I got the robot to recognize different colored pieces of paper to perform six different types of movement. Two of us got three bonus points and the other four competitors got one bonus point. I eventually tuned the AI's parameters to a point where I couldn't see any way to improve it further. My robot could fairly consistently defeat the sample AI that was provided. Since the contest still had about eight hours left, I decided to get some sleep in my hotel room. At least three of the competitors worked the full 24 hours.
July 5th:
After the round-robin contest I had the highest number of points. Watching the matches was pretty fun. Here is a video of the final game. I got to keep one of the robots as a prize!
July 6th:
Microsoft organized a tour of the pyramids during the day. Immediately after leaving the bus one of the locals approached me insisting to take my picture (using my camera) in front of the pyramids. I reluctantly agreed. He also put a scarf on my head. Next he insisted that he take my picture while I was on top of a camel. At this point I was getting irritated by him so I refused (instead he took a picture of me next to the camel). When I tried to get my camera back he started demanding money from me for taking the pictures. I offered a bit of change and he refused and demanded bigger currency. At this point I just wrestled the camera out of his hand. He continued pestering me for money until eventually one of the Microsoft staff came over when he noticed the situation. After that I was more cautious around the locals. Merchants kept trying shove "free" products into my hands and offering to take pictures. One amusing thing I noticed is that whenever someone asked where I was from and I said "Canada", 100% of them immediately responded "Canada Dry". In confusion I later looked it up online and realized that they were referring to the drink (which is apparently very popular in Egypt). I was impressed by the pyramids but the greed of the merchants there was annoying.
July 7th:
During the day some of the teams in different Imagine Cup categories presented their projects. In the evening was the award ceremony. Microsoft set up a cool stage in the middle of the desert for the awards. It had a great view of the pyramids. The award ceremony went much longer than I was expecting so I almost missed my flight out of Cairo. I got to the airport less than an hour before my flight left. The check-in counter had already closed but they eventually agreed to let me board the plane.
June 26th:
My desktop stopped working right as I was about to start packing. It is definitely a hardware problem but I am not sure which components are broken. I can't boot into my normal operating systems and I can sometimes boot into Linux live CDs. Running fsck detects errors in the file system but crashes when attempting to fix the problems. Running a memtest succeeds. It is more than just a hard disk failure since there are also problems reading from CDs and using the network card. Given that so many problems occurred simultaneously, it is most likely a problem with the motherboard or power supply :'(
June 27th:
There were a total of seven Thunderbots team members leaving from Vancouver. We were meeting another two members in Frankfurt and the tenth member in Graz. We left for Frankfurt in the evening. The plane ride was kind of boring since everyone went to sleep and the seats did not have personal screens. My ticket to Frankfurt was extremely cheap; $350 including tax. There was a crazy guy sitting across the aisle from me who was acting really weird. He spent almost the entire flight constantly staring at me. Since I was sitting further back than him, he was sitting completely sideways in his seat with his head always turned towards me. He would also mumble very random sentences occasionally.
June 28th:
After flying to Frankfurt we rented three cars and drove to Graz. We used walkie-talkies to communicate during the drive. Immediately after leaving the airport we managed to lose each other and get out of walkie-talkie range. We eventually found each other again with some luck in a small village. After driving all night on the Autobahn we arrived in Graz early the next morning.
June 29th:
In Graz we stayed at a really nice guest house. The first floor of the house was for the owner's family but the second and third floors were entirely for us. The house was next to a forested area and had a nice view. After the sun came up a few of us decided to take a small hike in the forest. Later in the morning we all headed to the RoboCup contest site. There were two huge halls dedicated to the different RoboCup leagues. The halls were filled with a huge variety of robots. Definitely the place to be for robot enthusiasts. We immediately got to work getting set up for the contest. We brought a desktop computer to hook up to our cameras and run the AI. When we plugged the desktop into a transformer it made a loud bang and started smoking. Without a computer there was no way we could compete in the contest. We couldn't use our laptops because they didn't have the right firewire ports to plug in the cameras. We don't know why the computer exploded when we plugged it in since we used the transformer correctly. This was definitely the low point of the trip. Not only were we all completely exhausted from a lack of sleep but it seemed like we might not even get to compete after working so hard the last couple of months. Our first match was scheduled in two days.
June 30th:
We attempted to fix the desktop by replacing a variety of components (including the power supply, motherboard, CPU and memory). We got the computer booting but it would randomly shutdown after being run for a while. We had no idea why it kept shutting down (its possible that the new power supply we purchased was faulty). Before coming to Austria the greatest number of robots we ever had working at a single time was three. Since teams typically have five robots you can imagine that the AI was lacking proper testing. We brought a total of seven robots but at least one did not work at all and we only had four working gyros (a component that is important for robot movement).
July 1st:
We decided to compete in the first match even though it was likely that the desktop would shut down, instantly turning all our robots into bricks. The game was absolute chaos but surprisingly the computer managed to remain powered on throughout the game. There were a variety of problems in our first match. One problem with the AI was that our robots repeatedly went close to the ball when it was against the rules (when the opposing team had a free kick). This resulted in four of our robots getting yellow cards. When a robot gets a yellow card it is removed from the field for a few minutes. It was just our goalie versus five enemy robots. Luckily the opposing team also seemed to be having some problems and they only managed to score one goal. When the yellow carded robots were put back into play they had some mechanical problems. The referee made us take one of the robots out since it started smoking. Occasionally our robots would randomly start going crazy and spinning at ridiculously fast speeds. We actually had a few really good opportunities to score. If this wasn't our first match I think we could have beaten the opposing team. Throughout the game we were all screaming at each other to fix various problems, so we also had some communication problems. Whenever we lifted a robot off the field its wheels would start spinning up to max speed, making a lot of noise and making handling the robot difficult. One of our team members' hand was bleeding after the match. It must have been quite entertaining for anyone watching the game ^_^
July 2nd:
Our second match was much less chaotic. Once again the computer managed to stay on throughout the match. The team we were playing against was much better than us though, so we lost 10 to 0. During the day we purchased some laptop components which allowed us to plug our two cameras into two laptops. The laptops shared data over a network and one of the laptops ran the AI. We knew that the desktop would not suffice for future matches. That afternoon we had our third match. This match we were clearly better than the opposing team. Some of their robots appeared to move around almost completely randomly. Despite this fact we didn't make a single goal in the first half. Part of the problem is that the AI would sometimes assign an important task (such as chasing/shooting the ball) to a robot which was not capable of moving correctly (perhaps due to a lack of gyro, low batteries, or some other mechanical problem). During half time I decided to switch to a new strategy. Instead of playing with a partially functional team of five robots, I thought it would be better to play with two robots which we knew worked well. One robot would be the goalie and the other robot would be in charge of shooting goals. This strategy seemed to work well and we scored three goals in the second half. Here is a video of one of our goals. Given how hard everyone had been working up to this point, winning a game was a great experience. After the game we finally had a chance to relax and visit a cool mountain castle in Graz.
July 3rd:
I left Graz on a train at six in the morning. I really enjoyed the train ride since there was some beautiful scenery between Graz and Munich. Half way through I had to switch trains. The amount of time I had to switch trains was originally supposed to be five minutes. However, since the train was running seven minutes behind schedule I was forced to switch trains in negative two minutes. That evening I flew from Munich to Cairo.
July 4th:
The robotics & algorithm competition started in the morning. The contest was to program the AI for simulated sumo robots. We could also get one bonus point for programming a "dance" for a physical robot and three bonus points for programming the robot to do some sort of image processing task in addition to the dance. We got 24 hours to do the coding. I finished programming most of the AI within the first couple of hours. The only changes I made after that were tweaking parameters. In order to tweak the parameters I ran a huge number of simulated matches. Since the matches run in real-time, it took many hours to run enough games in order properly test if one set of parameters was superior to another. While I was waiting for the simulated matches to run I programmed the physical robot in order to get the bonus points. I got the robot to recognize different colored pieces of paper to perform six different types of movement. Two of us got three bonus points and the other four competitors got one bonus point. I eventually tuned the AI's parameters to a point where I couldn't see any way to improve it further. My robot could fairly consistently defeat the sample AI that was provided. Since the contest still had about eight hours left, I decided to get some sleep in my hotel room. At least three of the competitors worked the full 24 hours.
July 5th:
After the round-robin contest I had the highest number of points. Watching the matches was pretty fun. Here is a video of the final game. I got to keep one of the robots as a prize!
July 6th:
Microsoft organized a tour of the pyramids during the day. Immediately after leaving the bus one of the locals approached me insisting to take my picture (using my camera) in front of the pyramids. I reluctantly agreed. He also put a scarf on my head. Next he insisted that he take my picture while I was on top of a camel. At this point I was getting irritated by him so I refused (instead he took a picture of me next to the camel). When I tried to get my camera back he started demanding money from me for taking the pictures. I offered a bit of change and he refused and demanded bigger currency. At this point I just wrestled the camera out of his hand. He continued pestering me for money until eventually one of the Microsoft staff came over when he noticed the situation. After that I was more cautious around the locals. Merchants kept trying shove "free" products into my hands and offering to take pictures. One amusing thing I noticed is that whenever someone asked where I was from and I said "Canada", 100% of them immediately responded "Canada Dry". In confusion I later looked it up online and realized that they were referring to the drink (which is apparently very popular in Egypt). I was impressed by the pyramids but the greed of the merchants there was annoying.
July 7th:
During the day some of the teams in different Imagine Cup categories presented their projects. In the evening was the award ceremony. Microsoft set up a cool stage in the middle of the desert for the awards. It had a great view of the pyramids. The award ceremony went much longer than I was expecting so I almost missed my flight out of Cairo. I got to the airport less than an hour before my flight left. The check-in counter had already closed but they eventually agreed to let me board the plane.
Sunday, July 05, 2009
Results
Our RoboCup team won one out of five games. We won with a score of three to zero against RoboPets. The results are posted here.
I came in second place in the Imagine Cup Robotics & Algorithm competition. We had a round-robin competition to determine which two players would compete in the final match. I had the highest score in the round-robin contest but I lost the final round.
I came in second place in the Imagine Cup Robotics & Algorithm competition. We had a round-robin competition to determine which two players would compete in the final match. I had the highest score in the round-robin contest but I lost the final round.
Wednesday, June 24, 2009
RoboCup Press Releases
There was a clip about our RoboCup team on CBC news:
There is also a video on the Vancouver Sun website, an article on the UBC Engineering website, and a couple of articles in the local newspapers.
There is also a video on the Vancouver Sun website, an article on the UBC Engineering website, and a couple of articles in the local newspapers.
Saturday, June 13, 2009
Friday, June 12, 2009
Press Release
Here is an article about the BattleCode tournament results posted on the UBC CS website.
Wednesday, June 10, 2009
Planes, Trains & Automobiles
I have finalized my travel plans for later this month. I will be competing in both RoboCup and ImagineCup. Our RoboCup team "Thunderbots" is competing in the small size league. Ten of our team members will be attending the competition. On the 27th we will fly into Frankfurt, Germany and rent cars to drive to Graz, Austria. On the 3rd I will have to leave the RoboCup contest early in order to attend ImagineCup. I will take a train to Munich, Germany and fly to Cairo. On the 8th I will fly back to Vancouver through Paris.
For RoboCup we will be competing against some incredibly good teams, so I am skeptical how well we will do. Last year I was working on the AI for the team. Earlier this month we finally got a robot that can move so that I can begin testing the AI. Without actual robots it is pretty difficult to implement the AI since almost everything depends on their mechanical capabilities. I am really impressed by the final robot design the engineers created. It is capable of moving around the field at ridiculously fast speeds. The only potential flaw with the design is the fact that the robot's dribbler easily loses control of the ball whenever it changes direction. Unfortunately I predict that the AI will be our team's weak point. Not that I think that there is anything fundamentally wrong with the AI's design but in order to be effective it really needs more testing with physical robots. As of today we have two working robots. I will start working on RoboCup everyday until the finals to help improve the AI.
The finals for ImagineCup will be a robot sumo wrestling contest. This will probably be similar to the setup for round 1 of the contest except this time we will be working with physical robots instead of a simulation. We will get a total of 24 hours to code the AI.
For RoboCup we will be competing against some incredibly good teams, so I am skeptical how well we will do. Last year I was working on the AI for the team. Earlier this month we finally got a robot that can move so that I can begin testing the AI. Without actual robots it is pretty difficult to implement the AI since almost everything depends on their mechanical capabilities. I am really impressed by the final robot design the engineers created. It is capable of moving around the field at ridiculously fast speeds. The only potential flaw with the design is the fact that the robot's dribbler easily loses control of the ball whenever it changes direction. Unfortunately I predict that the AI will be our team's weak point. Not that I think that there is anything fundamentally wrong with the AI's design but in order to be effective it really needs more testing with physical robots. As of today we have two working robots. I will start working on RoboCup everyday until the finals to help improve the AI.
The finals for ImagineCup will be a robot sumo wrestling contest. This will probably be similar to the setup for round 1 of the contest except this time we will be working with physical robots instead of a simulation. We will get a total of 24 hours to code the AI.
Monday, June 08, 2009
Wolfram|Alpha Fail
I was playing with the sequence continuation feature in Wolfram|Alpha because of its similarity to my pattern recognition tool. Surprisingly, one of the sequences I entered consistently causes Wolfram|Alpha to throw an error message:
"I'm sorry Dave, I'm afraid I can't do that..."
Wolfram|Alpha has temporarily exceeded its current maximum load. Please try again soon.
The sequence which causes this is 0,1,1,0,1,...
Other variations of the sequence do not throw an error:
0,1,1,0,1,1,...
1,1,0,1,1,...
1,0,1,1,0,1,...
I tried doing some Googling to see if any other queries have been found which consistently throw an error, but didn't find any. It would be neat if I am the first one to find such a query. I wonder if every time I submit that query I am actually crashing one of their servers...
"I'm sorry Dave, I'm afraid I can't do that..."Wolfram|Alpha has temporarily exceeded its current maximum load. Please try again soon.
The sequence which causes this is 0,1,1,0,1,...
Other variations of the sequence do not throw an error:
0,1,1,0,1,1,...
1,1,0,1,1,...
1,0,1,1,0,1,...
I tried doing some Googling to see if any other queries have been found which consistently throw an error, but didn't find any. It would be neat if I am the first one to find such a query. I wonder if every time I submit that query I am actually crashing one of their servers...
Thursday, June 04, 2009
Wednesday, June 03, 2009
Cairo
I am a finalist for the Robotics & Algorithm category of Imagine Cup! I will be going to Cairo. I am going to check with Imagine Cup whether the tickets they buy have to be roundtrip. If not, that will enable me to attend RoboCup in Austria as well. The contest dates overlap, so if I am attending both I will need to leave RoboCup early.
Tuesday, May 19, 2009
Update
See previous post.
- Imagine Cup: I submitted my entry and got a perfect score. Whether or not I get to go to Cairo now depends on how they break ties. Since it wasn't difficult to get a perfect score there will probably be many people competing for the top six positions.
- AIspace video: Video is finished! We are competing in the one minute category.
- Temporal neural networks: New version released at http://byronknoll.com/pattern.html. I haven't set up the database to collect pattern data yet. The neural network is initialized randomly when it loads.
- I migrated my webpage from Google Pages to UBC CS hosting and bought a domain name from Go Daddy.
Tuesday, May 05, 2009
Hotmail/Gmail/Google Pages
After having used Hotmail for the last several years, I am finally trying to switch to Gmail. I found this useful guide that shows how Gmail can automatically import all old emails from Hotmail and forward incoming messages. I started the process over a day ago but the import process is only about half finished (apparently it takes a long time to import ~10,000 emails).
Google Pages is shutting down. Their new web hosting service is called Google Sites. Google Pages has been a perfect host for my webpage, so I am pretty upset that they are stopping the service. Google Sites definitely does not have the features needed for my webpage. Can anyone recommend a new (preferably free) hosting service I can use?
Google Pages is shutting down. Their new web hosting service is called Google Sites. Google Pages has been a perfect host for my webpage, so I am pretty upset that they are stopping the service. Google Sites definitely does not have the features needed for my webpage. Can anyone recommend a new (preferably free) hosting service I can use?
Summer Projects
- RoboCup: Our team somehow managed to qualify in the small size league for RoboCup 2009. I have been working on the AI. We still have a ton of work to do before we are ready for the contest. Hopefully I will get to go to Austria for the event.
- Imagine Cup: I am in round two of the robotics and algorithm contest. There are over 200 people in round two and only six people advance to round three. The first round was a sumo simulation. The second round is a mars rover simulation. I can get a perfect score in the second round. Since I'm sure over six people will get a perfect score, the tie breaker for the top six spots is "Functional Completeness and Complexity" (bleh). If I make it to round three, I get a free trip to Cairo.
- Netflix prize: Now that I have actually taken a machine learning course, I have a few new ideas to try out. I think I will continue trying to use neural networks, mostly because I feel like I can't compete with the algorithms that the top contestants use.
- AIspace video: I am working on a short video of AIspace for the AAAI video competition.
- The Bootstrapped Learning Cup: an AI contest taking place later this summer.
- Physics based puzzle game: see previous posts.
- Temporal neural networks: I have made a new version of my pattern recognition program. The new version can predict patterns of arbitrary lengths (not constrained by the number of memory layers). I will post the new version on my website when I have some free time. I might also put a database on my computer that automatically collects data from the applet. This would allow the neural network to learn from patterns from all previous users. I got a network to successfully count from 0 to 100 in binary based entirely on pattern recognition (input: 011011100101110111100010011010...)
Saturday, May 02, 2009
Theft Attempt #2
Once again somebody tried to steal my bike. This time the theft attempt completely mangled the bike lock so that it was impossible to open. I managed to convince housing that it was my bike and they opened it with a motorized saw.



Lock #1

Lock #2
Sunday, April 26, 2009
Puzzle Games
Since my post about physics-based puzzle games, I have played a few other puzzle games which deserve mention. Right as exam period was starting I decided to buy a new PS3 game (which seemed like a good idea at the time). It is a physics-based puzzle platformer called LittleBigPlanet. The gameplay itself isn't revolutionary, but I found the multiplayer mode and online user-generated content to be extremely fun. The game has a level creator so anyone can publish their own content. I designed a puzzle which I consider to be fairly challenging. It involves constructing a staircase to get over a wall. There are a few tricks to constructing the staircase such as how to move/rotate blocks and how to make the staircase stable. So far only six people have played the level and only one person has solved it (me). It has a rating of 2 out of 5 :(.
Yesterday I got an amazing game called Braid. The puzzles in this game are brilliant. They are based on controlling the flow of time. I had a hard time following the story though, and the ending didn't make any sense to me. I think it was intentionally ambiguous.
Two other puzzle games I played recently I downloaded from the PlayStation Store on my PS3. The first is called Echochrome. It is based on the artwork of M. C. Escher and involves tricks of perspective. The second is a game called Flower. You control the movement of flower petals by tilting the PS3 controller to change the direction of the wind. The graphics in the game are beautiful.
All four of these games have incredible music that really enhance the gameplay experience. In general I am usually disappointed with the quality of music in video games. Two series in which the music made a lasting impression on me are Final Fantasy and Myst.
I am still planning on making my own puzzle game this summer. I have been keeping track of what aspects of the various puzzle games I have been playing work well. I will post updates on the game's development on this blog.
This semester I only have four exams (which is the fewest I have ever had). I think my first three exams went really well. My last exam is on Monday.
Yesterday I got an amazing game called Braid. The puzzles in this game are brilliant. They are based on controlling the flow of time. I had a hard time following the story though, and the ending didn't make any sense to me. I think it was intentionally ambiguous.
Two other puzzle games I played recently I downloaded from the PlayStation Store on my PS3. The first is called Echochrome. It is based on the artwork of M. C. Escher and involves tricks of perspective. The second is a game called Flower. You control the movement of flower petals by tilting the PS3 controller to change the direction of the wind. The graphics in the game are beautiful.
All four of these games have incredible music that really enhance the gameplay experience. In general I am usually disappointed with the quality of music in video games. Two series in which the music made a lasting impression on me are Final Fantasy and Myst.
I am still planning on making my own puzzle game this summer. I have been keeping track of what aspects of the various puzzle games I have been playing work well. I will post updates on the game's development on this blog.
This semester I only have four exams (which is the fewest I have ever had). I think my first three exams went really well. My last exam is on Monday.
Wednesday, April 22, 2009
GTA
After I got back from an exam this morning I got a call from the residence front desk informing me that somebody broke into my jeep. Luckily there wasn't anything valuable inside. On the driver side door there are large dents near the locking mechanism. Apparently the thief couldn't get in through this door, so went to the passenger side door and completely removed the locking mechanism. I'm glad that the entire jeep wasn't stolen. The battery is dead, so any attempt at hotwiring would have failed. The damage should be completely covered by insurance. The theft attempt might have been due to the boxes I keep in the back of my jeep. Although they are empty, I'm sure the thief was motivated by the hope of getting computer+monitor+PS3+printer. In the future I will be more cautious on where I put empty boxes.
Tuesday, April 21, 2009
ACM World Finals
Tuesday, April 14, 2009
Grad School
I have finally decided where I will be going for grad school. I will be staying at UBC for my master's degree. I was accepted at four out of the nine places I applied. I was hoping to be able to try a new university for my master's degree, but UBC is one of the best out of the places I have been accepted for AI/machine learning. My first choice in Canada was Toronto, but unfortunately I got rejected there. Hopefully during my master's degree I will be able to strengthen my application so that I can get accepted into a good school in the US for my PhD.
The entire process of applying to grad school took a lot of time (and money). It involved taking the GRE, researching schools, applying for scholarships, getting references, etc. The process should be much easier when I apply for my PhD two years from now since I have already done the majority of the work. The application process was cheaper than I was expecting because luckily I didn't have to pay any application fee for Alberta (scholarship) and Berkeley (unknown reason). For my PhD applications I'll probably apply to fewer universities to reduce the time/cost requirement.
The entire process of applying to grad school took a lot of time (and money). It involved taking the GRE, researching schools, applying for scholarships, getting references, etc. The process should be much easier when I apply for my PhD two years from now since I have already done the majority of the work. The application process was cheaper than I was expecting because luckily I didn't have to pay any application fee for Alberta (scholarship) and Berkeley (unknown reason). For my PhD applications I'll probably apply to fewer universities to reduce the time/cost requirement.
Monday, April 13, 2009
BattleCode Tournament Results
A few minutes ago the results from the BattleCode Open Tournament were released:
Top Teams
* 1st place: I for one welcome our new Team 207 overlords
* 2nd place: We'll do it live
* 3rd place: gtg ice skating lessons
* 4th place: My other language is english
* 5th place: Little
* 6th place: JIT In My Pants
* 7th place: When you wish upon Astar
* 8th place: Yellow Submarine
Non-MIT Teams
* 1st place: Bad Meme
* 2nd place: KeepItSimple
* 3rd place: Villanova
Notable Non-MIT Universities
* 1st place: University of British Columbia
* 2nd place: Villanova
* 3rd place: University of North Carolina (Wilmington)
I was a member of KeepItSimple. As expected, MIT teams completely dominated the contest. Bad Meme and KeepItSimple are both UBC teams, so I am proud that UBC is the next best university. I know that our team could have done much better if we had more time to work on it. I am planning on competing again next year, so hopefully next time we can challenge some of the top MIT teams!
Top Teams
* 1st place: I for one welcome our new Team 207 overlords
* 2nd place: We'll do it live
* 3rd place: gtg ice skating lessons
* 4th place: My other language is english
* 5th place: Little
* 6th place: JIT In My Pants
* 7th place: When you wish upon Astar
* 8th place: Yellow Submarine
Non-MIT Teams
* 1st place: Bad Meme
* 2nd place: KeepItSimple
* 3rd place: Villanova
Notable Non-MIT Universities
* 1st place: University of British Columbia
* 2nd place: Villanova
* 3rd place: University of North Carolina (Wilmington)
I was a member of KeepItSimple. As expected, MIT teams completely dominated the contest. Bad Meme and KeepItSimple are both UBC teams, so I am proud that UBC is the next best university. I know that our team could have done much better if we had more time to work on it. I am planning on competing again next year, so hopefully next time we can challenge some of the top MIT teams!
Wednesday, April 08, 2009
Physics Puzzle Games
For the last couple of weeks I have been obsessed with physics-based puzzle games. Physics simulators allow the creation of complex puzzles which can involve the interaction of many simple components. There are often a variety of ways to solve a given puzzle. I have tried out a large number of games in this genre (both good and bad). Some of my favorites include:
- Crayon Physics
- Zany Doodle
- Gish
- Armadillo Run
- Fantastic Contraption
- World of Goo
- Switchball
Another great thing about this genre is that it doesn't require a large development team to make a successful game. Most of the games that I listed above were made by a single developer. I have decided that this summer I will try making my own physics-based puzzle game. There are already a variety of open source projects I can use to help development. For the physics engine, I can use Box2D or Chipmunk. For the graphics I can use OpenGL or Cairo. The game will use 2D vector graphics. One idea that I had for the gameplay is the creation of elaborate deathtraps to kill superheroes. "Deathtrap" seems like an appropriate title for the game. I plan on making it open source.
- Crayon Physics
- Zany Doodle
- Gish
- Armadillo Run
- Fantastic Contraption
- World of Goo
- Switchball
Another great thing about this genre is that it doesn't require a large development team to make a successful game. Most of the games that I listed above were made by a single developer. I have decided that this summer I will try making my own physics-based puzzle game. There are already a variety of open source projects I can use to help development. For the physics engine, I can use Box2D or Chipmunk. For the graphics I can use OpenGL or Cairo. The game will use 2D vector graphics. One idea that I had for the gameplay is the creation of elaborate deathtraps to kill superheroes. "Deathtrap" seems like an appropriate title for the game. I plan on making it open source.
Thursday, April 02, 2009
Storm the Wall
UBC has an intramural sports event called "Storm the Wall". It is a five person team relay which includes a swim, sprint, cycle, and run. At the end of the event the entire team climbs over a 12 foot wall. I joined a team of Computer Science students doing the event. I did the cycling portion of the race. Due to a mistake in our team registration, we competed in the "CoRec" category which requires two females in order to compete. On Tuesday we had our first race and came in fourth with a time of 17:16. Despite the fact that we competed with five males, nobody disqualified us and we advanced to the semi-finals. Today we finished the race in third place with a time of 16:36. In today's race we had one female, but this time they noticed and we were disqualified.
Tuesday, March 17, 2009
PS3 Audio
Today I finally figured out a way to improve the audio output of my PS3. I have been struggling since January trying to accomplish the simple task of listening to PS3 audio on my headphones. The problem comes in trying to convert the RCA stereo signal into TRS for my headphones. The local dollar store has a great selection of cheap (about three to four dollars) audio connectors and converters. Its a good thing these components are cheap because I have encountered basically every combination of audio problems imaginable. The most common problem is that I can only get a single channel of audio output in the left channel of my headphones. With some additional components, I can convert the stereo signal into a mono signal, so that both channels play in only the left channel of my headphones. For the last two months I have been using the mic and headphone jack of my computer to convert the mono signal so that it plays on both channels of my headphones. The problem with this solution is that the conversion process results in a large reduction in sound quality. Surprisingly, in Windows the sound quality is noticeably better than in Linux.
My new solution bypasses the need for a computer. I'll explain my setup in case anyone else has this problem. I first convert the two RCA channels into a single TRS stereo connection using a 2 female RCA to 1 male TRS converter. The real trick comes here: using a normal female TRS to female TRS connector to plug in my headphones does not work since this results in audio only in the left channel of my headphones. Instead, I am using a 2 female TRS to 1 male TRS connector, except leaving the male TRS unconnected. Perhaps using cheap components has been the cause of all the problems I have been having, but I am thrilled to finally have high quality stereo audio.
In other news, this summer I will be working in a bioinformatics research lab on campus. It is called the Tria Project and studies mountain pine beetles. Should be fun!
My new solution bypasses the need for a computer. I'll explain my setup in case anyone else has this problem. I first convert the two RCA channels into a single TRS stereo connection using a 2 female RCA to 1 male TRS converter. The real trick comes here: using a normal female TRS to female TRS connector to plug in my headphones does not work since this results in audio only in the left channel of my headphones. Instead, I am using a 2 female TRS to 1 male TRS connector, except leaving the male TRS unconnected. Perhaps using cheap components has been the cause of all the problems I have been having, but I am thrilled to finally have high quality stereo audio.
In other news, this summer I will be working in a bioinformatics research lab on campus. It is called the Tria Project and studies mountain pine beetles. Should be fun!
Sunday, March 01, 2009
Thursday, February 19, 2009
Erdős Number
Thanks to Jackie for pointing out that I have an Erdős number of at most four:
Byron Knoll -> David Poole -> Kellogg Booth -> Maria Klawe -> Paul Erdős
Byron Knoll -> David Poole -> Kellogg Booth -> Maria Klawe -> Paul Erdős
Monday, February 16, 2009
Robotics
I was at an interesting presentation today by Andrew Ng about the STanford Artificial Intelligence Robot (STAIR) project. STAIR is a robot which integrates many fields of AI in an attempt to accomplish tasks which require a broad range of skills and intelligence. It is currently capable of fetching items in an office environment based on spoken commands. Although this may sound like a simple task, it requires integration of recent advancements in fields such as computer vision/object recognition, machine learning, planning, speech recognition, etc. The robot needs to be able to understand speech commands, navigate through offices, open doors, recognize objects, and pick up objects, none of which are easy to accomplish for an AI. One of the themes of the talk was that we are on the threshold of robots being capable of accomplishing tasks which may actually be useful for the average person. We were shown a video of a robot (teleoperated by a human) performing tasks such as unloading a dishwasher, vacuuming and cleaning a room. Robots are mechanically capable of performing useful tasks. All that remains is making them automated.
Andrew emphasized that in order to make progress in robotics we need to focus on lower level tasks in order to make robots less specialized for a single domain. While I definitely agree with this, he was referring to lower level tasks such as recognizing/grabbing objects and navigating. I think even these are still at a level much higher than what we should be focusing on. For example, take the task of trying to get depth information from a monocular image (see: http://make3d.stanford.edu). Understanding the 3-dimensional structure of the world is important for robots. Humans can use a variety of cues in order to get this information such as texture, color, haze, defocus, etc. In theory, all of these cues could be entirely learned from patterns in visual experience. Instead of manually implementing these cues, robots should be learning about the world themselves. Predicting and recognizing patterns in data is a fundamental task which can be applied to any AI problem. If we could design an AI which is capable of performing this one task well, all of the other higher level problems will be solved.
Andrew emphasized that in order to make progress in robotics we need to focus on lower level tasks in order to make robots less specialized for a single domain. While I definitely agree with this, he was referring to lower level tasks such as recognizing/grabbing objects and navigating. I think even these are still at a level much higher than what we should be focusing on. For example, take the task of trying to get depth information from a monocular image (see: http://make3d.stanford.edu). Understanding the 3-dimensional structure of the world is important for robots. Humans can use a variety of cues in order to get this information such as texture, color, haze, defocus, etc. In theory, all of these cues could be entirely learned from patterns in visual experience. Instead of manually implementing these cues, robots should be learning about the world themselves. Predicting and recognizing patterns in data is a fundamental task which can be applied to any AI problem. If we could design an AI which is capable of performing this one task well, all of the other higher level problems will be solved.
Robot Sumo
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.
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.
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.
Subscribe to:
Posts (Atom)
















