Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dataPartie = []
- iteration = 0
- longeur = 400
- listeDepart = []
- def fctMaxime():
- global iteration
- global dataPartie
- global longeur
- global listeDepart
- if getGames() == 0:
- listeDepart = [choice([0, 1, 2]) for i in range(longeur)]
- return 2
- else:
- if getGames()%1000==0 and dataPartie.count(1)>dataPartie.count(0):
- longeur+=10
- listeDepart = [choice([0, 1, 2]) for i in range(longeur)]
- dataPartie.append(getLastWinneur())
- if len(dataPartie) > len(listeDepart):
- dataPartie = dataPartie[-len(listeDepart):]
- prediction = listeDepart[getGames() % len(listeDepart)]
- if getGames() % 50 == 0 and dataPartie.count(0) < dataPartie.count(1):
- iteration = (iteration + 1) % 3
- if iteration == 1:
- prediction = (((prediction + 1) % 3) + 1) % 3
- elif iteration == 2:
- prediction = (((((((prediction + 1) % 3) + 1) % 3) + 1) % 3) + 1) % 3
- return prediction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement