Friday, June 6, 2008

EX-TER-MI-NATE! U-NI-FI-CATE! (week 2 status report)

I'm sorry. The new season is going very strong, even without Daleks. Thinking about it, dalek-ai would also have been a cool and fitting name. But we're here to discuss other matters...

The goal for this week was to have a working constraint store implemented in Python. I got about 90% of that. I finished the representation of the constraints, variables and various Python terms. It is possible to parse a string like "pred(C,3,pred(C))" and match it with "pred('ab',3,A)". Variables will be bound correctly, impossible unifications will be detected, etc. This is a huge step forwards, I think: matching is central in the system I want and it was one of the more tricky things to get right. My notes of a course on AI I followed have helped me nicely here - never thought I'd have to implement the Martelli-Montanari algorithm but good thing I keep my notes :). I also added a whole load of testcases because I wasn't really sure about getting all of this right. I might have some regressions later on if I have to tweak the design, so I'll be able to notice and resolve that quickly with the tests. It seems unit testing fits into Python nicely, "batteries included" is a good selling point indeed.

So what I didn't implement was a fully working constraint store. Now, I don't think it'll be really hard to do, I just need to store a collections (a Python set should do) of those constraints and I should manage to get them out again by matching (which already works). However, I just didn't find the time anymore to actually implement it.

I have exams right now, and they're pretty much taking all my time from me. First time ever I'm actively exploiting the timing of my exam (whether it's before or after noon) in my schedule. Previous years I'd always take the rest of the day off, but that won't be possible this year... So I'm slowing down a bit on TP. Next week, I just plan to finish the constraint store. After next week, I should have a few days to work on TP (assuming I can keep myself awake), so I'll be doing a bit more, but right now, it's just not possible.

I've also improved the wiki page a bit. It now has some milestones and, perhaps more important, my current planning. I had to change it around a bit because I'll be spending more time on designing the rule engine and less time on individual rules. Which is all in all a good thing, as that should allow fairly rapid development of new AI variations. I'm sure you're all waiting for the epic battle of the Human and the 7 slightly-different-yet-indistinguishable AIs: Doc-AI, Grumpy-AI, Happy-AI, Sneezy-AI, Bashful-AI, Sleepy-AI, and Dopey-AI.

Actually, that might be cool.

No comments: