Skip to content

Instantly share code, notes, and snippets.

View igortg's full-sized avatar

Igor T. Ghisi igortg

  • Ansys
  • Florianópolis, Brazil
  • 00:26 (UTC -03:00)
View GitHub Profile
@igortg
igortg / pig.py
Created April 1, 2017 19:21
Show the best strategy to win the "Pig" dice game
import random
import numpy
def play():
strategies = {}
for i in range(1, 20):
game_result, count = 0, 0
while game_result < 100:
round_result = 0
for j in range(i):