Sunday, September 23, 2018

A 2 Month Research Trip to Osaka: FrontierLab@OsakaU

//Long Post Alert
My 2018 summer has been remarkably challenging and has kept me busy up until the very start of school. This includes my two day stay in Taiwan right after my last final during the Spring 2018 quarter ended, my two month stay in Osaka, Japan, studying rigorous algorithm engineering at the prestigious Osaka University, and a two week stay in Taiwan with my family that consisted of studying and software development that kept me up until roughly 4-5 AM daily. 

Finally, I had a final three week stay in my new apartment in Los Angeles, preparing for Operating Systems and Artificial Intelligence courses. Oh, I also spent time developing my GameMaker project with a team, working on an iOS application with my friend, developing two course curricula for SuperCoding, studying Cracking the Interview and Game Programming in C++, and wrapping up an online Computer Network Fundamentals course on Coursera. Furthermore, I spent around 120 hours in this time span developing my own site from a blank text document (which you can view here), which was an excellent learning experience. 
There has been nothing short of orderly chaos in my life over the last three months, and I cannot get enough of it! This is the kind of challenge I was expecting to go through at some point during my time as a college student. Regardless of the chaos, I must talk about my two month trip to Osaka, and how it has opened my eyes on the many wonderful elements of living in Japan that I have discovered first-hand.

I landed in Japan in the evening of June 17th, and walked straight into a massive earthquake that took place on the morning of the 18th. I was walking to the train station that would take me to Osaka University's orientation, but the train railway bridge above me made the loudest noise as the earthquake happened, and I honestly thought that it would fall and actually crush me. Luckily, it didn't (...). That was my real first 'welcome' to Japan. I lived in Kaohsiung, Taiwan, before moving to UCLA so earthquakes were not that big of a deal, but it was a nice opener.

After that, each day would consist of me researching something I had no clue about - the rotor router mechanism. Everything I found on the Internet pointed me to different directions (like a rotor router, haha), and I was lost for a good amount of time. My fluency in Japan led everyone (EVERYONE) in the lab to speak to me about everything in Japanese. This was fine, but hours of nonstop communication about topics ranging from men and women to computers and networks really trained my brain to process greater amounts of Japanese. 
I eventually got the handle on what the rotor router mechanism was about (which you can read about in my paper here), and started working on a big paper that looked at the benefits and disadvantages of using the mechanism. I was then suddenly bombarded with a midterm presentation report that I had to do in the lab sometime during Week 5 (the next week). Oh, and they wanted me to do it in Japanese - a new challenge that I was ready to take. You can check out the presentation slides here.
Okay, so after week 5, my work started to become more streamlined - I was able to write a lot about everything, and also completed the development of a C++ simulation program that would check the average stabilization period of a bot roaming a set-up graph. I will explain this in layman's term now (look at the graphic below): If we have a little robot exploring a bunch of computers (the circles), and the robot magically locks into a path that repeats forever. My simulation finds out how many steps (A to B is one step) it takes for the robot to lock into that repeating path, and what the average number of steps is over X number of simulations run on the same graph.
The results for one of the two graphs that I investigated (the graph above in this case) can be seen below. In a 2002 paper covering the basics of the rotor router mechanism, the stabilization period was proven to be O(2mD), which equates to 2 * the number of edges * the diameter of the graph. However, there has been no research on the actual stabilization period average for graphs, and this is where the importance of my research and paper comes in. The visual below clearly shows that despite the worst case for the (above) graph being 44, all of the million test cases led to the stabilization period being less than 13, and having an average of 1.25. This may have to do with the number of edges in the graph being high, but it still gives us a good look into the efficiency of the rotor router mechanism as a whole. 

I would love to talk more about the rotor router mechanism in a future post - particularly further enhancements that have been made to the original algorithm, and how using multiple robots at the same time would affect the stabilization period. If you have any questions about the mechanism, my paper, or anything else, definitely comment below or send me an email!

Wednesday, September 19, 2018

New Website & Bank Showdown Updates

Hey everyone! It's been another few months, and a lot of things have happened! I'll be talking about my two month trip to Japan in an upcoming post, but for now, I would like to mention my new website and an update on Bank Showdown.

---Personal Website---


Progress: Complete (for now)
Languages: HTML, CSS, JavaScript

So, I got back to Taiwan after my two month trip to Osaka, and decided that it was time to get serious with everything. Like, really more serious than ever before. I started to work on my own site, but things were pretty slow. Instead of working on my own site (at the time), I decided to focus more on reading a couple textbooks and taking a Computer Network course (that I have completed) on Coursera. A textbook I read some bits of is Game Programming in C++, by USC's Sanjay Madhav, who seems like a really cool dude who knows a ton about SDL and C++. 

Anyways, I got back to LA in early September, got my stuff all set up at my new apartment, and started grinding on the new website for around two and a half weeks. I estimated about 120 hours of research and actual coding, and it took all of my HTML and CSS skills. The JavaScript bit was a bit on the low end, but those special effects and animations are small additions I can make to my site later on. You can actually check the site here. If you have any comments or criticisms, feel free to comment them or shoot me an email. I am not super experienced with site building, especially from a blank document. This is a great opportunity for me to really build up a solid foundation of front end design skills, as (visual) art is a really tough subject for me. 

I'm pretty proud of it, despite many minuses here and there. If only I had more time to make more websites... that would be great. Okay, now let's talk about another project...!

---Bank Showdown---


Progress: Complete (for now)
Language: Python 3.6

So I finished the multiplayer mode for Bank Showdown a couple months ago, and multiplayer is generally pretty easy to program because it simply consists of running a function two times, but with two different parameters, then running a bunch of tests and things to create an effect depending on the choices both players made.

I decided in the past that I would probably make around three difficulties (or two if I was lazy), and today was the day it happened! Easy mode and Normal mode were relatively easy to code, but Hard was a challenge. In fact, it was not really the coding that was difficult for Hard mode, but rather thinking of how a human would outsmart their opponent when playing a game like this. I spent a while drawing all over my huge whiteboard and mapping out potential situations given certain scoring situations, and even made a few more functions and variables to help me obtain data that the other difficulties otherwise wouldn't need. Examples of this include checking the player's previous move history, and the computer's previous move history as well. I tried to find a creative way to write it, and I think it went well in the end. After coming up with a decent algorithm for the AI, the implementation was pretty easy.

This wraps it up for my talk on Bank Showdown and my site. You can check out Bank Showdown here - do give me a star if you end up not being able to beat Hard difficulty in under three tries... or even if you do, I would love a star for the time you've spent on it... haha! Regardless, I had a really great time thinking up of ways the computer can trick the player and make life difficult for them. I hope to make more small to mid scope projects like this in the future.

Let's go Bruins!