Archive for the ‘Interests’ Category

ETD Day 1 - Productive Procrastination

Monday, November 23rd, 2009

I woke up 2 in the afternoon today. Even when I was staying awake for days at a time when I was writing that article last month, I never had crossed the AM/PM line for waking up. I wonder if it is the cold - today was a constant 8 degrees during the whole day, and everyone I called for a coffee out said they couldn’t go, so I end up staying the whole day at home…

Which means that I had plenty of time to keep hacking away at my Python problem :-). Today, I tried a more direct approach by try and coding directly the functions I needed, stopping to google a concept or another when I ran into something I did not understand. This worked surprisingly well, as I managed to intuitively use the list constructs and function in python to easily implement my genome, mutation, crossover operations, as well as population mechanics, like elite, sorting, tournament selection, etc. I did find my share of bizarre bugs, like once when I got confused about instance and class scopes, and that resulted in a constructor operator which generated bigger and bigger individuals in geometric progression and ate up all my computer’s memory in just 4 generations, but by the end of about 6 hours I managed to have a fully fledged evolutionary system (although with a dummy evaluation function). Tomorrow I’ll try writing the engine for my ETD game/evaluation function.

Besides that, I also read up two chapters in the new book I have started “Here Comes Everybody”, by Clay Shirky. The book talks about and tries to explain the phenomenon of the massive, loosely linked community actions, like wikipedia or flickr, based on the idea that the cost to maintaining social connections has collapsed in the past few years, which allowed non-profit actions which were too expensive for informal communities to organize, but too unprofitable for formal companies to tackle, to flourish. Reading the book I can’t help but feel that I had heard all this talk in many different blogs, forum/slashdot comments, and Free Software talks, but it is always nice to see everything put together in one cohesive, well argued text, and with plenty of interesting anecdotes to illustrate the concepts.

Talking about books, last week I also read “A Wizard of Earthsea”, by Ursula K. Le Guin, and I really really recommend this book. I devoured it in less than 2 days. This book is one of the precursors of Medieval Fantasy, and the wizards and how the magic works in Le Guin’s world is too charming. The concept that a Mage is just as powerful as he knows and understand the world around him draws you into her world. I hope I can make my own D&D world as mystical and still consistent as hers.

And that’s for a very cold and gray Sunday. I got one of my three bases covered :-)

ETD Day 0 - reading python tutorials

Sunday, November 22nd, 2009

While finishing the paper for the ECF conference (or to put it in a more honest way, while procrastinating playing DTD in Kongregate when I should have been finishing the paper for the ECF conference), I had this idea: What if I wrote a GA that evolved a labyrinth for DTD?

After that, the flood of ideas came through (and the paper was quickly forgotten for an hour or two). I drew a quick scheme for the genome representation and for the rough simplified game to be used as the fitness function, and then I realized that this would be no fun at all if I didn’t program a small graphical front end for the program.

While thinking about this, I dreaded trying to delve into Java’s swing to program what should be a very simple cartoonish interface for a non-interactive game. I thought for a second about finally taking the time to learn the curses library, then it hit me. If I’m to learn something new, I might just as well finally get that goal of learning python off the self!

So here I am, reading a bunch of python tutorials, and some pygame examples for the Gui. Luckly, I found a half-made DTD clone in pygame which is running, so I can probably use that when I finally get to the “getting things on screen” stage, but right now I’m still struggling to write a basic GA loop in the language. More specifically, how to use the fancy tuples to implement crossover functions. Gah, things are too different, but at least I’m off to a start already. Tomorrow and Monday are Japanese Holidays, so with some luck I get a large chuck of the project started by then and can write some more precise details… but for tonight - reading, reading reading.

Cool little things

Wednesday, October 28th, 2009

It should have been obvious, and I should have known it before, but I didn’t know, and never observed before that microwave operation interferes with my my computer’s wireless networking. XKCD even mentioned it recently. After reading it on XKCD, I started to notice that whenever I use the microwave to heat up some coffee for myself, my internet radio gets cut.

That said… I’m pretty sure I often used the microwave while using the computer before, and I have never noticed this phenomenon before reading the XKCD strip. Hmmm, I wonder if they did something to all wifi boards of the world? That would be quite a prank to pull off! :-)

The work on the paper for the special issue of IS continues. My “crunch” started on Monday, the deadline is Saturday, today is Tuesday and I’m afraid I haven’t advanced much yet :-( I have decided I’m not going to the lab anymore this week, except to do whatever is absolutely necessary - I just can concentrate better at home, when it comes to slaving away writing an article - I can listen to music, food is cheaper to come by, and if I have to stay up until late, I can just sleep in my own bed and wake up in a much better shape the next day. Of course, I can’t keep this up forever, If I stay too long locked away in my home I start getting depressed for not seeing anyone else, but I think I can easily pull it off for one week.

Well, for 5 more days :-(

ICPC is not the “Real World”

Monday, October 26th, 2009

Recently I have read a news article at ACM’s website about the ICPC, which reminded me why I usually hate the media. How facts are casually distorted in order to make the truth “sexier”, sometimes even when it is not needed to.

The ICPC is a programming contest hosted by ACM. In it, students from all over the world get together to try and solve a large number of very hard programming problems in 5 hours. Each team has 3 students and one computer, so the contest involves not just the ability to read a problem, figure out which algorithm will solve it, and implement that algorithm correctly in a short time, but also how to best manage the single computer among the three students (you have to figure out and write down most of your code in paper before sitting down to program to save time). The participants are the best teams of their respective local competitions, young people with a great knack for maths and programming. The contest itself and the associated events were really fun.

However, obviously this was not enough for whoever wrote the article. They had to say things like that “the participants did the work of a traffic controller”, or that “the contest challenges participants to solve real world problems”. Really? Maybe the contest has changed a lot in the last 5 years, but the problems where all mathematical problems (longest path, geometric problems, search, constraint satisfaction, etc) with some “stories” thrown into the mix to test the players reading comprehension. *Sigh*

=====

On the other news, this week will be dedicated to writing my second journal paper, to complete the publication requirements for my PhD at the university of Tokyo. Allegedly I managed to get enough data for the publication with last week’s experiments, now comes the inglorious tasks of transforming all of that in an interesting and engaging document which won’t be criticized too heavily by the all mighty anonymous reviewers. I only have one week until the deadline of 31st, and I have a lot of other stuff to do in the same period, so I’m getting a bit worried that I won’t be able to make it. But if I don’t make it in time, I can still submit it for another, non-Special Issue Journal, a few weeks later - with the negative side that the lack of a fixed, externally imposed deadline would reduce my motivation.

(why am I posting in my blog instead of working? I’m trying to amp myself into writing mode by sitting down and writing here instead of reading a dozen different news and getting anxious - like the news I just blogged about above :-P).

Remote CVS with :ext: protocol

Saturday, October 17th, 2009

For a while I have been wanting to access the CVS server in my laboratory intranet from home, but I never got around learning how to do that. Until today, that is. Here is the short version. First you make a tunnel to the CVS server through the gateway server:

$ CVS -f -L 10000:cvs:22 iba.t.u-tokyo.ac.jp -N

Then you edit .ssh/config to setup the ssh alias. Write the following in the file (create it if non-existant):

host cvsalias
hostname localhost
port 10000
username caranha

Finally you can connect, using ‘-d’ to override your normal CVS root configuration:

$ cvs -d :ext:caranha@cvsalias:/usr/local/home/cvs update

Some notes about the above:

  • It eluded me for a while that the tunnel command had to be done from the computer which you are accessing from,
    not the computer which will actually act as the “tunnel” - duh!
  • The -f and -N options in the ssh command allow for the SSH tunnel to keep running in the background, so you don’t have to keep a terminal window open.
  • For some bizarre reason you cannot tell CVS which port you want to use in the SSH connection when using the :ext: protocol. Even if you change the CVS_RSH variable to “ssh -p something” or create a shell alias, you’ll get an error - so you need to edit the ssh config file.
  • If for some reason you want to use the :pserver: protocol instead of :ext:, change the cvs:22 to cvs:2014 in the tunnel command line (and :ext: to :pserver: in the cvs command line, of course).
  • While I checked a bunch of websites until I got to the final solution above, this one also has all the steps needed (and a bunch of other information): http://www.cse.scitech.ac.uk/ccg/misc/cvs_remote.html
  • Another very useful site I found while googling this (not related only to CVS) is this small compilation of Unix hints and tricks: http://cb.vu/unixtoolbox.xhtml
  • Categories

  • Archives

  • Meta


  • "The secret of happiness is total disregard of everybody."
    Fortune file