11-DEC-2024

0047 - familiars

I am, gods help me, thinking about changing some names again. I think I’m starting to see that I really should try to pack the metadata in the ‘alterations’ stream. I rejected it because it kept alterations very simple, but I think I need to allow for some kind of arbitrary metadata encoding that would record ‘events’ that alter some metadata flag, this would make it easy to undo and track metadata state, at the cost of making the alterations a little more complicated.

I don’t think I’m going to chase this rabbit yet, but I am not loving how my current design is managing metadata – which is to say, it’s not really, it’s just assuming partial representations will ‘work out’ and shoving metadata into the right spots in whatever way works. I think my goal is to try to get the thing to be able to represent a full PGN with variations. My main target for Hazel is high-depth analysis / big data, not necessarily chess playing proper, so once I can do that, I can start to replace the ugly bits with more confidence since I’ll have a test suite to work against.

The current plan is something like:

  1. Finish PGN parser via the Familiar system
  2. Implement a recalculation-based ‘backwards movement’ system for the Familiar.
  3. Wire the Variation to a UI widget that connects to the boardstate shown in the UI.
  4. Finish implementing UCI protocol
  5. Implement an extremely bad evaluator/movegen system that can arguably play chess.
  6. Take a break
  7. Kill every single mutant and get to 100% coverage.
  8. Start to refactor the design to something comfortable.

I’ll chip away at that before getting into evaluators and UI and all that. I have plans for that but I think I’ve settled on the design and I just need to finish building it so I can get to the polish phase.

2128

I merged, finishing #1 from above. I think #2 will require some work on the ChessGame component, I’m pretty unhappy with how BEN and FEN are sort of scattered around, I would prefer to treat the board rep more abstractly, and this gets back to the Alter system and what a ‘board representation’ really is. I think it might start to reveal itself as I start to remove the hard Move and BEN types in Action.

I could approach this in the ‘dumb’ way of replacing ChessGame with a trait that captures it’s current API. This would at least gather the API into one spot so I could look at it.

In any case, I’m just going to start tweaking stuff and see what happens. Can’t overthink if you stay busy breaking stuff.