feat: use a "vibes-based" best first guess, to be replaced with a more optimal guess later
This commit is contained in:
parent
5969470a70
commit
ede394ac39
1 changed files with 13 additions and 3 deletions
16
Proj2.hs
16
Proj2.hs
|
|
@ -148,12 +148,22 @@ feedback target guess = (pitches, notes, octaves)
|
|||
notes = matches (map note targetNoPitches) (map note 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 = (chord, chords)
|
||||
initialGuess = (bestFirstGuess, allChords)
|
||||
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
|
||||
-- previous guess and outputs the next guess and a (reduced in size) game state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue