Skip to content

Instantly share code, notes, and snippets.

View jonboiser's full-sized avatar

Jonathan Boiser jonboiser

View GitHub Profile
@jonboiser
jonboiser / README.md
Created January 20, 2016 21:44 — forked from jstcki/README.md
Grid layout
@jonboiser
jonboiser / gist:f042d9f4df08fafc2891
Created April 3, 2015 19:17
Beginning of Mastermind project.
# mastermind implementation
from itertools import *
# functions for AI
# 1. calculate the response for a guess, given the true code
def responseToGuess(guess, true_code):
N = len(guess)
assert N == len(true_code), "Guess is not the same length as true code."
correct_pos = 0