GlyphChess War Stories
- A major reason for GlyphChess development was that it was
really quiet at work over the holidays and I had a broken leg so
I couldn't go skiing.
- The first version of GlyphChess was developed within a
single uninterrupted day (and night). It consisted of a few
crude shell scripts and was really hacked together. Board
scans were somewhat unreliable and took several seconds, as it
was doing thousands of program executions per scan.
- The C program that replaced those scripts is about 600 lines
of code and can execute before the scan bar has had time to
return to the home position. It consists mainly of a set of
calls to a math library and the DataGlyph toolkit, plus the
chess piece logic. Interaction with the chess engine is still
scripted. Board readout is quite reliable.
- I noticed that the linear programming library lp_solve was
slightly out of date and also slightly mispackaged in the
Debian Linux distribution. I filed two bugs on Jan 6, 2003,
and the maintainer had them both fixed by Jan 12,
2003. Shortly thereafter, I dumped lp_solve for a linear least
squares routine in Numerical Python.
- Several changes were made to the DataGlyph Toolkit. As
expected, now every detected glyph mark reports both its
logical and pixel position. An unexpected change was modifying
the address carpet decode algorithm. Address voting now
requires a quorum, which helps when you have a circular
capture window such as the base of a chess piece. Several
minor bugs were encountered in the toolkit while developing
GlyphChess. They were filed and then fixed or worked around.
- I originally marked the pieces with GlyphTones matching the
piece itself. That went away as I kept tweaking things to
improve reliability, as our cell size and angular detection
modules were being stressed out. Switching to the serpentone
detectors produced better results, so GlyphTones were
re-introduced.
- I was hoping for incredible extrapolated registration
results, perhaps down to pixel level accuracy. That didn't
happen, although there was more than enough accuracy for
GlyphChess. Further investigation revealed accuracy scales
dramatically with scan resolution. Scans at 400 dpi have
significantly less registration error than 200 dpi scans.
- The project plan consisted of a simple diagram of possible
improvements, and was drawn up the day after the initial hacked
version of GlyphChess was written. Tasks were tackled on an as
needed basis until I was satisfied that the system worked well
enough for demonstration. I have since lost the sheet of
paper. Eventually that process degraded into simply doing a
ton of scans and then analyzing any problems that were
encountered.
- I lost the black king, so I substituted a random object that
was lying around with the appropriate DataGlyph attached to the
bottom. Works like a charm.
- Thank goodness there wasn't a robot arm laying around
nearby, or I would probably still be working on the robot arm
variant, complete with knocking the pieces on the floor as a
sore loser.
- GlyphChess is a surprisingly fun demo. I really enjoy
physically setting up a position on the board and letting the
computer chess engine duke it out on screen. I wish my desktop
scanner was a little bigger.
- The crafty chess engine has a machine learning
capability. As described in the manual, "Currently this
is a 3-bit boolean switch, bit 1 (001) controls book
learning, bit 2 (010) controls position learning, and
bit 3 (100) controls result learning." With the 1983
movie WarGames in mind, I ran
GlyphChess overnight to see if it would evolve into a
superhuman AI intent on conquering the world. As I
cautiously entered my office the next day, I discovered
that the computer had spent the entire time learning more
about chess and was as fixated on the game as ever.
|
|
|
|---|