------_extPart_001_01C60B0F.E9EE2070
Content-Type: text/plain;
	charsetS-ASCII"
Content-Transfer-Encoding: quoted-printable

I thought I'd try to knock out a robot real quick, but I ran out of
time.  There seems to be a fairly large flaw somewhere in my predictive
aiming logic.  But the rest of the robot is pretty nice, so I thought
I'd submit it anyway...

    - Warren Brown


------_extPart_001_01C60B0F.E9EE2070
Content-Type: application/octet-stream;
	nameKB.rb"
Content-Transfer-Encoding: base64
Content-Description: WKB.rb
Content-Disposition: attachment;
	filenameKB.rb"

cmVxdWlyZSAncm9ib3QnDQoNCmNsYXNzIFdLQg0KICBpbmNsdWRlIFJvYm90DQoNCiAgIyBDb25z
dGFudHMNCiAgaWYgIXNlbGYuY29uc3RfZGVmaW5lZD8oOkZJUkVfTUlOKQ0KICAgIEZJUkVfTUlO
LCBGSVJFX01BWCA9IDAsIDMNCiAgICBUVVJOX01JTiwgVFVSTl9NQVggPSAtMTAsIDEwDQogICAg
VFVSTl9HVU5fTUlOLCBUVVJOX0dVTl9NQVggPSAtMzAsIDMwDQogICAgVFVSTl9SQURBUl9NSU4s
IFRVUk5fUkFEQVJfTUFYID0gLTYwLCA2MA0KICAgIEFDQ0VMRVJBVEVfTUlOLCBBQ0NFTEVSQVRF
X01BWCA9IC0xLCAxDQogICAgQlVMTEVUX1RJTUVfRU5FUkdZX1JBVElPID0gMC4zDQogICAgV0FM
TF9QUk9YSU1JVFkgPSAyMDANCiAgZW5kDQoNCiAgIyBIZWFkaW5nIGNsYXNzIC0gSG9sZHMgYW4g
YW5nbGUgdmFsdWUgdG8gbW9kdWxvIDM2MA0KICBjbGFzcyBIZWFkaW5nDQogICAgYXR0cl9yZWFk
ZXIgOnZhbHVlDQogICAgZGVmIGluaXRpYWxpemUodmFsdWUpOyBzZWxmLnZhbHVlID0gdmFsdWU7
IGVuZA0KICAgIGRlZiB2YWx1ZT0obmV3X3ZhbHVlKTsgQHZhbHVlID0gbmV3X3ZhbHVlICUgMzYw
OyBlbmQNCiAgICBkZWYgdG9f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