Remix.run Logo
QuadmasterXLII 2 days ago

One example: as a trial, I wanted to work out how frequently an 1400 rated chess player can get a particular opening trap. I intended to check this for all the traps, so it needed to be fast. With a surprising amount of handholding, claude code downloaded the relevant file from lichess. Its method of computing the probability was wrong, so I told it the formula to use and it got the right answer, but incredibly slowly. I asked it to precompute and cache a datas structure for accelerating these queries and it splashed around ineffectually for a long time with sqlite while I made dinner. I came back and clarified that just sorting all the games in the rating range and pickling that list of strings was a fine datastructure, then use binary search to do the probability in log(n) time. It managed to use binary search in o(n) time so I folded and wrote the hot loop myself. this got the query back to ~1 ms.

In the end the agentic coding bit was garbage, but i appreciated claude’s help on writing the boilerplate to interface with stockfish