Last active
June 4, 2018 00:55
-
-
Save kunigami/fec92e643fd99ce35d49a57a4a8b72a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search(possible_secrets): | |
for guess in possible_secrets: | |
for each hint: | |
new_possible_secrets # possible_secrets that would return hint for 'guess' | |
decision_subtree = search(new_possible_secrets) | |
if height(decision_subree) < height(best_subtree): | |
best_decision_subtree = decision_subree | |
best_guess = guess | |
return {guess: best_guess, subtree: best_decision_subtree} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment