Sunday, February 22, 2009

Lost Among The Trees

I've been taking some time off of chess, partly since I've had two consecutive bye weeks in the Club Championship Qualifier. My Pocket PC lacks a Scrabble anagrammer so I've been trying to write one of my own. The one I wrote in SQL Compact Edition is ok, but it chokes on the wildcard searches, taking about 150 seconds to return the anagrams. I ran across a neat data structure called a DAWG - Directed Acyclic Word Graph which seems to be an optimization of searching the dictionary. A guy named Sam Allen wrote a blazing fast anagrammer that I wished to emulate, so I've been building and scrapping data structures, testing and debugging algorithms. The DAWG is a bit like Kotov's tree of analysis in that there is a starting position with branches for every possible node and branches from there outward to an exponentially increasing number of nodes. What's interesting about the DAWG is that it is almost within the human brain's ability to grasp the magnitude. Words in Scrabble range from 2 to 15 letters and can only end on one of 26 letters, so the DAWG converges on itself like a gigantic geodesic lemon, tapered at two ends. The analogous structures in chess are that the opening diverges and the tablebases converge upon checkmate.

I started reading "Word Freak". In one chapter, the author quotes Joe Edley, many-times Scrabble champion, basically saying that winning takes concentration on winning; everything else is extraneous. I probably quoted this once before, but in "Stand and Deliver", Edward James Olmos tells the kids in his math class that "You got to have the ganas." Perhaps I'm getting old. Perhaps sitting on my rating floor is getting to be too comfortable. But I'm finding that my priority is shifting to having a good time rather than winning. Do I really want to win the club championship? It should be a rhetorical question answered with an emphatic yes, but somehow it's not. Continental Chess Association is running the new Western Chess Congress tournament in the East Bay within a couple weeks of the Far West Open. Chess is coming to my doorstep, yet I don't think I'll play in either tournament, not because of a lack of funds or time, but I just can't psych up for the battle.

On Facebook, my brother-in-law got me hooked on a silly pseudo-adventure game called Dragon Wars. There is the gaming aspect of beating up AI monsters and taking their treasure, but there is also an aspect where you match up with other Dragon Wars players and battle for glory and treasure. I enjoyed seeing the new monster quests, but when other players beat up my character, I only got slightly annoyed. There is a small voice that wants to be vindictive as the game seems to engender, but so far I haven't succumbed to the dark side of the force.

I've been helping direct some scholastic tournaments. It's funny watching children struggle to manage board, pieces, clock, scoresheet and rules. Sometimes, kids forget to punch the clock and end up taking two turns in a row because they think that the clock button being up means it's their turn again and nobody is paying attention to what's actually moving on the board. Many mates in 1 are missed. Kids' technique often requires an extra queen and rook for mating material. It's only been two tournaments and I've seen kids come back from being down a rook and a knight, queening a pawn because the opponent got careless, and winning the game. I've seen kids stalemate with two extra queens, a rook, and a knight against a bare king. The players barely know how to call touch move let alone illegal moves. 50-move draws and three-time repetitions are never claimed, but they could be useful because I've seen players just keep checking with their queens, leaving their extra pieces at home. We have an extra rule that checkmate and stalemate must be verified. One team had the match in the bag until one player proposed a draw with an extra queen because he was afraid he'd screw up. They ended up losing the playoff. One child burst into tears for the last ten minutes of the game and just let his time run out. I thought of Tom Hanks yelling "There's no crying in baseball!" in "A League Of Their Own". All in all an entertaining new dimension to chess.

Lest you get the wrong idea, it's not that my main reason for directing kids' tournaments is seeing all the errors. It's refreshing to see children in their naive states before the years of frustrating plateaus squeeze all the ganas out of them. The parents have been surprisingly free of any craziness so far.

Well, back to my DAWG. If I could just figure out the algorithm for an iterative node depth counter...

1 comment:

Wahrheit said...

You need to watch Austin Powers and get your mojo back. :)