Page 1 of 6

Interfacing the Novag Citrine

Posted: Tue Oct 14, 2008 5:09 am
by sje
Interfacing the Novag Citrine:

I have managed to get a working connection between a Macintosh and the Novag Citrine. At the moment, most interaction is done manually.

For the physical connection, I have a Keyspan serial/USB adaptor model USA-19QW connected on the USB side to a USB port on the Mac and on the serial side connected to the DB-9 serial connector that came with the Citrine.

(Kudos to Keyspan for building an adapter that still works fine after nearly seven years of use. And even more kudos for continuing to provide timely and free driver software upgrades for both Mac and Windows platforms. If you need a serial/USB adapter, then these are the guys that you want.)

On the Mac side (also Unix/Linux), the manual command for initiating a connection is:

Code: Select all

cu -l /dev/cu.KeySerial1 -s 57600 -h
where /dev/cu.KeySerial1 is the line, 57600 is the bps speed, and the last option says "echo input". I haven't tried other speeds although I note that the Novag Super VIP, which uses a close if not identical protocol, tops out at 9,600 bps.

Once the Mac side is running, the Citrine is powered up (or reset). At this point it may take a couple of inputs to the cu program to get things running. The "I" (identification request) command is useful here. With my Citrine, the "I" command produces:

Code: Select all

ID. UCBII V1.09
which I guess that the UCB means "Universal Chess Board" and the version is nine revisions past the first release.

The protocol doesn't use SAN or FEN and is a bit inconsistent with its coordinate algebraic with most moves in the "e2-e4" / "d5xe4" format but with castling using O-O or O-O-O.

Board display:

Code: Select all

Position Board
.  aa bb cc dd ee ff gg hh
.8 br bn bb bq bk bb bn br 8
.7 bp bp bp bp bp bp bp bp 7
.6    ::    ::    ::    :: 6
.5 ::    ::    ::    ::    5
.4    ::    ::    ::    :: 4
.3 ::    ::    ::    ::    3
.2 WP WP WP WP WP WP WP WP 2
.1 WR WN WB WQ WK WB WN WR 1+
.  aa bb cc dd ee ff gg hh
Some moves, as they are played:

Code: Select all

M   1   e2-e4
M   1,  c7-c6
M   2   d2-d4
M   2,  d7-d5
M   3   e4xd5
M   3,  c6xd5
M   4   c2-c4
M   4,  g8-f6
M   5   b1-c3
M   5,  e7-e6
M   6   g1-f3
M   6,  f8-e7
M   7   c4xd5
M   7,  f6xd5
M   8   f1-d3
M   8,  b8-c6
M   9   O-O
M   9,  O-O
M  10   f1-e1
M  10,  e7-f6
More to come.

Sample Novag Citrine game output

Posted: Tue Oct 14, 2008 6:52 am
by sje
Sample Novag Citrine game output from a game/1 hour autoplay session:

Code: Select all

M   1   d2-d4
M   1,  g8-f6
M   2   c2-c4
M   2,  e7-e6
M   3   g1-f3
M   3,  b7-b6
M   4   a2-a3
M   4,  c8-b7
M   5   b1-c3
M   5,  d7-d5
M   6   c4xd5
M   6,  f6xd5
M   7   d1-c2
M   7,  d5xc3
M   8   b2xc3
M   8,  d8-d5
M   9   e2-e3
M   9,  b8-d7
M  10   f1-d3
M  10,  d7-f6
M  11   c3-c4
M  11,  d5-h5
M  12   c2-a4
M  12,  e8-d8
M  13   d3-e2
M  13,  h5-g4
M  14   h1-g1
M  14,  d8-e7
M  15   c1-d2
M  15,  g4-h5
M  16   d2-b4
M  16,  c7-c5
M  17   g2-g4
M  17,  h5-g6
M  18   f3-e5
M  18,  g6-g5
M  19   a4-b5
M  19,  a8-c8
M  20   d4xc5
M  20,  a7-a5
M#6
M  21   c5-c6
M  21,  a5xb4
M  22   c6xb7
M  22,  c8-c5
M  23   e5-c6
M  23,  e7-d7
M  24   c6-e5
M  24,  d7-e7
M  25   e5-c6
M  25,  e7-d7
M  26   b7-b8/Q
M  26,  c5xb5
M  27   b8-d8
M  27,  d7xc6
M  28   c4xb5
M  28,  g5xb5
M  29   d8-c8
M  29,  c6-d6
M  30   e2xb5
M  30,  f6-d5
M  31   f2-f4
M  31,  b4xa3
M  32   c8-d7
M  32,  d6-c5
M  33   d7-c6
M  33,  c5-b4
M  34   c6-c4
M  34,  b4-a5
M  35   c4-a4
M#5
I do not know what the "M#6" and "M#5" outputs mean.

In SAN, courtesy of the CIL Toolkit:

Code: Select all

1. d4 Nf6 2. c4 e6 3. Nf3 b6 4. a3 Bb7 5. Nc3 d5 6. cxd5 Nxd5 7. Qc2 Nxc3 8.
bxc3 Qd5 9. e3 Nd7 10. Bd3 Nf6 11. c4 Qh5 12. Qa4+ Kd8 13. Be2 Qg4 14. Rg1 Ke7
15. Bd2 Qh5 16. Bb4+ c5 17. g4 Qg6 18. Ne5 Qg5 19. Qb5 Rc8 20. dxc5 a5 21. c6+
axb4 22. cxb7 Rc5 23. Nc6+ Kd7 24. Ne5+ Ke7 25. Nc6+ Kd7 26. b8=Q Rxb5 27. Qd8+
Kxc6 28. cxb5+ Qxb5 29. Qc8+ Kd6 30. Bxb5 Nd5 31. f4 bxa3 32. Qd7+ Kc5 33. Qc6+
Kb4 34. Qc4+ Ka5 35. Qa4# 1-0
Final position:
[D]5b1r/5ppp/1p2p3/kB1n4/Q4PP1/p3P3/7P/R3K1R1 b Q - 7 35

Another autoplay game at game/3 minutes

Posted: Tue Oct 14, 2008 8:11 am
by sje
Another autoplay game at game/3 minutes:

Code: Select all

1. e4 d5 2. exd5 Nf6 3. d4 Nxd5 4. c4 Nb6 5. Nf3 Bg4 6. Be2 e6 7. O-O Nc6 8. b3
Bxf3 9. Bxf3 Nxd4 10. Bxb7 Rb8 11. Be3 Rxb7 12. Qxd4 Qxd4 13. Bxd4 c5 14. Bc3
f6 15. Rd1 Rd7 16. Rxd7 Kxd7 17. Na3 Be7 18. Rd1+ Kc6 19. Re1 Kd7 20. f3 Rd8
21. Kf2 a6 22. Ba5 Rb8 23. Bc3 Bd6 24. Ke3 Kc6 25. Rd1 Rd8 26. Rd2 Nd7 27. g3
Bc7 28. Nc2 a5 29. a3 Rb8 30. b4 Nb6 31. b5+ Kb7 32. Kf2 Nxc4 33. Rd7 Rg8 34.
Re7 a4 35. Rxe6 Nd6 36. Re7 Nxb5 37. Ba5 Kc6 38. Bxc7 Nxc7 39. Ne3 Nb5 40. Re6+
Kd7 41. Ra6 Nc3 42. Ra7+ Ke6 43. Rc7 Kd6 44. Rxg7 Rxg7 45. Nf5+ Ke6 46. Nxg7+
Kf7 47. Nf5 Nb5 48. Nh6+ Ke6 49. Ke3 Nxa3 50. Kd3 Nb5 51. Kc4 a3 52. Kb3 c4+
53. Ka2 f5 54. Ng8 Nd4 55. Nh6 Nb5 56. Ng8 Nd4 57. Nh6 Nc2 58. h3 Kf6 59. h4
Kg6 60. Ng8 Kf7 61. Nh6+ Kg6 62. Ng8 Kg7 63. Ne7 Kf6 64. Nd5+ Ke5 65. Nc3 Kd4
66. Nb5+ Ke3 67. Kb1 Kd3 68. Ka2 c3 69. Nxa3 Nxa3 70. Kxa3 c2 71. Kb2 Kd2 72.
g4 c1=Q+ 73. Kb3 Qc3+ 74. Ka4 fxg4 75. fxg4 Qc4+ 76. Ka5 Qxg4 77. Kb5 Qxh4 78.
Kc5 Qg5+ 79. Kd4 Qf4+ 80. Kd5 Qg5+ 81. Kd4 Qf5 82. Kc4 Ke3 83. Kc3 Qe5+ 84. Kc4
h5 85. Kb3 Qd5+ 86. Kc3 Qe5+ 87. Kc4 Qe4+ 88. Kc5 h4 89. Kd6 Qd4+ 90. Ke6 Qe4+
91. Kf6 Qd4+ 92. Ke6 h3 93. Kf5 h2 94. Ke6 h1=Q 95. Kf5 Qh7+ 96. Ke6 Qhd7# 0-1
[D]8/3q4/4K3/8/3q4/4k3/8/8 w - - 4 97

Re: Sample Novag Citrine game output

Posted: Tue Oct 14, 2008 8:23 am
by sje
sje wrote:I do not know what the "M#6" and "M#5" outputs mean.
After further review,

M#5 = Message number 5 = "checkmate"
M#6 = Message number 6 = "resign"

I'll guess that the other messages include various draw conditions.

Re: Sample Novag Citrine game output

Posted: Tue Oct 14, 2008 10:32 am
by sje
sje wrote:After further review,

M#5 = Message number 5 = "checkmate"
M#6 = Message number 6 = "resign"

I'll guess that the other messages include various draw conditions.
M#3 = Message number 3 = "draw by insufficient mating material"
M#4 = Message number 4 = "draw by stalemate"

Re: Sample Novag Citrine game output

Posted: Tue Oct 14, 2008 10:57 am
by sje
sje wrote:
sje wrote:After further review,

M#5 = Message number 5 = "checkmate"
M#6 = Message number 6 = "resign"

I'll guess that the other messages include various draw conditions.
M#3 = Message number 3 = "draw by insufficient mating material"
M#4 = Message number 4 = "draw by stalemate"
A bit more work shows:

M#1 = Message number 1 = "draw by repetition"
M#2 = Message number 2 = "draw by 50 move rule"

If a repetition draw and a 50 move draw occur simultaneously, only the latter is announced.

Re: Interfacing the Novag Citrine

Posted: Tue Oct 14, 2008 11:27 am
by AdminX
Good work Steven ... 8-)

Re: Interfacing the Novag Citrine

Posted: Tue Oct 14, 2008 2:25 pm
by sje
Thanks.

I've also located the undocumented "J" command that tells the Citrine to start searching for a move. I don't think there are any more secrets to be discovered.

----

No response yet from FICS on getting an account for the Citrine.

----

The Citrine is actually kind of fun to play, even for a fish like me who has to use the easy levels. Not too much playing time is needed to become acclimated to the piece capture movement implementation. The auto sensory experience is to me far superior to square tapping, and I think this is more of a deciding factor than just having wood pieces or a "wooden" decal board.

Novag advertises the Citrine's strength at 2330 elo but its experiences with Symbolic show that Steve B's number of 2048 elo as being rather more accurate. Then again, the latter figure is measured versus computer opponents; perhaps a higher figure is called for when playing against human adversaries.

My Cookie Cat is quite unhappy with this new competitor for my attention. I keep the pieces safely bagged when not in use so they might escape her nocturnal predations.

Re: Another autoplay game at game/3 minutes

Posted: Tue Oct 14, 2008 7:07 pm
by CRoberson
Steven,

When you say autoplay - do you mean that it will play symbolic
without having to move pieces on the wooden board.

Also, I agree. Autosensory is great. It is a huge improvement over
pressure sensory when I compare playing my Fidelity Elite A/S as opposed
to playing my Fidelity Excellence.

Re: Another autoplay game at game/3 minutes

Posted: Tue Oct 14, 2008 7:29 pm
by sje
CRoberson wrote:When you say autoplay - do you mean that it will play symbolic
without having to move pieces on the wooden board.
First, I haven't gotten xboard to talk to the Citrine -- yet.

However, manual testing shows that the pieces on the board do not have to be moved when controlling the Citrine over the serial link. The obvious exception is when using referee mode.

Furthermore, the Citrine can be set to run in Auto or Demo mode where it plays against itself without the need for moving the pieces. The last game played can be retrieved over the interface. Well, at least the last 112 ply can be retrieved.

Sadly, the "S" (show running information) command implemented in some Novag models does not work. The Citrine LCD module shows this data, but it can't be accessed over the serial link.