Beispiel #1
0
def main():
    print "precompute all piece configurations"
    global CONFIGS
    CONFIGS = [list(all_configurations(p)) for p in pieces]
    nsolutions = 0

    for s in search([]):
        nsolutions += 1
        for pieceid, configid in enumerate(s):
            print_pointset(CONFIGS[pieceid][configid])
            print
        print "=" * 8

    print "nr of solutions {0} \n nr of evaluations {1}".format(nsolutions, NEVALS)
Beispiel #2
0
def describe_piece_simmetry(ps):
    print_pointset(ps)
    print 'translations', len(list(translations(ps)))
    print 'rotations', len(rotations(ps))
    print 'all_configurations', len(all_configurations(ps))