6701d67860c32b8886b59587c9e32a4f86a8a96d
braney
  Tue Jun 9 17:13:31 2026 -0700
masterMindGame: demo bigLolly track rendering a solved game of Mastermind on hg38

Demonstrates the lolly track type by mapping a Mastermind board onto it:
score field is the board row, genomic position is the peg column, itemRgb is
the peg color, and the size field separates the large code pegs from the
small feedback key pegs. Guesses come from a consistent-candidate solver so
the black/white feedback is real. Included alpha-only.

diff --git src/hg/makeDb/doc/hg38/masterMindGame.txt src/hg/makeDb/doc/hg38/masterMindGame.txt
new file mode 100644
index 00000000000..c8ad1cfbc38
--- /dev/null
+++ src/hg/makeDb/doc/hg38/masterMindGame.txt
@@ -0,0 +1,26 @@
+# masterMindGame track, hg38 (2026-06-09, Claude braney)
+
+# A solved game of Mastermind drawn as a bigLolly track. It is not real
+# genome annotation, just a demonstration of the lolly track type: the score
+# field becomes the board row (vertical position), the genomic position
+# becomes the peg column, itemRgb becomes the peg color, and the size field
+# distinguishes the large code pegs from the small black/white feedback pegs.
+
+mkdir -p /hive/data/genomes/hg38/bed/masterMindGame
+cd /hive/data/genomes/hg38/bed/masterMindGame
+
+# Generate the board. The script picks a secret code, solves it with a
+# simple "first consistent candidate" strategy, and writes one peg per row
+# of the output BED (45 pegs total: 6 guesses of 4 code pegs plus their
+# real black/white feedback pegs, plus the 4-peg secret code on top).
+# Edit the SECRET, color, column and size constants in the script to change
+# the board.
+~/kent/src/hg/makeDb/scripts/masterMindGame/masterMindGame.py
+
+# Sort and build the bigBed (bed9 + size + mouseover fields).
+bedSort masterMindGame.bed masterMindGame.bed
+bedToBigBed -tab -as=$HOME/kent/src/hg/makeDb/scripts/masterMindGame/masterMindGame.as \
+    -type=bed9+2 masterMindGame.bed /hive/data/genomes/hg38/chrom.sizes masterMindGame.bb
+
+# The track is configured in human/hg38/masterMindGame.ra (included alpha
+# only). View it at chr1:1,000,000-1,000,180.