Tuesday, May 19, 2009

Wolfram|Alpha

Wolfram|Alpha is awesome.

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?

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

Daily Life

[link]

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.

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

The results for the ACM-ICPC contest have just been released. UBC came in 34th, solving four problems. MIT did the best out of North America, coming in 7th (solving seven problems). Waterloo did really well, coming in 10th. Last year UBC came in 30th.

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.

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!

Wednesday, April 08, 2009

Math Teacher

[link]

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.

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!

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

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.

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.

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.