Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

namanthanki
Posts: 10
Joined: Wed Mar 04, 2026 12:39 pm
Full name: Naman Thanki

Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Post by namanthanki »

Hi all, I've just tagged v1.4.1 of Chal

v1.4.1 is estimated at ~2750 Elo, +50 Elo improvement over v1.4.0 (~2700 Elo). The gains came from eval tuning by Gediminas Masaitis - this release straight up wouldn't exist without him.

It's been more than 3 weeks since the last release. I've been trying to figure out how to move forward without compromising what makes Chal what it is. I'm a little worried it'll be a long time before the next release.

GitHub: https://github.com/namanthanki/chal/releases/tag/1.4.1

Thank you for everyone's support.
~Naman.
User avatar
Roland Chastain
Posts: 703
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Post by Roland Chastain »

The source code looks very nice. And I like the idea. Will test it and take a closer look to it ASAP.

By the way, here (on Linux) I had to add -lm to compile the program.
Qui trop embrasse mal étreint.

Author of Eschecs, a simple UCI chess GUI written in Pascal.
User avatar
AdminX
Posts: 6396
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Post by AdminX »

namanthanki wrote: Sun Apr 26, 2026 11:36 am Hi all, I've just tagged v1.4.1 of Chal

v1.4.1 is estimated at ~2750 Elo, +50 Elo improvement over v1.4.0 (~2700 Elo). The gains came from eval tuning by Gediminas Masaitis - this release straight up wouldn't exist without him.

It's been more than 3 weeks since the last release. I've been trying to figure out how to move forward without compromising what makes Chal what it is. I'm a little worried it'll be a long time before the next release.

GitHub: https://github.com/namanthanki/chal/releases/tag/1.4.1

Thank you for everyone's support.
~Naman.
Hi Naman,

You should be proud of your work here. It plays quite well given the parameters you set for yourself. I also had to use the "-lm" option to compile for Linux.

Thank You! :D
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
User avatar
AdminX
Posts: 6396
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Post by AdminX »

[pgn]
[Event "Engine Match"]
[Site "En Croissant"]
[Date "2026.04.28"]
[Round "?"]
[White "Facon 1.4 - Hoja"]
[Black "Chal 1.4.1"]
[Result "1/2-1/2"]
[Orientation "white"]
[TimeControl "900"]

1. e4 {[%clk 0:15:00] } e5 {[%clk 0:15:00] } 2. Nf3 {[%clk 0:15:00] } Nc6 {[%clk 0:15:00] } 3. Bc4 {[%clk 0:15:00] } Bc5 {[%clk 0:15:00] } 4. c3 {[%clk 0:15:00] } Bb6 {[%clk 0:15:00] } 5. Bb3 {[%clk 0:15:00] } Nf6 {[%clk 0:15:00] } 6. d3 {[%clk 0:15:00] } d5 {[%clk 0:15:00] } 7. exd5 {[%clk 0:15:00] } Nxd5 {[%clk 0:15:00] } 8. O-O {[%clk 0:15:00] } O-O {[%clk 0:15:00] } 9. Na3 {[%clk 0:15:00] } Kh8 {[%clk 0:15:00] } 10. Nc4 {[%clk 0:15:00] } f6 {[%clk 0:15:00] } 11. Nxb6 {[%clk 0:15:00] } axb6 {[%clk 0:15:00] } 12. h3 {[%clk 0:15:00] } Na5 {[%clk 0:14:19.444] } 13. Bc2 {[%clk 0:15:00] } c5 {[%clk 0:13:47.507] } 14. d4 {[%clk 0:14:31.21] } exd4 {[%clk 0:13:05.502] } 15. cxd4 {[%clk 0:14:06.435] } Nb4 {[%clk 0:12:36.224] } 16. Be3 {[%clk 0:13:48.745] } Nc4 {[%clk 0:11:57.824] } 17. Bb3 {[%clk 0:12:49.185] } Nxe3 {[%clk 0:11:39.423] } 18. fxe3 {[%clk 0:12:21.768] } Re8 {[%clk 0:11:17.22] } 19. Qd2 {[%clk 0:12:00.51] } Be6 {[%clk 0:10:55.835] } 20. Bxe6 {[%clk 0:11:30.369] } Rxe6 {[%clk 0:10:28.522] } 21. a3 {[%clk 0:11:13.149] } Nd5 {[%clk 0:10:04.303] } 22. Rfe1 {[%clk 0:11:00.74] } Qe7 {[%clk 0:09:47.791] } 23. dxc5 {[%clk 0:10:29.178] } Rd8 {[%clk 0:09:31.882] } 24. cxb6 {[%clk 0:10:03.84] } Nxb6 {[%clk 0:09:14.892] } 25. Qe2 {[%clk 0:09:20.471] } Nd5 {[%clk 0:08:53.145] } 26. Rad1 {[%clk 0:09:06.676] } Rxe3 {[%clk 0:08:34.461] } 27. Qb5 {[%clk 0:08:41.326] } b6 {[%clk 0:08:20.922] } 28. Rf1 {[%clk 0:08:32.731] } Nf4 {[%clk 0:07:55.521] } 29. Qxb6 {[%clk 0:08:06.481] } Re8 {[%clk 0:07:31.423] } 30. Rf2 {[%clk 0:07:53.745] } Ne2+ {[%clk 0:07:15.286] } 31. Kh2 {[%clk 0:07:35.651] } Re6 {[%clk 0:07:01.454] } 32. Qa5 {[%clk 0:07:11.395] } Re4 {[%clk 0:06:48.679] } 33. Rd5 {[%clk 0:06:56.495] } Nf4 {[%clk 0:06:27.869] } 34. Rdd2 {[%clk 0:06:26.614] } Re3 {[%clk 0:06:15.456] } 35. Qb5 {[%clk 0:06:16.71] } Rd8 {[%clk 0:05:56.365] } 36. Rxd8+ {[%clk 0:06:06.879] } Qxd8 {[%clk 0:05:38.209] } 37. Rc2 {[%clk 0:05:58.137] } h6 {[%clk 0:05:28.746] } 38. Qf5 {[%clk 0:05:35.913] } Ne6 {[%clk 0:05:14.507] } 39. Rc6 {[%clk 0:05:29.937] } Qd7 {[%clk 0:05:00.714] } 40. Nh4 {[%clk 0:05:06.288] } Kg8 {[%clk 0:04:47.759] } 41. Qc2 {[%clk 0:04:44.343] } Kf7 {[%clk 0:04:37.43] } 42. Nf5 {[%clk 0:04:38.408] } Rd3 {[%clk 0:04:29.5] } 43. Nxg7 {[%clk 0:04:30.685] } Kxg7 {[%clk 0:04:22.011] } 44. Rxe6 {[%clk 0:04:21.908] } Rxh3+ {[%clk 0:04:08.847] } 45. gxh3 {[%clk 0:04:13.921] } Qxe6 {[%clk 0:03:59.905] } 46. Qc3 {[%clk 0:03:55.748] } Qf5 {[%clk 0:03:47.748] } 47. Qd2 {[%clk 0:03:43.856] } Qe5+ {[%clk 0:03:36.134] } 48. Kg2 {[%clk 0:03:39.632] } Qe4+ {[%clk 0:03:30.39] } 49. Kg1 {[%clk 0:03:30.056] } Qe5 {[%clk 0:03:22.09] } 50. Qc3 {[%clk 0:03:18.944] } Qe2 {[%clk 0:03:15.863] } 51. b3 {[%clk 0:03:04.723] } h5 {[%clk 0:03:05.932] } 52. a4 {[%clk 0:02:58.461] } Kg6 {[%clk 0:03:00.054] } 53. Qc4 {[%clk 0:02:52.339] } Qf3 {[%clk 0:02:50.924] } 54. Qg8+ {[%clk 0:02:40.037] } Kh6 {[%clk 0:02:42.244] } 55. Kh2 {[%clk 0:02:28.621] } Qe2+ {[%clk 0:02:36.749] } 56. Qg2 {[%clk 0:02:24.36] } Qe5+ {[%clk 0:02:28.762] } 57. Qg3 {[%clk 0:02:14.442] } Qe2+ {[%clk 0:02:21.171] } 58. Kg1 {[%clk 0:02:06.727] } Qd1+ {[%clk 0:02:13.99] } 59. Kg2 {[%clk 0:01:57.709] } Qd2+ {[%clk 0:02:10.571] } 60. Qf2 {[%clk 0:01:53.61] } Qg5+ {[%clk 0:02:06.751] } 61. Kf1 {[%clk 0:01:50.894] } Qc1+ {[%clk 0:02:00.306] } 62. Ke2 {[%clk 0:01:46.071] } Qc2+ {[%clk 0:01:57.194] } 63. Kf3 {[%clk 0:01:42.475] } Qf5+ {[%clk 0:01:53.535] } 64. Kg3 {[%clk 0:01:40.216] } h4+ {[%clk 0:01:47.903] } 65. Kg2 {[%clk 0:01:35.232] } Qd5+ {[%clk 0:01:44.071] } 66. Qf3 {[%clk 0:01:31.598] } Qd2+ {[%clk 0:01:39.731] } 67. Kf1 {[%clk 0:01:25.108] } Qc1+ {[%clk 0:01:34.651] } 68. Ke2 {[%clk 0:01:19.084] } Qb2+ {[%clk 0:01:31.192] } 69. Ke1 {[%clk 0:01:14.935] } Qc1+ {[%clk 0:01:27.131] } 70. Kf2 {[%clk 0:01:10.935] } Qd2+ {[%clk 0:01:24.908] } 71. Kf1 {[%clk 0:01:05.935] } Qc1+ {[%clk 0:01:22.057] } 72. Ke2 {[%clk 0:01:02.718] } Qb2+ {[%clk 0:01:19.67] } 73. Ke1 {[%clk 0:01:01.967] } Qc1+ {[%clk 0:01:15.69] } 74. Kf2 {[%clk 0:01:00.247] } Qd2+ {[%clk 0:01:11.943] } 75. Kf1 {[%clk 0:00:56.018] } 1/2-1/2
[/pgn]
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
namanthanki
Posts: 10
Joined: Wed Mar 04, 2026 12:39 pm
Full name: Naman Thanki

Re: Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Post by namanthanki »

Roland Chastain wrote: Mon Apr 27, 2026 7:19 pm The source code looks very nice. And I like the idea. Will test it and take a closer look to it ASAP.

By the way, here (on Linux) I had to add -lm to compile the program.
Hi Roland,
Thanks alot for checking the source out and Sorry for the inconveniences caused for linux system as I am on windows currently so did not test much - however the distributed linux binary should work just fine.
namanthanki
Posts: 10
Joined: Wed Mar 04, 2026 12:39 pm
Full name: Naman Thanki

Re: Chal 1.4.1 - Complete Chess Engine in 999 lines of C99

Post by namanthanki »

AdminX wrote: Tue Apr 28, 2026 12:43 pm
namanthanki wrote: Sun Apr 26, 2026 11:36 am Hi all, I've just tagged v1.4.1 of Chal

v1.4.1 is estimated at ~2750 Elo, +50 Elo improvement over v1.4.0 (~2700 Elo). The gains came from eval tuning by Gediminas Masaitis - this release straight up wouldn't exist without him.

It's been more than 3 weeks since the last release. I've been trying to figure out how to move forward without compromising what makes Chal what it is. I'm a little worried it'll be a long time before the next release.

GitHub: https://github.com/namanthanki/chal/releases/tag/1.4.1

Thank you for everyone's support.
~Naman.
Hi Naman,

You should be proud of your work here. It plays quite well given the parameters you set for yourself. I also had to use the "-lm" option to compile for Linux.

Thank You! :D
Hi Thank you for the kind words and providing a game of engine, again sorry for the inconveniences caused on linux system - will fix makefile and commit soon!