SourceForge.net Logo
Summary
Forums
CVS
Download

Laird Breyer
Download
contents introduction tutorial spam fun man related
previous next

First steps

Okay, you've tried your first game against dbacl, and it wasn't very impressive. In fact, it was practically random play! Note that it isn't entirely random - dbacl doesn't pick for example a random pawn on first move but slightly prefers positions towards the middle of the board. What's going on?

There can be only one culprit, and it's the model we used for learning, namely the "-w 2" switch. To understand this, let's look at the game line again:

% cat test.gameline
e4 c5 Nf3 e6 d3 Nc6

Now dbacl learns by reading single words (ie half moves) and consecutive pairs of words, then building a model out of these frequencies. This means that there is nothing in the model which makes for example the third word Nf3 depend on the first one e4 except through the second one c5, which could well be anything. In other words, consecutive moves by one colour are largely independent, which is why it feels that dbacl has no strategy.

We can force dbacl instead to learn 3, or better yet 4 consecutive words as a pattern. That should link e4 with Nf3 and even e6. Let's try it (this could take a few minutes to run):

% ./dbacl/src/dbacl -T text -l ./BlackWinDraw -e alnum -L uniform \
  -j -w 4 -H 20 ./gamefiles/BlackWinDraw.txt
dbacl:warning: table full, some tokens ignored - try with option -h 21

Oh, oh. Here's a problem that we might as well get out of the way now. Looking at pairs, triples, etc. (these are called n-grams) uses a lot of memory because of all the possible combinations. That's one reason why long n-grams aren't that popular in machine classification. Here dbacl ran out of space and told us so, but still tried to learn something. But we don't want a skewed model, so we'll increase the allowable space and relearn. You will have to be mindful of this when you experiment.

% ./dbacl/src/dbacl -T text -l ./BlackWinDraw -e alnum -L uniform \
  -j -w 4 -H 22 ./gamefiles/BlackWinDraw.txt
% xboard -fcp ./dce-basic.sh
previous next
contents introduction tutorial spam fun man related