feat: use a "vibes-based" best first guess, to be replaced with a more optimal guess later

This commit is contained in:
wi11-holdsworth 2025-10-02 11:33:38 +10:00
parent 5969470a70
commit ede394ac39

View file

@ -148,12 +148,22 @@ feedback target guess = (pitches, notes, octaves)
notes = matches (map note targetNoPitches) (map note guessNoPitches) notes = matches (map note targetNoPitches) (map note guessNoPitches)
octaves = matches (map octave targetNoPitches) (map octave guessNoPitches) octaves = matches (map octave targetNoPitches) (map octave guessNoPitches)
-- TODO: comment me -- outputs a 2-tuple of the "best first guess" and the initial game state,
-- which is all possible starting guesses. characteristics of these guesses
-- are described in the documentation for `allChords`
--
-- currently, the best first guess is "vibes based". there is a TODO to
-- actually evaluate the best guess properly.
-- --
initialGuess :: ([Pitch], GameState) initialGuess :: ([Pitch], GameState)
initialGuess = (chord, chords) initialGuess = (bestFirstGuess, allChords)
where where
chord : chords = allChords -- TODO: is this really the best first guess?
bestFirstGuess =
[ Pitch A One,
Pitch B Two,
Pitch C Three
]
-- takes in the previous guess, the game state, and the feedback for the -- takes in the previous guess, the game state, and the feedback for the
-- previous guess and outputs the next guess and a (reduced in size) game state -- previous guess and outputs the next guess and a (reduced in size) game state