Ember - new UCI engine written on Rust

Discussion of chess software programming and technical issues.

Moderator: Ras

DreamerExx
Posts: 24
Joined: Wed May 20, 2026 4:08 pm
Full name: Даниил Крецу

Ember - new UCI engine written on Rust

Post by DreamerExx »

Introducing Ember — a new UCI chess engine in Rust

Hey everyone,

I've been working on a chess engine called Ember for a while now, and I think it's ready to show to the community. It's written entirely in Rust and speaks the UCI protocol.

What's inside so far:

Search:
- Negamax / Alpha-Beta / PVS
- LMR, Null Move Pruning (adaptive), IID
- Quiescence Search with SEE pruning & Delta pruning
- Transposition Table (always-replace)
- Move ordering: TT move, MVV-LVA captures, killer, counter-move, history
- Check extensions, Reverse Futility Pruning

Evaluation:
- PST (mg/eg) with tapered eval
- Mobility for N/B/R/Q
- Pawn structure (doubled, isolated, passed)
- King safety (attacks + pawn shelter)
- Bishop pair, rooks on open files
- Correction history

Other stuff:
- Zobrist hashing, repetition detection
- SEE, en passant, castling

Planned improvements (work in progress):
- Tuning the evaluation weights (Texel's tuning maybe)
- Lazy SMP for multi-threading
- Better time management
- Syzygy tablebase support
- Pondering

It's a pre-release — not super strong yet, there are bugs and things to polish. I'm building it mostly for learning and experimenting, but I'd love to get feedback and ideas.

Repo: https://github.com/ExxDreamerCode/Ember

If anyone wants to test it or has suggestions, I'd really appreciate it. Thanks! :wink:
DreamerExx
Posts: 24
Joined: Wed May 20, 2026 4:08 pm
Full name: Даниил Крецу

Re: Ember - new UCI engine written on Rust

Post by DreamerExx »

I tested Ember against Rustic alpha 3, and a very competitive game emerged. Both had chances. At one point, Ember had +3, but in the end, he didn't take a passed pawn into account. But then Rustic's problem surfaced: he couldn't checkmate with his rook and king, and it all ended in a draw.
[pgn][Event "Ember Test"]
[Site "?"]
[Date "2026.06.01"]
[Round "3"]
[White "Ember"]
[Black "Rustic alpha 3"]
[Result "1/2-1/2"]
[ECO "B01"]
[GameDuration "00:37:14"]
[GameEndTime "2026-06-01T14:40:35.016 RTZ 2 (зима)"]
[GameStartTime "2026-06-01T14:03:20.811 RTZ 2 (зима)"]
[Opening "Scandinavian (centre counter) defense"]
[PlyCount "310"]
[TimeControl "40/300"]

1. e4 {0.00/1 0s} d5 {-0.05/9 4.5s} 2. exd5 {+0.05/1 0s} Qxd5 {-0.05/9 4.1s}
3. Nc3 {-0.42/1 0s} Qe6+ {-0.05/8 4.6s} 4. Be2 {+0.74/14 7.7s}
Qg6 {-0.10/8 4.6s} 5. Bd3 {+1.19/13 7.7s} Qxg2 {0.00/8 4.7s}
6. Be4 {+0.84/16 7.7s} Qg5 {+0.30/9 4.4s} 7. Nd5 {+0.86/15 7.7s}
Qe5 {+0.25/9 4.5s} 8. d3 {+0.82/13 7.7s} Qd6 {+0.40/8 4.9s}
9. Nf3 {+0.90/12 7.7s} Nc6 {+0.43/7 4.9s} 10. d4 {+1.61/13 7.7s}
f5 {-0.45/8 4.1s} 11. Bf4 {+2.35/15 7.7s} e5 {-1.10/9 5.1s}
12. dxe5 {+2.29/13 7.7s} Qd8 {-0.88/8 5.1s} 13. e6 {+1.89/12 7.7s}
fxe4 {-1.10/9 5.2s} 14. Bxc7 {+2.99/13 7.7s} Qxd5 {-1.15/9 5.3s}
15. Qxd5 {+2.59/18 7.7s} exf3 {-1.40/9 5.3s} 16. O-O-O {+3.21/14 7.7s}
Nf6 {-1.55/8 5.5s} 17. Qxf3 {+3.09/12 7.7s} Be7 {-2.15/8 5.0s}
18. Bd6 {+3.20/13 7.7s} Bxd6 {-2.05/9 5.7s} 19. Rxd6 {+3.63/13 7.7s}
O-O {-2.15/9 5.8s} 20. Qe2 {+3.81/15 7.7s} Ne8 {-1.60/9 5.9s}
21. Rxc6 {+3.62/17 7.7s} bxc6 {-1.55/10 4.3s} 22. e7 {+4.62/16 7.7s}
Rf6 {-0.55/10 5.7s} 23. Qd2 {+2.73/12 7.7s} Kf7 {-0.30/8 6.3s}
24. Re1 {+1.62/11 7.7s} Re6 {+0.05/9 6.5s} 25. Rxe6 {+1.41/10 7.7s}
Bxe6 {+0.15/10 4.9s} 26. Qd8 {+0.74/13 7.7s} Rc8 {+0.60/10 6.9s}
27. Qa5 {+0.98/12 7.7s} Rc7 {+0.17/9 7.1s} 28. Qh5+ {+0.42/14 7.7s}
Kxe7 {+0.15/9 7.3s} 29. Qxh7 {+0.48/13 7.7s} Kd8 {+0.10/10 9.2s}
30. c4 {+0.64/12 7.7s} Nf6 {+0.25/10 10s} 31. Qh8+ {+0.59/13 7.7s}
Bg8 {+0.20/10 6.0s} 32. h4 {+1.05/16 7.7s} Ke8 {+0.30/11 6.6s}
33. h5 {+0.63/15 7.7s} Kf8 {+0.25/11 12s} 34. h6 {+1.67/13 7.7s}
Nh7 {+0.25/11 7.0s} 35. hxg7+ {+1.39/12 7.7s} Rxg7 {+0.20/10 13s}
36. Kd2 {+1.40/11 7.7s} Kf7 {+0.30/10 14s} 37. Kc3 {+1.41/12 7.7s}
c5 {+0.20/11 14s} 38. b3 {+1.38/11 7.7s} Rg5 {+0.20/11 8.2s}
39. Kd2 {+1.42/13 7.7s} Rf5 {+0.30/11 11s} 40. Ke2 {+1.56/12 7.7s}
Rf6 {+0.15/11 33s} 41. f4 {+1.46/12 7.5s} Re6+ {+0.26/9 4.6s}
42. Kd1 {+1.37/14 7.5s} Rd6+ {+0.25/10 3.7s} 43. Kc2 {+1.02/12 7.5s}
Rf6 {+0.20/10 4.7s} 44. Kb2 {+1.45/12 7.5s} a6 {+0.15/10 4.8s}
45. a4 {+1.24/12 7.5s} Rf5 {+0.15/10 4.8s} 46. Qc3 {+1.57/12 7.5s}
Nf8 {+0.10/10 4.5s} 47. Qa5 {+2.39/14 7.5s} Ne6 {+0.10/10 4.9s}
48. Qxa6 {+2.22/12 7.5s} Nxf4 {+0.05/9 5.0s} 49. a5 {+2.85/12 7.5s}
Kg7 {0.00/9 5.1s} 50. Kc2 {+2.56/11 7.5s} Bh7 {+0.10/9 5.1s}
51. Kd2 {+2.59/11 7.5s} Bg6 {+0.10/9 5.2s} 52. Qa7+ {+2.37/12 7.5s}
Kf6 {0.00/9 4.2s} 53. Qb8 {+2.81/12 7.5s} Re5 {+0.10/9 5.4s}
54. Kc3 {+2.32/9 7.5s} Re3+ {+0.20/9 4.5s} 55. Kb2 {+1.16/10 7.5s}
Nd3+ {+0.22/9 5.5s} 56. Ka3 {+1.15/11 7.5s} Re1 {+0.30/9 5.6s}
57. Qh8+ {+1.88/11 7.5s} Kf7 {+0.40/9 5.7s} 58. Ka4 {+1.14/12 7.5s}
Re6 {+0.37/9 5.8s} 59. Qc8 {+1.51/11 7.5s} Be4 {+0.25/9 5.9s}
60. a6 {+2.33/12 7.5s} Re8 {+0.20/9 4.5s} 61. Qg4 {+2.93/11 7.5s}
Re7 {+0.15/9 6.2s} 62. Qh3 {+2.85/11 7.5s} Ra7 {+0.15/9 6.4s}
63. Kb5 {+2.75/12 7.5s} Kf6 {0.00/10 6.5s} 64. Qh6+ {+3.06/11 7.5s}
Kf5 {0.00/9 6.7s} 65. Qh5+ {+3.42/10 7.5s} Kf4 {0.00/10 6.8s}
66. Qh4+ {+2.65/12 7.5s} Kf5 {0.00/9 7.0s} 67. Qh6 {+3.19/12 7.5s}
Rf7 {0.00/10 6.2s} 68. Qh5+ {+3.30/11 7.5s} Ke6 {0.00/10 7.5s}
69. Ka4 {+2.96/10 7.5s} Rh7 {+0.05/9 10s} 70. Qg4+ {+2.88/10 7.5s}
Ke5 {+0.10/10 8.0s} 71. Kb5 {+2.49/12 7.5s} Kd4 {0.00/10 5.8s}
72. Qg8 {+2.34/12 7.5s} Kc3 {0.00/10 6.0s} 73. Qe6 {+1.90/16 7.5s}
Kd4 {0.00/10 12s} 74. Qf6+ {+2.38/13 7.5s} Ke3 {0.00/10 13s}
75. Qg5+ {+2.48/12 7.5s} Kf3 {0.00/10 13s} 76. Qg1 {+2.59/12 7.5s}
Rh8 {+0.15/10 8.2s} 77. Qa1 {+2.34/12 7.5s} Rb8+ {+0.30/10 16s}
78. Ka4 {+1.14/11 7.5s} Rb4+ {+0.40/10 9.1s} 79. Ka5 {+1.67/14 7.5s}
Ke3 {+0.15/11 21s} 80. Qc3 {+2.12/12 7.5s} Rb8 {+0.05/12 18s}
81. a7 {+0.74/13 7.5s} Rb4 {+0.03/10 4.7s} 82. Qc2 {+1.04/13 7.5s}
Ba8 {0.00/11 4.2s} 83. Qb1 {+0.24/10 7.5s} Kd2 {0.00/11 4.4s}
84. Qg1 {0.00/12 7.5s} Bb7 {+0.20/10 4.8s} 85. Qg7 {+1.14/14 7.5s}
Rxb3 {+0.20/11 3.5s} 86. Qxb7 {+0.72/15 7.5s} Rxb7 {+0.35/11 5.0s}
87. a8=Q {+0.02/15 7.5s} Rb2 {+0.35/10 5.0s} 88. Qd8 {+0.73/13 7.5s}
Kc3 {+0.30/11 3.8s} 89. Qd5 {+0.89/13 7.5s} Rb4 {+0.30/11 4.3s}
90. Qg8 {0.00/12 7.5s} Rxc4 {+0.35/10 5.3s} 91. Kb5 {0.00/11 7.5s}
Rb4+ {+0.30/10 4.7s} 92. Ka6 {-0.21/9 7.5s} Re4 {+0.45/10 4.2s}
93. Kb6 {+0.18/13 7.5s} c4 {+0.50/9 5.5s} 94. Qa8 {0.00/11 7.5s}
Re6+ {+0.45/9 5.0s} 95. Kc7 {+0.50/11 7.5s} Kb3 {+0.40/9 5.7s}
96. Qd5 {+0.31/12 7.5s} Re2 {+0.45/9 5.8s} 97. Qf5 {+0.75/11 7.5s}
Re5 {+0.46/9 5.9s} 98. Qf3 {+0.40/11 7.5s} Kc2 {+0.45/10 6.0s}
99. Kb8 {-0.09/8 7.5s} c3 {+0.65/9 6.1s} 100. Kc8 {-0.88/9 7.5s}
Nc5 {+0.65/10 5.3s} 101. Qg3 {-1.22/11 7.5s} Re4 {+0.70/10 6.4s}
102. Qg8 {-1.53/9 7.5s} Kb2 {+0.85/10 4.4s} 103. Qd5 {-6.29/13 7.5s}
c2 {+5.20/11 6.8s} 104. Qxc5 {-7.61/13 7.5s} c1=Q {+5.60/12 5.5s}
105. Qxc1+ {-7.82/24 7.5s} Kxc1 {+6.25/17 7.2s} 106. Kd8 {-7.81/23 7.5s}
Kb2 {+M15/11 7.3s} 107. Kc7 {-M20/29 7.5s} Re2 {+M11/11 10s}
108. Kd8 {-M18/27 7.5s} Ka2 {+M13/11 10s} 109. Kc7 {-M22/28 7.5s}
Ka3 {+M9/12 10s} 110. Kd6 {-8.55/21 7.5s} Kb3 {+M15/12 6.3s}
111. Kd5 {-7.81/20 7.5s} Kc3 {+M13/12 11s} 112. Kc6 {-8.40/20 7.5s}
Kd3 {+M9/12 6.6s} 113. Kc5 {-8.55/18 7.5s} Re3 {+M11/12 10s}
114. Kd5 {-7.81/20 7.5s} Kc3 {+M13/12 7.3s} 115. Kc6 {-7.90/20 7.5s}
Kc4 {+M9/12 8.1s} 116. Kd6 {-M16/27 7.5s} Re1 {+M7/12 15s}
117. Kc6 {-M20/26 7.5s} Kd4 {+M7/12 12s} 118. Kd6 {-M22/27 7.5s}
Re4 {+M9/11 18s} 119. Kc6 {-M18/25 7.5s} Re3 {+M7/11 20s}
120. Kd6 {-M18/28 7.5s} Re1 {+M7/12 23s} 121. Kc6 {-M18/26 7.5s}
Rc1+ {+M7/10 4.6s} 122. Kd6 {-M28/25 7.5s} Rh1 {+M11/10 4.6s}
123. Ke6 {-8.11/20 7.5s} Rf1 {+M11/10 4.7s} 124. Kd6 {-M22/25 7.5s}
Rf2 {+M9/10 4.7s} 125. Ke6 {-8.55/20 7.5s} Rf3 {+M11/10 4.8s}
126. Kd7 {-M16/25 7.5s} Kd5 {+M7/10 4.8s} 127. Kc7 {-M14/26 7.5s}
Kc5 {+M7/10 4.1s} 128. Kd7 {-M16/28 7.5s} Re3 {+M9/10 5.0s}
129. Kc7 {-M12/29 7.5s} Kd5 {+M5/10 5.0s} 130. Kd7 {-M16/27 7.5s}
Rb3 {+M5/10 5.1s} 131. Kc7 {-M16/26 7.5s} Rb1 {+M7/10 5.2s}
132. Kd7 {-M14/28 7.5s} Rb2 {+M7/10 3.7s} 133. Kc7 {-M16/26 7.5s}
Rb3 {+M5/10 5.4s} 134. Kd7 {-M14/29 7.5s} Re3 {+M7/10 5.4s}
135. Kc7 {-M14/27 7.5s} Rg3 {+M7/10 5.5s} 136. Kb6 {-M14/27 7.5s}
Kc4 {+M5/10 5.6s} 137. Kc6 {-M14/28 7.5s} Rd3 {+M9/10 5.7s}
138. Kb6 {-M14/25 7.5s} Kb4 {+M7/10 5.8s} 139. Kc6 {-M12/29 7.5s}
Rd1 {+M11/11 4.1s} 140. Kb6 {-M12/26 7.5s} Kc4 {+M7/11 4.6s}
141. Kc6 {-M14/30 7.5s} Rd5 {+M7/11 4.6s} 142. Kb6 {-M10/29 7.5s}
Rd3 {+M7/10 6.4s} 143. Kc6 {-M14/26 7.5s} Rc3 {+M7/11 6.6s}
144. Kd6 {-M16/28 7.5s} Re3 {+M9/11 5.3s} 145. Kc6 {-M18/28 7.5s}
Re6+ {+M9/11 5.9s} 146. Kb7 {-M16/29 7.5s} Kd5 {+M7/11 6.6s}
147. Kc7 {-M14/28 7.5s} Rg6 {+M7/10 7.4s} 148. Kd7 {-M16/27 7.5s}
Rg4 {+M7/10 10s} 149. Ke7 {-M18/27 7.5s} Rf4 {+M9/10 10s}
150. Kd7 {-M14/28 7.5s} Rf2 {+M7/11 5.8s} 151. Kc7 {-M14/25 7.5s}
Rf8 {0.00/47 5.6s} 152. Kb6 {-M18/26 7.5s} Kd4 {0.00/125 1.1s}
153. Kc7 {-M16/27 7.5s} Rf2 {0.00/125 0.048s} 154. Kc6 {-M22/24 7.5s}
Rd2 {0.00/125 0.008s} 155. Kd6 {-8.11/20 7.5s}
Re2 {0.00/125 0.004s, Draw by fifty moves rule} 1/2-1/2[/pgn]
DreamerExx
Posts: 24
Joined: Wed May 20, 2026 4:08 pm
Full name: Даниил Крецу

Re: Ember - new UCI engine written on Rust

Post by DreamerExx »

After completely rewriting the board representation from arrays to bitboards, I ran a tournament, and it turned out to be a mixed bag :shock: :

Against Clovis 17 (2540), I had one draw and one loss, but what was most pleasing was that against Tuna (2505), my engine had one win and one loss. That's amazing. :D (EmberOld is the pre-bitboard version of the engine, 0.9.2, and I haven't yet published the version with bitboards.)

Image
ZirconiumX
Posts: 1364
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: Ember - new UCI engine written on Rust

Post by ZirconiumX »

You really can't draw any conclusions from a 26-game tournament. Some of those results show infinite elo differences.
tu ne cede malis, sed contra audentior ito
DreamerExx
Posts: 24
Joined: Wed May 20, 2026 4:08 pm
Full name: Даниил Крецу

Re: Ember - new UCI engine written on Rust

Post by DreamerExx »

Of course, I understand that, but I'm in the active development phase, and haven't had time to hold a proper tournament yet, other than minor tests. There's no point in testing the final product. Right now, I just need rough results that indicate my engine is at 1800-2000 CCRL ELO with a margin of error of +/- 100. Perhaps tomorrow I should take a break and hold a full-fledged 24-hour tournament to determine the ELO more accurately. :lol:
ZirconiumX
Posts: 1364
Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft

Re: Ember - new UCI engine written on Rust

Post by ZirconiumX »

No particular need for that. Just run a few thousand short time control games.

Also, I should mention that array ("mailbox") methods are coming back in vogue.
tu ne cede malis, sed contra audentior ito
DreamerExx
Posts: 24
Joined: Wed May 20, 2026 4:08 pm
Full name: Даниил Крецу

Re: Ember - new UCI engine written on Rust

Post by DreamerExx »

Bitboards will definitely be faster. Once a ready-made engine is created, I'll definitely launch a long-term tournament with thousands of games, but for now I don't see the need. :P