Пример #1
0
 def __init__(self):
     TheBostonDerby.__init__(self)
     self.name = "MasterBates1"
     self.bot = manbearpigbot()
     self.high_chip_bot = odoylebot()
     self.high_chip_bot.eq_ranges = [[10, 10, 40, 65], [5, 30, 60, 60], [10, 10, 45, 90], [15, 50, 70, 95]]
     self.low_chip_bot = rockybot2()
Пример #2
0
 def __init__(self):
     TheBostonDerby.__init__(self)
     self.name = "MasterBates3"
     self.bot = LukeBot()
     self.bot.eq_ranges = [[23, 61, 72, 91]]*4
     self.high_chip_bot = odoylebot()
     self.low_chip_bot = rockybot2()
Пример #3
0
 def __init__(self):
     manbearpigbot1 = manbearpigbot()
     manbearpigbot1.eq_ranges = [[25, 80, 85, 90], [30, 45, 65, 100], [45, 55, 70, 90], [20, 25, 45, 75]]
     rockybot3 = rockybot2()
     rockybot3.eq_ranges = [[5, 50, 85, 90], [45, 60, 65, 80], [5, 10, 65, 80], [10, 55, 75, 100]]
     mlkbot2cool4u = mlkbot2()
     mlkbot2cool4u.eq_ranges = [[30, 60, 85, 95], [20, 35, 45, 55], [15, 45, 45, 80], [5, 15, 35, 40]]
     self.bots = [manbearpigbot1, rockybot3, mlkbot2cool4u, mlkbot2()]
     TheBostonDerby.__init__(self)
     self.name = "MashupBot2"
Пример #4
0
 def __init__(self):
     manbearpigbot1 = manbearpigbot()
     manbearpigbot1.eq_ranges = [[25, 80, 85, 90], [30, 45, 65, 100], [45, 55, 70, 90], [20, 25, 45, 75]]
     mlkbot2cool4u = mlkbot2()
     mlkbot2cool4u.eq_ranges = [[30, 60, 85, 95], [20, 35, 45, 55], [15, 45, 45, 80], [5, 15, 35, 40]]
     lukebotagg3 = lukebotagg()
     lukebotagg3.eq_ranges = [[15, 25, 85, 90], [30, 35, 75, 100], [10, 15, 45, 85], [45, 60, 85, 85]]
     self.bots = [manbearpigbot1, mlkbot2cool4u, lukebotagg3, thebostonderbya()]
     TheBostonDerby.__init__(self)
     self.name = "MashupBot1"
Пример #5
0
                actions[i][j][1] = Call()
            elif new_actions[i][j][1].split()[0] == "raises":
                actions[i][j][1] = Raise(int(actions[i][j][1].split()[1]))
            elif new_actions[i][j][1].split()[0] == "wins":
                actions[i][j][1] = Won(int(actions[i][j][1].split()[1]))

    return actions

if __name__ == "__main__":
    pre = './pokerbots/hh/'
    matches = sorted([m for m in os.listdir(pre+US) if len(m.split('.'))>2],key=lambda x:x.split(".")[-2])
    stats= {}
    for i in range(len(matches)):
        opp = matches[i].split(".")[0]
        hands = evaluate(pre+US+"/"+matches[i],US,opp)
        bot = TheBostonDerby()
        bot.opponent = {'name':opp}
        bot.name = US
        for j in range(len(hands)):
            if len(hands[j]) < 4:
                print hands[j]
                raw_input()
            bot.calculate_stats(hands[j])
        if not stats.has_key(opp):
            stats[opp] = []
        stats[opp].append((bot.my_stats,bot.opp_stats,bot.cory_stats))
    f = open('test.csv','w')
    g = open('us.csv','w')
    f.write(reduce(lambda x, y: x+","+y,['opp']+[m for m in bot.my_stats.keys()+bot.cory_stats.keys() if m[0] not in ['^','_']])+"\n")
    g.write(reduce(lambda x, y: x+","+y,['opp']+[m for m in bot.my_stats.keys() if m[0] not in ['^','_']])+"\n")
    c = csv.DictWriter(f,['opp']+[m for m in bot.my_stats.keys()+bot.cory_stats.keys() if m[0] not in ['^','_']],extrasaction='ignore')
Пример #6
0
 def __init__(self):
     TheBostonDerby.__init__(self)
     self.name = "MasterBates2"
     self.bot = mlkbot()
     self.high_chip_bot = odoylebot()
     self.low_chip_bot = rockybot2()
Пример #7
0
 def __init__(self):
     TheBostonDerby.__init__(self)
     self.name = "CustomBot0"
     self.bot = InputBot()
Пример #8
0
 def __init__(self):
     self.bots = [manbearpigbot(), lukebotagg(), thebostonderbya(), mlkbot2(), rockybot2()]
     TheBostonDerby.__init__(self)
     self.name = "MashupBot"