Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active June 4, 2018 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/fec92e643fd99ce35d49a57a4a8b72a9 to your computer and use it in GitHub Desktop.
Save kunigami/fec92e643fd99ce35d49a57a4a8b72a9 to your computer and use it in GitHub Desktop.
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