Skip to content

glyoko/chess-annotator

Repository files navigation

Ann

An LLM that actually understands chess.

What is Ann?

Thus far, LLMs have struggled with playing chess. If you've ever tried speaking an LLM about chess, or worse—tried playing chess with one—you'll have seen that they don't really understand the game at all. While LLM are trained on an enormous amount of publically available data, which undoubtedly includes a large number of pgns, they have no real understanding of the game. They often make moves that are nonsensical, even illegal, but somehow still seem like it has some inkling of how the game works. They have some concept of "what moves are common to the opening, to the middlegame, to the endgame, and moreover have some idea of what stage of the game they're in. If you try playing chess with an LLM, it might open with 1. e4, or 1. Nf3. By move 6, you might see O-O, or Ne5. By move 12, you start seeing some "middlegame moves". Kb1, f5, e5, a4, Nxe4. By move 40, it might have some idea that the game has reached the endgame. Lots of pawn moves and king advances are common.

But these are all just guesses. There is no real understanding of the position. You might see sequences that go something like:

  1. Nxe5 Nxe5
  2. Nxe5 dxe5...
  3. Nxe5!! (The LLM "discovers" a third knight that can take on e5, brilliant!)

Basic LLMs not built to play chess will routinely materialize pieces out of the aether, jump over pieces with, move their king 3 squares at once, or walk into check.

In this sense, non-GPT architectures like those used by Stockfish, AlphaZero, or Lc0, are much better suited for playing chess than LLMs, if not for discussing chess.

What Ann does is it combines the strengths of each. It uses an LLM to talk to the user, but under the hood uses a traditional chess engine to really understand the position. The LLM merely interprets what the engine says, and uses that to converse with the user.

Getting Started

First, run the development server:

pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors