Hasty Briefsbeta

Bilingual

Beating myself at chess

4 months ago
  • #programming
  • #chess
  • #nostalgia
  • Created a chess AI to beat the author, who admits to being terrible at chess.
  • Motivated by experimenting with development environments, simplicity, and potential portability to vintage computers.
  • Used a nostalgic, minimal development setup: GNU Screen, Vim, entr, and w3m on a netbook.
  • Developed the chess engine in C with zero dependencies, fixed memory usage, and under 600 lines of code.
  • Compiled to WebAssembly, resulting in under 6 KB, with potential to run on old systems like DOS or Amiga.
  • Initially skipped writing tests but later had to create a test framework to fix bugs during refactoring.
  • Integrated with XBoard using a simple text protocol and browsers via cm-chessboard and WebAssembly.
  • The AI successfully beats the author, though its ability against others is untested.
  • Recommends the project for practicing programming or testing new languages/paradigms.