pep8 and better lady model
This commit is contained in:
parent
9eb3625393
commit
b9f07c85fa
1 changed files with 268 additions and 268 deletions
16
tim.py
16
tim.py
|
|
@ -25,7 +25,7 @@ class DeceptionGame(object):
|
|||
self.observations = []
|
||||
self.seen = []
|
||||
self.tid = 0
|
||||
self.lady_will_duck = mc.Bernoulli("lady_will_duck", 0.5)
|
||||
self.lady_will_duck = mc.Bernoulli("lady_will_duck", 0.8)
|
||||
self.mission_ducks_on_round = [None] * 5
|
||||
self.mission_ducks_on_round[0] = mc.Bernoulli("missionduck_on_0", 0.5)
|
||||
self.mission_ducks_on_round[1] = mc.Bernoulli("missionduck_on_1", 0.5)
|
||||
|
|
@ -78,16 +78,16 @@ class DeceptionGame(object):
|
|||
else:
|
||||
return None
|
||||
else:
|
||||
if self.lady_will_duck.rand():
|
||||
if self.player_is_good(deal, p2) == claim:
|
||||
return True
|
||||
if self.player_is_good(deal, p2):
|
||||
if claim == True:
|
||||
return self.lady_will_duck.rand()
|
||||
else:
|
||||
return False
|
||||
return not self.lady_will_duck.rand()
|
||||
else:
|
||||
if self.player_is_good(deal, p2) == claim:
|
||||
return False
|
||||
if claim == False:
|
||||
return self.lady_will_duck.rand()
|
||||
else:
|
||||
return True
|
||||
return not self.lady_will_duck.rand()
|
||||
transaction.append(obs)
|
||||
self.observations.append(transaction)
|
||||
self.seen.append(["Lady:", p1, "says", p2 , "is", "Good" if claim else "Evil"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue