Derive disjoint material family themes from each endgame's Key (#193)

Every endgame now belongs to exactly one material family derived from its Key:
pawn, rook, rook and pawn, queen, queen and pawn, minor piece, minor piece and
pawn, basic mate, king and pawn, or bare king other. The bare-king families are
split out because those positions teach a mating or promotion technique rather
than a general material class.

Family membership is objective, so a derivation pass owns links to its themes:
refreshing rewrites them as derived and removes a curated link that contradicts
the family, while technique themes are untouched. Re-running is idempotent.

A mix task applies the mapping to the whole library. Seeds add the king
technique themes for later human tagging.

Closes #186
This commit is contained in:
2026-11-17 21:18:11 +01:00
committed by GitHub
parent 80cb033077
commit 946fc38756
6 changed files with 466 additions and 2 deletions
+1 -2
View File
@@ -6,8 +6,7 @@ defmodule Chesstrainer.Repo.Seeds.Endgames.Win do
color: :white,
message: "Rook vs king endgame",
notes: "Basic rook endgame",
result: :win,
themes: ["rook endgame"]
result: :win
},
%{
fen: "8/8/8/1P4p1/5k2/5p2/P6K/8 b - - 0 0",