11 More arbitrary tweaks
source | link
class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 8
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True
        #target for game
        self.breakPoint = 40

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0

        target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
        # If you didn't start the last round (and can't reach normally), panic ensues
        if last_round and max(scores) - (target // 3) > scores[self.index]:
            # Reaching target won't help, run for it!
            while max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        else:
            if last_round:
                self.breakPoint = max(scores)
            # Hope for big points when low, don't bite more than you can chew when high
            currentStep = 1
            while currentStep <= self.steps:
                currentStep += 1
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > self.breakPoint and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 1615) ** 0.5) // 1) # 4 or 5
                    # print(target)
                currentStep += 1
            # If goal wasn't reached or surpassed even after rushing, run for it!
            while last_round and max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        yield False
class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 8
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True
        #target for game
        self.breakPoint = 40

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0

        target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
        # If you didn't start the last round (and can't reach normally), panic ensues
        if last_round and max(scores) - (target // 3) > scores[self.index]:
            # Reaching target won't help, run for it!
            while max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        else:
            if last_round:
                self.breakPoint = max(scores)
            # Hope for big points when low, don't bite more than you can chew when high
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > self.breakPoint and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 16) ** 0.5) // 1) # 4 or 5
                    # print(target)
                currentStep += 1
            # If goal wasn't reached or surpassed even after rushing, run for it!
            while last_round and max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        yield False
class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 8
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True
        #target for game
        self.breakPoint = 40

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0

        target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
        # If you didn't start the last round (and can't reach normally), panic ensues
        if last_round and max(scores) - (target // 3) > scores[self.index]:
            # Reaching target won't help, run for it!
            while max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        else:
            if last_round:
                self.breakPoint = max(scores)
            # Hope for big points when low, don't bite more than you can chew when high
            currentStep = 1
            while currentStep <= self.steps:
                currentStep += 1
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > self.breakPoint and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 15) ** 0.5) // 1)
                    # print(target)
            # If goal wasn't reached or surpassed even after rushing, run for it!
            while last_round and max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        yield False
10 updated, fares better but can't beat OptFor2x
source | link

Update: StepBot now enters the top ranks! Didn't think he'd made it.

Competition got really tough but I'm satisfied with the bot's results.

class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 78
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True
        #target for game
        self.breakPoint = 40

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0

        target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
        # If you didn't start the last round (and can't reach normally), panic ensues
        if last_round and max(scores) - (target // 3) > scores[self.index]:
            # MakeReaching ortarget breakwon't help, run for it!
            while max(scores)-1 >=> scores[self.index] + sum(self.current_throws):
                yield True
        else:
            #if Hopelast_round:
 for big points when low, don't bite more than you can chew when high  self.breakPoint = max(scores)
            target# =Hope self.bigTargetfor ifbig scores[self.index]points <when 12low, elsedon't self.bigTargetbite ifmore self.cyclesthan <=3you elsecan self.smallTargetchew when high
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush if we're low this round (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > 40self.breakPoint and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 1516) ** 0.5) // 1) # 4 or 5
                    # print(target)
                currentStep += 1
            # If goal wasn't reached or surpassed even after rushing, run for it!
            while last_round and max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        yield False

Update: StepBot now enters the top ranks! Didn't think he'd made it.

class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 7
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0
        # If you didn't start the last round, panic ensues
        if last_round:
            # Make or break
            while max(scores)-1 >= scores[self.index] + sum(self.current_throws):
                yield True
        else:
            # Hope for big points when low, don't bite more than you can chew when high
            target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush if we're low this round (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > 40 and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 15) ** 0.5) // 1) # 4 or 5
                currentStep += 1
        yield False

StepBot now enters the top ranks! Didn't think he'd made it.

Competition got really tough but I'm satisfied with the bot's results.

class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 8
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True
        #target for game
        self.breakPoint = 40

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0

        target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
        # If you didn't start the last round (and can't reach normally), panic ensues
        if last_round and max(scores) - (target // 3) > scores[self.index]:
            # Reaching target won't help, run for it!
            while max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        else:
            if last_round:
                self.breakPoint = max(scores)
            # Hope for big points when low, don't bite more than you can chew when high
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > self.breakPoint and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 16) ** 0.5) // 1) # 4 or 5
                    # print(target)
                currentStep += 1
            # If goal wasn't reached or surpassed even after rushing, run for it!
            while last_round and max(scores) > scores[self.index] + sum(self.current_throws):
                yield True
        yield False
9 Arbitrary tweaks that improve win rate through mysterious means
source | link
class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 7
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1 - (1 if self.steps % 3 == 0 else 0)
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        # If you didn't start the last round, panic ensues
        if last_roundelse:
            #self.bigTarget Rack-= up1 pointsif justself.steps in% case
2 == 0 else 0
        # while scores[self.index] + sum(self.current_throws) <= 35:
If you didn't start the last round, panic ensues
    #     yieldif Truelast_round:
            # Keep going until we'reMake notor behindbreak
            while max(scores)-1 >= scores[self.index] + sum(self.current_throws):
                yield True
        else:
            # Hope for big points when low, don't bite more than you can chew when high
            target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=4<=3 else self.smallTarget
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush if we're low this round (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > 40 and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = self8 + ((random.smallTargetrandint(7, -15) ** 0.5) // 1) # 4 or 5
                currentStep += 1
        yield False
class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 7
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1 - (1 if self.steps % 3 == 0 else 0)
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        # If you didn't start the last round, panic ensues
        if last_round:
            # Rack up points just in case
            # while scores[self.index] + sum(self.current_throws) <= 35:
            #     yield True
            # Keep going until we're not behind
            while max(scores) >= scores[self.index] + sum(self.current_throws):
                yield True
        else:
            # Hope for big points when low, don't bite more than you can chew when high
            target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=4 else self.smallTarget
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > 40 and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = self.smallTarget - 5
                currentStep += 1
        yield False
class StepBot(Bot):
    def __init__(self, *args):
        super().__init__(*args)
        self.cycles = 0
        self.steps = 7
        self.smallTarget = 15
        self.bigTarget = 20
        self.rush = True

    def make_throw(self, scores, last_round):
        # Stacks upon stacks upon stacks
        self.bigTarget += 1
        self.cycles += 1
        self.steps += 1
        if self.cycles <=3:
            self.smallTarget += 1
        else:
            self.bigTarget -= 1 if self.steps % 2 == 0 else 0
        # If you didn't start the last round, panic ensues
        if last_round:
            # Make or break
            while max(scores)-1 >= scores[self.index] + sum(self.current_throws):
                yield True
        else:
            # Hope for big points when low, don't bite more than you can chew when high
            target = self.bigTarget if scores[self.index] < 12 else self.bigTarget if self.cycles <=3 else self.smallTarget
            currentStep = 1
            while currentStep <= self.steps:
                if sum(self.current_throws) > target:
                    break;
                yield True
                # After throw, if we get to 40 then rush if we're low this round (worst case we'll get drawn back)
                if scores[self.index] + sum(self.current_throws) > 40 and self.rush:
                    currentStep = 1
                    self.steps = 2
                    self.rush = False
                    target = 8 + ((random.randint(7, 15) ** 0.5) // 1) # 4 or 5
                currentStep += 1
        yield False
8 more tweaks
source | link
7 More optimization, better (safer) rush when activating last round
source | link
6 Small tweak
source | link
5 Small tweak
source | link
4 Lots of value and logic changes, now a lot more careful
source | link
3 Screwed up, more edits
source | link
2 Fix some python issues :)
source | link
1
source | link