Tuesday, August 21, 2012

Stanford EPGY

Hi, I'm not dead.  Thought I should let you know.

I've been in Taiwan, and then I've been here at Stanford's EPGY high school program, which was a truly eye-opening experience in more ways than anything.  It'd be by all means wrong if I didn't give them a quick thank-you, at least in blog post form.

Hey, Stanford:

Thank you.

THERE I SAID IT.  I miss you all.

Now, a quick run-down:

This is embarrassing to admit but this is the first time I've taken an airplane by myself.  I met some interesting people on the plane (one really cool guy named Eric that did frontend development for Amazon / eBay - type websites).  Planes are probably the best place to meet people; you're stuck sitting next to the same guy for 4+ hours and you're so bored that you don't care that your neighbor is a boring prick (read: that's me) so people talk.  Additionally, the people who regularly take planes also tend to have a ton to offer (I met a chemist on the flight back and we talked about gas efficiency.  Super cool.)  If it wasn't for the high price tag, I think I'd fly around just to get to know people on the planes.

So I finally landed in San Francisco after a fairly smooth flight (contrary to the flight back three weeks later) and immediately struck up a conversation with another program participant about Sid Meier's Civilization series.  That's when I learned the first thing here; unlike Florida, people are generally very sociable and eager to talk about things that interest them.

(Alright, that wasn't too fair of me.  Florida has that.  Sometimes).

I shared a dorm with this guy named Chang (who flew here from China -- that's maybe a 14+ hour flight).  He was alright and we both spent the first day walking around the place, and my first impression of him was of a typical conservative Asian who's great at studying and other Asian-type things.  Note, I was wrong.  This perception was turned on its head later in the course, and I found him to be a really cool guy.

I met this one guy named Eric (a different one) who had won a Google competition for something crazy-science-y.  Awesome person to talk to, because unlike other people, he never got tired of talking about science.  I'm a fellow geek, I had no problems with that.  He taught me more about quantum physics and relativity than I could've learned in any ordinary classroom.

This was also the first sign of what I had expected all along.  When your school isn't bogged down in its bureaucracy (cough, Florida schools), you can actually offer things that are good for the students.  He had advanced robotics clubs and science programs behind him.  I was extremely jealous.

The counselors scheduled a nice meeting for us all and unimportant things happened.  They did mention the possibility of "hiking the dish," getting up early in the morning and running to and from this big satellite dish they have some distance away.  I promised myself I'd set my alarm early for that before I left.  Early being, 6-in-the-morning early.

Giving credit where it's due, I wouldn't have survived the class if it weren't for this small café in the electrical engineering building called Bytes (oh, clever!) where I'd go almost every morning for a cappuccino.  Not saying the class was boring or anything (it wasn't at all; the teacher was a fellow indie gamer and total bro on the side) but I'm borderline narcoleptic and sacrifices must be made in accordance to the rules of the Illuminati.

Normally, I wouldn't care about falling asleep in class but this one actually had some good info on the line.  It was absolutely worth staying awake for every minute of it.  I spent a lot of time and effort saving money for small things, like avoiding field trips when I can, etc. in previous years of schooling and all of that is a huge mistake; the thing is, the information industry is insanely lucrative.  Experience is infinitely more valuable than money and you'll easily earn it back with what you learn.  Spend money if you need to.  You won't believe me but you will regret it just like I do and then you will hate your life and die.

I met this one guy named Soumya who's this awesome Indian guy and we talked a lot about just about everything.  For one, Indian politics are super corrupt.  The caste system is still unofficially active there that completely blew my mind.  He knew a lot about pretty much everything and won the international Intel Science and Engineering Fair last year for doing something about RSA encryption, where he then went to Taiwan (!) for a bunch of things.  A bunch of things, including getting drunk, getting lost on a train, and trapping himself in a fire escape.  Super awesome.

Throughout the time there, the counselors (I'm saying it like they're a mafia group or something, not at all, really! They're great people) have a really scary thing they call Spotlight where you go up and talk about yourself for 10 minutes or so in front of a big scary crowd of 40 people and then they pummel you with questions that you have to answer on the spot or else they punch you to death and burn your house down.  I spent way too much time thinking of what to say for that.  Eric did it, and then Soumya did it, and they all did fairly well.  My roommate told some stories of how he'd prank his friends by pretending to take drugs, or by writing letters to their girlfriends addressed by them, and they were clearly the best stories as no one expected him to be that interesting.  We all gave him a standing ovation after he finished.  I was one proud roommate.

I'll go and say it now; I nuked mine.  I'm the worst public speaker you'll ever hear.  Managed to talk about my total lack of athletic ability and my gamedev hobby but other than that I totally blanked out.  It was awful.

The class I took was in Artificial Intelligence (maybe I should've mentioned that earlier? Heh...) and we were all given a choice on final projects.  After playing a game of Risk with some people there, I jokingly said I'd try my hand at a Risk AI.  To my surprise, two other people (a certain Michael and Ben) decided to join me.  I didn't want to do it mainly because I knew I couldn't do it, but there was no turning back.  Obligation to the team.  No regrets though; it ended up being a really interesting project.

I met this one guy named Vanya who had roots in Russia and hosted servers through Amazon Web Services.  He did networking professionally and was generally super-awesome.  When I was working on a Connect Four AI as a side-project, he helped by making a suggestion about dynamic priority spaces -- that is, a space adjacent to an enemy/friendly piece would be either less important or more important than other spaces.  I responded that a minimax implementation would be more stable, and he replied (something along these lines):
"Discoveries aren't made because of the methodology that 'this is how you do things.'  You just try things.  But there's no point going into something, knowing how to do it already."
Words to live by.

A bit later, my dad's boss's son invited me to go out to dinner with him at an Asian night market.  I set up all the paperwork on my end and we did that.  The guy works in the hardware-y sector of Apple and was generally a nice guy to be with.  The "Asian night market" ended up being a circle of food trucks instead, but no regrets.

One of the counselors, a certain Art Wangperawong ("You say it like a sentence: 'Wang per a wong' ") was kind enough to show us his lab.  He was a graduate student looking for more efficient materials for solar cells and showed us the process they used to inspect the material.
"Already I can see the material is not that good.  The metal is very reflective, so most of the light is being reflected away from the panel.  If the material is very good, it should be almost black."
By the way, there shouldn't be any misconception from when I say "lab."  It was a legit lab.  Huge million dollar electron microscopes that allowed you to see pretty much anything you wanted in the material.

Up to now, I haven't paid attention to college admissions as much as I should've.  I used to think, "give me a laptop and an internet connection and I'll do all the research I want."  That attitude declined throughout the year, and seeing this lab was the final nail in the coffin for that idea.  I want to go to college.  I want to go to a good college.  It'd be an absolute dream to have, say, a supercomputer to run instant neural networks on, or a particle accelerator to study quantum behavior.  Lots of regret for not getting involved in things early on.  Pursue your passions, but just as importantly, make use of your skills.  Join competitions, travel places.  It'll probably be a ton better for you, even disregarding the bonus in college admissions.

Michael, Ben and I presented our Risk AI on the last day of the program.  We had a fairly interesting setup; using GitHub, we were able to develop separate AIs using the same framework.  Ben and Michael worked on a more logical, strategic AI while I worked on an experimental heuristic-based one.  We ended up with the same results; the AI's generally sucked.  But it was a good run anyhow; there's no sane way I'd be able to understand GitHub without that experience.

Our house had a neat game of capture the flag on the last day (I'll mention that capture the flag and ultimate frisbee were pretty much all I did at the program) and on the way back, Soumya lost his room key.  So we walked back to the field, found it, then walked back to the dorms before realizing we were completely lost.  By "completely lost," I mean we were seeing people's apartments.  There were signs advertising things like bands playing nearby, etc.  But we found our way back and I got to know him a lot better through that.

So the last day was incredibly somber (at least for me, anyways) and we were all sort of sitting around and playing cards.  Vanya had to leave earlier than the others, so I helped him pack a bit.  Before he left, he told me that of all the really interesting people he met during the program, I was "near the top of the list."  Incredibly sad.  I don't want to say I broke down and started tearing up like crazy but I did.

We all ended up pulling an all-nighter before one-by-one people left for the airport.  Some girls were doing their nails last-minute, and the counselors were finishing up their (much shorter) Spotlight presentations.  Fifteen minutes before my shuttle was due to arrive, Soumya turned to me and said, "I'll paint my nails if you do it too."  I agreed.  I had mine painted a really reflective silver that I'm sure was noticeable from a quarter mile away, but that was fine -- I got Soumya to paint his in hot pink.

And then I noticed something that really upset me:

I never did get to hike the dish.

The flight back was uneventful; the plane got stuck taking circles in Illinois, waiting for a storm to clear up in O'Hare and then rerouted to St. Louis to refuel.  Then the crew was delayed in traffic for the flight back to Florida.  I ended up getting back at 3 AM.  No one was at fault.  Circumstances.

And really I'm absolutely 100% sorry that I couldn't express my appreciation for everyone there at Stanford for being some of the best people I've ever met.  I have huge problems expressing emotions but you guys are the greatest and please believe it because it's true.  The thing that inspired me to finally write up this post was a dream where I flew back to Stanford to visit after the program had ended.  The rooms were completely empty.  The dream was definitely lucid, so I could've changed the dream to anything I wanted but I didn't.  I just sat in the lounge.  It was fantastic.

Thanks again, everyone.  Best of luck.  Live long and prosper.

Friday, July 6, 2012

C++ : ChatMarkov

Source (GitHub, MSVC++ 2010 EE)
License

Made a program to generate new chatlogs based off of old ones.  It uses a system known as Markov chains to build each sentence.

In simplespeak, the program goes through your chatlog and builds a dictionary of all unique words, as well as the probabilities that each word will follow another.  The program then uses these probability tables to ekk out a fake conversation.

Currently in early alpha.  Feel free to fork the project and add your own modifications.

Friday, June 29, 2012

You Broke The Big Thing! : Finished


Quick game for NeoTalon's RGB Comp 2012 .  Instructions are in F1.

Download

Extremely short game with the premise that you broke the thing and now you're out to fix the thing.

Critiques so far run from " ...What the heck did I just play?" to "That was... a thing."

The timelapse is really awkward.  Features a strange image that my friend sent, and me Skyping with my shirtless dad.

Saturday, June 2, 2012

Saturday, May 19, 2012

Music : Message Intercepted

Website - http://messageintercepted.com/
SoundCloud - http://soundcloud.com/message-intercepted
YouTube - http://www.youtube.com/user/ZekkaYaku

Was introduced to breakcore today by a digital composer whose been making music for some years now; I had heard of music from the genre but could never pair a name to it apart from "industrial glitch maybe perhaps?" which was always frustrating to type.  Ended up listening to a lot of songs by said composer.  They're pretty great.


Most of them feature a fairly kick-heavy drumline and abrupt transitions, but the really distinguishing plus is his use of samples in a way that's varied and innovative without clashing.  The track above, Transforming Robot, showcases a glitchy drumtrack with an ambient section stuck in the middle.  Surprisingly, it blends very, very well.
Would encourage you to listen to more of the tracks because I'm having a hard time describing it.  Definitely one of the better hobbyist techno composers I've heard of.

Tuesday, May 8, 2012

What is so good about The Scream?

If you're unfamiliar, "The Scream" is a painting made by Edvard Munch around 1893-1910.  It recently sold for ~$119 million dollars.

Seriously, what's so good about this?

Yes, it's a historical piece of art.  Yes, its fame derives a lot from its age and influence.  And I've been staring at it while writing this post, and yes, I guess I kind of like the colors of the water and the sky.  They look deep and bold.

But what the heck is with the focus of the picture: the actual scream?  People seem to say that the scene looks and feels like "a thriller," or they can feel the darkness and anxiety of the subject.  How?  I certainly don't.

Of course, this is probably a matter of tastes.  I've always been a fan of, in the words of a show my sister was showing me yesterday, the "double-layer trap" in creative works.  If you're writing a sad book, you shouldn't use the words "sad," "depressed," "gloomy," etc.  Likewise, if you're directing a sad movie, you shouldn't pepper it with excessive crying and slow-mo.  And if you're painting a sad painting, you shouldn't have to pour a gallon of gray paint all over your work and say, "aha!  My colors are dark!  My painting is now officially saddening!"

If your work is good, it should lend itself to the emotion you're targetting.  And if it's not, slapping a crying man in the picture isn't going to help you.

I'm not criticizing Munch.  Wait, yes I am.  Not that I have the authority or qualifications to (I'm an awful artist), but in my extremely unprofessional opinion, "the scream" takes a whole lot of potential out of "The Scream."

Saturday, May 5, 2012

C++ : Symbolic Regression - Part 1

I'm not dead.  Just working on something that's taking an awful long amount of time.  That's my excuse for my recent post-truancy.

'Wired: Computer Self Discovers Laws of Physics'

See that article up there?  Click on it.  No?  Fine, here's what it says in a nutshell.  Some people over at Cornell University stuck a bunch of LED lights onto a chaotic pendulum, hooked up an LED detector onto a computer, and fed the data through some fancy algorithms based on symbolic regression that calculated the gravity equation from scratch.

Sounds complicated?  It's not.  It's actually extremely simple.  Here's the generalized workflow:
  1. Feed some data into the computer, like the positions of the LED lights.  These are your state variables.
  2. Use some fancy maths to find the partial derivatives between the state variables.  Partial derivatives are used to calculate relations between variables.
  3. Generate thousands of equations randomly, and use genetic algorithms for mutation (value mutation, crossover, etc.).  The equations that match the data the closest (via plugging in values) have the highest priority in mutation.  This is the symbolic regression step.
  4. Repeat step 3 a hundred thousand gazillion times and after an infinite number of iterations you should converge to the exact equation that fits the data.
That's all.  It's very simple.

Programming Symbolic Regression

The main programming obstacles here are as follows:
  1. Building equations in program-my form.  There's a predetermined set of operators made into functions and stored as function pointers (add(a,b), sub(a,b), mul(a,b), div(a,b), sin(a), cos(b), among others).
  2. Solving partial derivatives symbolically.  I have no idea how to do this yet but I'm sure it's not that hard?
  3. Optimizing it so it doesn't take a hundred thousand years to calculate something nice.
 That's the gist of it.  If I make any progress I'll mention it on the blog.

If you're interested in your own research, here's the material for the Cornell project.  It's a little intimidating to read but isn't all that bad; most of the unfamiliar terms can be figured out in context.

Overview: Distilling Free-Form Natural Laws from Experimental Data
Supporting Online Material