def printPolicy(Q): print "policy: " for S in range(181): if Q[S][0] >= Q[S][1]: print str(blackjack.visualDecode(S)) + " Stay" else: print str(blackjack.visualDecode(S)) + " Hit"
def printActionValues(Q): print("Action Values:") for S in range(181): print str(blackjack.visualDecode(S)) + " Stay: " + str(Q[S][0]) print str(blackjack.visualDecode(S)) + " Hit: " + str(Q[S][1])