Monday, May 26, 2008

Official start

I suppose I'm the 501st person to use this title, but hey... Can't stress it enough. Summer of Code has officially started.

Since the last post ("last week" is not really correct here) I didn't really do a lot for SoC. I had two deadlines for big projects at school, including one were we worked on for 24 hours straight. That's 24h in the pc labs, see the sun set and rise again, watching those that left the labs the day before come back in, cursing at UML modeling tools that won't listen and team members who won't listen either, ... I'm still a bit frustrated about it all, it seems. But the project was done in time, classes have ended, and there is time for SoC now.

I had a look at libtpclient-py and I'm still not entirely sure what to make from it, but I suppose that will follow quickly enough.

I've been thinking about the design. It's still a bit rough, but I feel I'm on to something. The basic idea for the driving force behind the AI would be a CHR-like production rule system, coupled with an initialization (state -> contraint store) and a finalization phase (constraint store -> orders) each turn. I'm currently musing on how to represent storage in the working memory between turns to allow multi-turn strategies to work out. I had two things in mind: either labeling certain predicates as being temporary and prune them during finalization, or creating a second (permanent) storage that will be added to the constraint store during initialization. The first one seems nicer but might be impractical to work with, I've got to think a bit more about that.

The big advantage to this system is that it would completely decouple the search algorithm from the data, and split the data (in as far as you can call a set of rules data) in "ruleset data" and "strategy data". Thus, the system can be reused by different rulesets if someone provides useful initialization/finalization code, and the same init/finalize code can be used by multiple AIs who differ in their rule database.

Next week: a working client, a finalized design for the rule engine.

Oh, and I got the gift. The package had arrived a long time ago, but it's the first time in 2 weeks I went home. It certainly looks like an interesting read, thank you Google!

Thursday, May 15, 2008

Debian and other fun

First, in case you use Debian, Ubuntu, *buntu, or any other Debian derivate make sure you have secure keys. See http://lists.debian.org/debian-security-announce/2008/msg00152.html for more information.

Today, I had to read that and regenerate my keys. Coincidentally, I'm currently studying how all this stuff works in our course of "discrete maths". I found it to be quite shocking that something as important as OpenSSL (or to be more precise, the Debian variety of OpenSSL) had a security flaw for 2 years. Considering the recent uptake of Ubuntu, it might mean that a million of people are vulnerable right now. Granted, most normal people don't use DSA, but from the SoC students of last and this year, for example, there might be a lot of victims. Big ouch.

In more positive news, a friend of mine had a recommendation for Python learners and masters: The Python Challenge. A notpron kind of thing were every step has to be solved with Python. Have fun.

Monday, May 12, 2008

It seems like I'm the main (if not only) blogger here, so I'll utilize this little piece of Internet to report about my Summer of Code experiences.

Well, I'll do that when I have them. For now, I'm still hard at work for school and that's likely to remain for the next 1.5 months. However, since SoC starts in a few weeks, I'll have to start the careful balancing act of combining two stressful attention-craving things. Yikes!

So, what HAVE I done until now?

We (my mentor nash and I) have decided on a name for the project. It's going to be "daneel-ai", named after the famous robotic rule-based decision maker. I don't foresee my AI saving mankind, but it would be a nice side-effect.

I've been reading about Git, managed to make a local repository and made my first push to the central server, then forgot everything about it. It just doesn't stick around in my brain. I suppose this will be better when I have to use Git daily, for now, I still like SVN more. The power of a familiar environment.

Finally, I've started Python study, working my way through Dive Into Python. Currently around page 100. I'm still a bit unconvinced. I swear by object-oriented principles for any project that is bigger than a few hundred lines of code, and Python doesn't seem very elegant for OOP. Handling self all the time, no protected methods, ... On the other hand, lambdas and list comprehensions are lovely, but (as minor nitpick) I don't like the "for ... in" syntax. In Haskell, you can clearly make the separation between variables (which are alphanumerics) and syntax (which is basically | and <-). In Python, it's all words, often all lowercase. I don't find that to be promoting readability. But all in all, I suppose it's one of the least bad languages we have...

Anyone know a decent Linux IDE for Python? I couldn't get PyDev for Eclipse to install - it freezes when I input the environment info. Any others?