The Vector Chrono Travel AI Interface (only for Android)

This is part 3 of a 10-part series.

Now that I’ve described the plot of my stack, I’ll start explaining the details of the physical components that the people on the stack experienced on the day of. The first component I’ll describe is the Android application that the stackees used to receive clues and information during the day.

While eating a nice breakfast at the Athenaeum, the frosh received a tablet computer from the ’employees’ representing the Vector Corporation. Upon booting the device, the frosh were greeted with a screen that looked more or less like this:


The AI Interface

The best part about the tablet computer we used? It cost $55. It’s certainly no impressive piece of hardware, but I love that we live in a world where I can buy a portable computing device that I can program for so cheap. Furthermore, as prices drop, I expect to see more of these on stacks, which can open the way to some pretty exciting demonstrations.

On the screen, the frosh could see a list of messages (which there was only one of at first) from the Vector Corporation and the AI itself, their current space-time coordinate, the current lab time (which was the same as their space-time coordinate at that time, since they hadn’t time traveled yet), the current “encryption key”, and a button that allowed them to send a “coded transmission” to Vector Corporation.

The messages served as clues and hints, telling the frosh where to go during the day. The clocks told them both the current time and what times they had jumped to. The coded transmissions were where the frosh put in passwords and other such things that they got from their puzzles so that they could receive the next clue and move on. Finally, the encryption key was mostly flavor text, although I did set up the app to send them a message mocking them should they try to send it as a coded transmission. I wasn’t sure they would try it, but it was actually one of the first things they did. I was so pleased when I saw that they had done that.

What the frosh couldn’t see is that the app was also keeping track of all of the passwords they entered and all of the messages they had ‘unlocked’ and storing it in a text file that I could check on the Caltech undergraduate-run computer cluster (the UGCS servers, for those of you who know what that is). Furthermore, the line in the screenshot above that reads “Information about the current mission will be displayed here when necessary” was a line that I could arbitrarily change remotely. It was very useful to have these features so that we could know how far our stackees had gotten on the day of. It also proved useful early on, when they entered the very first password incorrectly (having used the wrong case for the letters). On the other hand, it became all too tempting to helicopter stacker the frosh. While it was fine (in my opinion) to watch their progress, we had to restrain ourselves from sending too many impromptu messages through the app (except the snarky ones that made fun of them — those were fine), lest we ruin the puzzles or the immersion.

The application itself was built on top of Phonegap, a framework that allows developers to build an application that basically consists of some HTML and Javascript, and hook into some phone functions through a Javascript API. The result is an application that is easy to build and runs on most phone platforms. The server side code that received the status from the application and sent any remote messages that I wrote was all written in Perl. The idea for the tablet application came from one of the people who built the stack I went on my junior year, Patrick Xia. First of all, his stack had an android cell phone application which displayed the various ‘achievements’ we had unlocked by scanning QR codes during the day. Second of all, he was the one who showed me the $55 tablet earlier last year, before we had any idea what our stack was even going to look like. He even let me borrow his app’s source code to modify.

Thus, our app was built on top of his source code, which was reportedly written in a day before his stack ran (quite impressive). His application was built for a phone and displayed achievements, but not the actual clues for the day. Thus, my contribution was restyling it so that it looked more like a tablet application, updating the code so that it would work on the two year newer Android OS, removing some features we couldn’t use because of our hardware (his application used the phone to GPS track our group, as well as the microphone to listen in on our group — it was quite devious but hilarious when we found out), making the aesthetics and flavor text fit into our theme, and inserting all of our clues and hints. Since the tablet was such an integral component of our stack, it really, really could not fail (we had a backup plan but it wasn’t nearly as good). I basically didn’t touch the server side code at all, since I didn’t need to. This was fortunate, since I’m not familiar with Perl at all.

A few miscellaneous things: First, the way the space-time coordinates clock worked is that each message had a time value associated with it (or -1 for messages that didn’t travel the group, or -2 for messages that traveled the group to the current lab time). When those messages were unlocked, the app calculated the offset in milliseconds from the current lab time and the time on the message (unless the time was -1) and remembered that. Then, there were two JavaScript date objects, one of which was initialized to the current time (plus 200 years) and the other was initialized to the current time plus the offset (plus 200 years), every time the callback (which was what also sent the current status to the server and got any messages I sent remotely) was initiated. This way, the current space-time coordinates clock ran along with the current lab time clock, as you might expect.

Second, the one advantage we foresaw with having the app was that we didn’t have to spend the entire night before laying out our paper clues, since we didn’t really have paper clues. This was incredibly nice, since we could get our clues done much sooner. However, all of those hopes of saving night-before stress were fruitless, despite having started our stack quite early. It’s always that last 10% that gives you trouble, as anyone who has built a large scale project knows.

On the morning of Ditch Day, not having slept, I ran into a major issue while I was entering all of the clues into the application. Since I had been working on lots of little things that night and the plot only got completely finished late that night as well, I started inserting the clues pretty late. Anyway, I ran into this bug where the Javascript interpreter was complaining about missing characters what turned out to be 30-40 lines away from where the actual issues were, but all of the code looked valid to me. After spending an hour and a half selectively removing code to see where the problem was, I was still nowhere, so I sent a desperate call for help to the Ditch Day list my class was using (and that our helpful alums were on). Fortunately, Patrick was magical and helped me discover that I had trailing whitespace in some lines where I was breaking strings across multiple lines (which was completely unclear from the errors I was getting, in my defense). I got the app completed and on the tablet with 20 minutes to go (and with my hopes for an hour and a half of sleep having turned into no sleep that night — thus leading to my having pulled my only all-nighter during Caltech). This is yet another reason to set Eclipse to remove all trailing whitespace on lines by default!

In the next post, I will describe my favorite physical puzzle on our stack, and one of our two centerpieces: the mirror maze. Unfortunately, the stackees didn’t really capture any video of themselves doing the puzzle, but the puzzle was so good that we ran it with five or six more groups over the next two or three days, so I have a video of one of those runs to show you. Until next time!

Vector: A Stack About Time Travel and Caltech

This is part 2 of a 10-part series.

Hello again, readers! I’m writing again after a great weekend where I got to meet up with lots of good friends. I’m actually quite excited to write this post, because I get to start in on the details of the stack I built and write about one of my favorite components of the stack: its plot! Since I’m so excited and since the plot/clues document we had was 7,500 words long, this post might wind up…kind of long. I’ll leave out the details of the actual puzzles and fill in as I write the posts about the puzzles themselves.

As you may have noticed from my descriptions of the stacks I went on, stacks are more often than not based on some other content (movies, video games, TV shows, or books), though it’s not required. Furthermore, most stacks will theme their puzzles and clues to their theme, but having a substantial plot is generally unheard of (at least in my time here). That’s why my last post mentioned that having a plot made our stack fairly unique.

Our stack, being a time travel-related stack that wasn’t based on any pre-existing content (something I had been hoping to do since I was a sophomore), naturally had to be quite plot-intensive. It was so heavily plot-based that one would probably not enjoy the experience if one didn’t pay attention to it at all. This was a new thing for us and most of the people we knew, so we were unsure if it would actually work out. Fortunately, the participants in the stack really enjoyed it, a fact I was elated to find out.

The plot was primarily written by my co-stacker Matt, though all three of us spent a large amount of time discussing and making sure that the plot made sense (more on that later). He really deserves a lot of credit for the sheer amount of little details he made sure were consistent (up to making sure that the group never “ran into themselves” while time travelling). I’ll relate the plot in the order that the underclassmen (heretofore referred to as “frosh”) discovered it.

Our announcements at dinner the night before (as well as a few other representative ones I chose — the overall announcements were a half hour long). Original Video courtesy of Rochelle Weber.

The date is May 24, 2213, precisely 200 years in the future. The participants in this stack, named Vector, are lucky to go on the first ever corporate sponsored Ditch Day stack, thanks to the gracious support of the Vector Corporation. The project and stack are so cool and cutting edge that many of their details are classified, including the name of the stacking senior, who worked at Vector for several summers. The participants’ luck doesn’t end there. Today also happens to be the exact day on which Vector is revealing its Vector™ software, running on the Vector™ Supercomputing Core, developed through a partnership with Caltech, which would allow humans to travel through time for the first time ever. These underclassmen get to be the first people to ever experience time travel!

The Vector Corporation, one of the many software companies that comprise the majority of the world economy in 2213

The Vector Corporation, one of the many software companies that comprise the majority of the world economy in 2213

You see, scientists have long known about the existence of quantum wormholes, but only with the development of this high-powered software running on a quantum supercomputing core have humans been able to calculate the location of these wormholes and open them up to allow for macroscopic objects to travel through. The first time machine was turned on at 8am on May 24th, so nobody can travel earlier than this time, and time is comprised of a single self-consistent timeline.

Unfortunately, the Vector lab was compromised earlier today, and the Vector corporation hopes that the Caltech undergraduates will be able to use their ingenuity and intelligence to find and interpret any clues that the stacking senior may have left behind before his disappearance.

The frosh are taken to a very nice breakfast at the Athenaeum by two agents of the Vector Corporation (in reality, two recently graduated alumni). They discuss the benefits of working at a software company after graduation, and provide the frosh with an Android Tablet running the Vector Chrono Travel AI Interface. This interface is an Artificial Intelligence who interfaces with the software on the Vector Core, provides an indication of current lab time (the time their body has experienced) and space time coordinates (the time on the timeline at which the tablet exists), and incorporates state of the art encryption for transmitting messages to the Vector corporation.

The frosh are sent to UGCS, where they find a letter from themselves in the future (signed by one of the participants on the stack, thanks to some shenanigans we pulled). The letter reads:

Hello past selves,

There is no less awkward way to put it, we are you from the future.

We did not have time to write out this letter ourselves, but your tablet AI procedurally generated it. We cannot tell you much about the situation as it currently stands, just know now that things are more complicated than you know just yet. We remember seeing this letter in the past and did not find it very helpful, but we cannot tell you the whole story or our situation will be compromised.

This is the likely last communication you will receive from us. If we succeed, time travel from our point on will be impossible, and if we fail, then we will not be around to send further messages back. Take this letter with you as you’ll need it at lunch.

Good luck, we know you will succeed.


[Stack participant signature]
P.S. We know you will succeed because we’ve already done all that stuff you’re about to do, assholes. And the code is ugcsactive.

The AI on the tablet chooses not to forward the letter to the Vector Corporation, as it does not feel that to be necessary at the time. At this point, the frosh have been jumped back to 8:01am and learn that some Vector time machines have had their access codes changed, and the stacking senior may have acquired these codes and hid them in a conventional Ditch Day puzzle that he was forced to abandon due to the building being slated for demolition. They are to go to the old Y building to attempt to recover these codes.

After they succeed in recovering the codes, Vector finds that several sabotages have occurred. The frosh must go to Beckman Institute to access confidential Vector databases in order to track down the villain. However, the decryption algorithm for the database takes a long time to run (it is brute forcing in BQP), so the group must split up into two rooms. One group has the initial state of the computation and the other group, which has traveled several hours in the future, has the final state. The two groups must communicate their states over a Skype call and coordinate to obtain the correct code.

After completing this task, the frosh are jumped back to the current lab time, obtain a flash drive with some necessary information and hand it off to a Vector Agent (played by yet another recent alum, Kurt) in the SAC. However, they are not allowed to leave the building with this flash drive: while the building is open for any member of the Caltech community to view the documents, they may not remove them from the building, and there are two security guards (also played by recent alums) on the level that the frosh are located. The AI tells them they must use their “human cleverness” to remove the drive and points out that the fourth floor has a balcony.

Once the handoff is complete, the frosh are told to proceed to SAC 15 to make their next jump. Unfortunately, once there, they discover that someone has sabotaged the wiring in the time machine and they must fix it. By the time they finish fixing it, they find that they have missed their jump, and that the AI has instead jumped them to 8:01am, yet again. The saboteur has been tracked to the North end of the same Old Y Building they were in before, so they should head over there and attempt to capture him. Strangely enough, there are signatures coming from the building similar to those around a time machine.

When they arrive, an Artificial Intelligence informs them that a time travel protocol has been activated and that there are twenty explosive devices currently coming for their space-time coordinate. They also hear voices off in the South end of the hallway. Wasn’t this about the same time they were in the South end of the building? The voices do sound familiar.

Emergency protocols activate to send said devices forward in time if they do detonate, but all twenty must be disarmed by the group before they can proceed. Even after the successful disarmament of the devices, scans are unable to indicate the origin of the devices. They only know that a Vector agent will need to jump them again before they can get back on the trail of the saboteur, who appears to be trying to assassinate them now. Right now, it is time for lunch.

After lunch, they are sent to find Kurt, the same agent to whom they handed off that flash drive, in Karman. He will jump them to their next location. When they arrive, they find that Kurt has been tied up in the meeting location. He looks confused and asks why they are untying him, since they had just tied him up. The frosh are, of course, confused, but Kurt tells him that he’s surprised that they’re even there, since Vector tried to kill them twice. He tells them that since they (the frosh) stole the flash drive from him, he’s screwed and Vector is going to try to kill him too, so he might as well work with the frosh. The frosh are once again confused: in their timeline, the last time they saw the drive was when they handed it to Kurt right before lunch.

Once Kurt realizes that he has mistaken the temporal identity of the group — he thought they were the ones who had just tied him up — Kurt reveals that Vector is trying to sabotage Caltech for a nefarious plan which involves stealing important secrets from the school and that it is imperative that they shut down the Vector Core to prevent the plan. The villain that the group had been chasing all along did not exist, and Vector was using this “villain” to manipulate the frosh into furthering their plan. The senior who built the stack embedded some clues about this in the stack, until Vector found out and disappeared him. Kurt remembers just the code ‘g o o’ and hopes the Chrono Travel Interface is able to send the frosh to what they need to do next. He also reprograms the AI to stop reporting to Vector Corporation, which has the strange side effect of giving it a more quirky personality.

Kurt’s amazing acting, as captured by the participants on our stack.

They are jumped to 9:45am (having the interesting property that this is the only version of them walking around at this time despite it being about 2pm lab time and their having spent all day travelling through time) and sent to Blacker Beach to find acrylic chips containing the next code in a mysterious goo. Once this code is obtained, the AI finds that the Supercomputing Core is in the Synchrotron lab at Caltech. Of course a quantum computing core would be in a physics building! But first, the frosh must tie up some loose ends. It turns out that they were the ones to sabotage the wiring in SAC 15, because they were about to be jumped into a trap. Furthermore, they are the ones who must steal the flash drive from Kurt and tie him up so that he will reveal the Vector plot to them. Of course, the Kurt at that spacetime coordinate doesn’t suspect a thing.

The frosh must also sign that letter to themselves that they received earlier in the day to avoid a “nasty paradox.”

Next, the AI travels them back to the current lab time so that they can meet up with Kurt and destroy the Vector Core (note that this required Kurt to go from being confused, to fighting them, to helping them all within a few hours. Kurt deserves so much credit for being an amazing actor). In order to access the core itself, they must perform a very complicated security override on the structure that houses it.

Once they complete this override, two Vector employees (two more recent alumni) run in and order them to stop. The frosh and Kurt must escape through an alarmed side room in Synchrotron. They must move quickly, for the Vector employees are putting on a good chase! Once out, they proceed to Blacker Courtyard to dispose of the core the only way we know how — by destroying it in a furnace. The core was made of a rare exotic matter, so a new one could not be developed for several years.

The frosh are left with this message from the AI:

Congratulations, Vector has been exposed as an evil organization and time travel has been halted for years. This is more than anyone could have asked of any undergraduate.

Now that the seniors are ghosts, only our legacy can remain here at Caltech. Do awesome, and continue to make great traditions like Ditch Day happen. If people really try, maybe in hundreds of years there will still exist cool places like Caltech.

We’ll try to meet you in the courtyard, but you all should probably think about showering before dinner.

In the next post, I’ll discuss the actual Android app (the Vector Chrono Travel AI Interface), which acted as the group’s primary method of receiving clues and information during the day.

Special thanks to Matt and Jeff, my co-stackers, for reading over this post for accuracy.

Port Forwarding with AT&T U-Verse and a Secondary Router

Just wanted to throw this quickie in before my next Ditch Day post (coming tonight or tomorrow), because I don’t feel like this information is anywhere out there and someone else might have the same problem that I did.

When I moved up to San Francisco, I signed up for AT&T U-Verse. The service itself is great so far, with the exception of AT&T’s DNS servers, which are pretty terrible. I have a Motorola NVG510 modem, which for some bizarre reason doesn’t let you change the DNS settings in the router, so I bought a Netgear N150 Router (WPN824N) to act as the actual router for my network. I used the instructions on this website to change the default DNS on my home network to Google’s Public DNS Servers, which highly improved my performance in loading webpages.

However, I soon discovered one problem: port forwarding no longer seemed to work, even when I set it up on the Netgear router. This was somewhat disappointing, because I had just bought a domain name at least partially so that I could forward a subdomain to my desktop at home. I believe this stems from the fact that instead of having a true bridge mode on the NVG510, they put an “IP Passthrough” feature, and I’m still not entirely sure what the latter does exactly.

The solution is actually rather straightforward, though. Instead of only setting up the port forwarding on the Netgear Router, I had to also forward those ports on the Modem. When it asks which device to forward them to, I forwarded them to the Netgear Router (which should just show up in the devices drop-down if it’s already connected).

I hope this winds up being helpful to someone at some point in the future!

What is Caltech’s Ditch Day?

This is part 1 of a 10-part series.

Whew! I write to you on the other side of 38 quite hectic days. Since my first post, I had a great four-day vacation to Las Vegas, packed up literally everything I owned, graduated from Caltech, became a California resident, drove up to the Bay Area, moved into my beautiful (albeit overpriced) San Francisco apartment (edit: I don’t live there anymore as of October 2013 — my new place is much nicer and much more overpriced), bought a bunch of furniture, and started my internship at Sift Science.


We look so happy to be leaving all of our friends! Source

Now that I have some time to write again, I can finally start off my 10-part Ditch Day series by explaining to you what Ditch Day actually is.

As I said in the intro post, Ditch Day is not what you might think given the name. The seniors don’t really ditch in the sense of going to the beach and just relaxing all day (even though I’m pretty sure we’d all have liked to). They do have to leave campus, because any senior spotted on-campus will be duct taped to a tree, and classes are officially cancelled for everyone. The latter is because each group of seniors has built an entire day of entertainment, activities, and puzzles (overall referred to as stacks) for the underclassmen to enjoy all day.

On my very first Ditch Day, I worked for an Aperture Science-esque company, where I participated in experiments testing senses and “super-senses”, including taste (having to solve a puzzle with custom-made “tasting gels”), hearing (having to shut off speakers playing the Ride of the Valkyries in a loud and dark room by pushing buttons next to them), pain (having to lick nails connected to a 9V battery to see which were live), balance (having to balance a gigantic suspended metal mobile with our whole bodies), and super-tasting (eating sour food under the influence of Miraculin). More details about that stack are in a blog post written by one of the creators of that stack.


The sign-up poster for “Sense”, the stack I went on my frosh year.

The next year, I was part of a real life version of Achievement Unlocked. We were given an Android phone with an application at the beginning of the day that gave us updates on the achievements we had earned as we solved puzzles such as a 3D minesweeper puzzle (which involved lots of boxes in a room), lifted boxes with QR codes on them with one of the official Caltech construction cranes, and played with a mural in our house that used hidden capacitive plates to respond to touch with sound. Little did we know the Android application (and by extension, the seniors who were stuck off-campus) was listening in on our conversations with the phone’s microphone.


Operating the crane (with wooden claw attached) that we were allowed to use as part of “Achievement Unlocked”.

For my last Ditch Day (on the going on stacks side of things), I went on a Calvin & Hobbes stack, where we hung out in a tree house (no girls allowed!), traveled through time while solving a puzzle that required the use of our safety goggles (3D glasses), and solved a Slitherlink puzzle that had been created in the real world rather than on paper.

ImageWe also “caught” these amazing Hobbes backpacks.

Other awesome stack elements that come to mind are a giant ice wall that people could climb on and a laser maze in the tunnels, and this is all just things that happened while I was there!

Ditch Day wasn’t always this way. A long time ago, Caltech seniors did just ditch classes and go to the beach. The underclassmen thought this was rather unfair, so in true Caltech style, they began pranking the seniors’ rooms. Soon enough, the seniors began to develop counter-measures for pranking while they ditched. These ranged from placing giant concrete barricades and steel plates on their doors and windows to offering the underclassmen bribes (in the form of some cool or expensive things). I’m sure the bribes eventually became things like paying for cool adventures for the underclassmen. Eventually, things escalated to the point where seniors would build these massive elaborate stacks.

As an underclassman, Ditch Day is pretty much the best day of the year. When I was a frosh, I was told that it’s “better than Christmas!” The seniors pretty much spend all of their time from about April (and sometimes much, much earlier) until Ditch Day (toward the end of May) working on their stacks, and it’s always great to see what that much effort out of some of the smartest people in the country can produce. The fact that classes are officially cancelled so that we can do this is especially awesome. However, as an underclassman, we never know when Ditch Day will be! The date is a heavily guarded secret. If you ask any senior, they’ll tell you that “Ditch Day is Tomorrow!” at any point in time, even the newly-minted seniors immediately after the end of the previous Ditch Day — at 5pm, when the cannon fires, the juniors become seniors and the seniors become “ghosts”.

To make things even more complicated, the seniors often hold fake Ditch Days — they’ll make a set of announcements at dinner and even put out stack sign-up sheets the next morning. However, these stacks give you around an hour of content until they tell you “go to bed frosh, Ditch Day is Tomorrow!” By the time announcements are over, and definitely by the time you see the sign-up sheets, it’s generally clear that this is a fake Ditch Day (unless it’s the day before the real Ditch Day and the seniors are trying really hard to fool the underclassmen). However, even the fakes are valuable because they give everyone much-needed logistics practice (when to start waking people up, how to sign up for a stack, what the rules are about signing up, what kind of clues to expect on a stack, etc.) and they are pretty good fun to boot. When the class one year above mine became seniors, I went on a Lonely Island themed stack for their first fake, which involved blasting Lonely Island music around campus at 8 in the morning among other things. For a fake Ditch Day from another year, I got to play a mini laser harp.

On the senior side of things, we get (have) to spend all day being on-call for our stacks, in case an activity fails and we have to cloak-and-dagger our way to campus to fix it, or if they can’t solve a puzzle. In my house, we are always lucky to have a readily available army of recently-graduated alumni who are around to keep things running smoothly, or at all. What we’d really like to be doing is sleeping all day, though, since we just spent a week getting minimal sleep and probably pulled an all-nighter just before. The 90-10 rule definitely applies: I spent the night before doing all sorts of random menial things, like cleaning up some areas we had puzzles in, and debugging some terrible Javascript errors. As a result, a night in which I thought I’d get three or four hours of sleep because we were so ahead in building became a night in which I pulled what was possibly my only true all-nighter at Caltech.

As a senior, you also realize how supportive some departments are of Ditch Day and of students doing cool things in general. In our case, the physics department let us use and have after-hours access to a pretty big space in their large warehouse/lab that contained a lot of expensive equipment for construction and housing of a puzzle. I say some, because some blatantly aren’t. I’m looking at you, Geology and Biology. Both of them wouldn’t let us have the use of classrooms on a day when classes are officially cancelled. Either way, it’s nice to have some evidence that some people are still for keeping the spirit of Caltech alive rather than just paying lip service to the concept.

Overall, if you take away one thing from this post, it’s that Ditch Day at Caltech is a big deal and it’s where a lot of very talented scientists and engineers get to do amazing things. In the next post, I’ll introduce the stack that I spent several months building and one of its most integral components: the plot. Ours was unique of all the stacks that I had seen in that the plot was so important to one’s enjoyment of the whole experience, but I’ll explain that next time.