Exemplo n.º 1
0
class StrategyOnePlayerDuel:

    def __init__(self, tank, world, memory, debug_on):
        self.strategy = StrategyScalarField(
            tank,
            world,
            [BasicPositionGetter(), GridPositionGetter(7, 5)],
            [
                BonusPositionEstimator(factor=1.2),
                LastTargetEstimator(400),
                TimeToPositionEstimator(2),
                DuelPositionEstimator(1000),
                TurretsDangerEstimator(),
                FlyingShellEstimator(2000),
                EdgePenaltyEstimator(1000, 120),
                AddConstantEstimator(3000)
            ],
            memory,
            debug_on
        )

    def change_state(self, *args, **kwargs):
        return self.strategy.change_state(*args, **kwargs)

    def make_turn(self, move):
        return self.strategy.make_turn(move)
Exemplo n.º 2
0
class StrategyOnePlayer5Enemies:

    def __init__(self, tank, world, memory, debug_on):
        self.strategy = StrategyScalarField(
            tank,
            world,
            [BasicPositionGetter(), BorderPositionGetter(7, 5, 80), GridPositionGetter(2, 2)],
            [
                BonusPositionEstimator(factor=1.2),
                LastTargetEstimator(150),
                TimeToPositionEstimator(4),
                PositionalPowerDangerEstimator(0.35, 9000),
                HideBehindEstimator(5000),
                TurretsDangerEstimator(),
                FlyingShellEstimator(2000),
                EdgePenaltyEstimator(1000, 50),
            ],
            memory,
            debug_on
        )

    def change_state(self, *args, **kwargs):
        return self.strategy.change_state(*args, **kwargs)

    def make_turn(self, move):
        return self.strategy.make_turn(move)
class StrategySecondRound2Enemies:

    def __init__(self, tank, world, memory, debug_on):
        self.strategy = StrategyScalarField(
            tank,
            world,
            [BasicPositionGetter(), GridPositionGetter(7, 5)],
            [
                BonusPositionEstimator(factor=1.4, ammo_crate=800, repair_max=1100),
                LastTargetEstimator(400),
                TimeToPositionEstimator(2),
                PositionalPowerDangerEstimator(0.35, 4000),
                TurretsDangerEstimator(),
                FlyingShellEstimator(2000),
                EdgePenaltyEstimator(1000, 100),
                Distance2PEstimator(400, 200, 700, 200, 1000),
                AddConstantEstimator(3000),
                ],
            memory,
            debug_on
        )

    def change_state(self, *args, **kwargs):
        return self.strategy.change_state(*args, **kwargs)

    def make_turn(self, move):
        return self.strategy.make_turn(move)
Exemplo n.º 4
0
 def __init__(self, tank, world, memory, debug_on):
     self.strategy = StrategyScalarField(
         tank, world, [BasicPositionGetter(),
                       GridPositionGetter(7, 5)], [
                           BonusPositionEstimator(factor=1.2),
                           LastTargetEstimator(400),
                           TimeToPositionEstimator(2),
                           DuelPositionEstimator(1000),
                           TurretsDangerEstimator(),
                           FlyingShellEstimator(2000),
                           EdgePenaltyEstimator(1000, 120),
                           AddConstantEstimator(3000)
                       ], memory, debug_on)
Exemplo n.º 5
0
 def __init__(self, tank, world, memory, debug_on):
     self.strategy = StrategyScalarField(
         tank, world, [BasicPositionGetter(),
                       GridPositionGetter(7, 5)], [
                           BonusPositionEstimator(
                               factor=1.4, ammo_crate=800, repair_max=1100),
                           LastTargetEstimator(400),
                           TimeToPositionEstimator(2),
                           PositionalPowerDangerEstimator(0.35, 4000),
                           TurretsDangerEstimator(),
                           FlyingShellEstimator(2000),
                           EdgePenaltyEstimator(1000, 100),
                           Distance2PEstimator(400, 200, 700, 200, 1000),
                           AddConstantEstimator(3000),
                       ], memory, debug_on)
Exemplo n.º 6
0
 def __init__(self, tank, world, memory, debug_on):
     self.strategy = StrategyScalarField(tank, world, [
         BasicPositionGetter(),
         BorderPositionGetter(7, 5, 80),
         GridPositionGetter(2, 2)
     ], [
         BonusPositionEstimator(factor=1.2),
         LastTargetEstimator(150),
         TimeToPositionEstimator(4),
         PositionalPowerDangerEstimator(0.35, 9000),
         HideBehindEstimator(5000),
         TurretsDangerEstimator(),
         FlyingShellEstimator(2000),
         EdgePenaltyEstimator(1000, 50),
     ], memory, debug_on)
Exemplo n.º 7
0
class StrategyOnePlayerDuel:
    def __init__(self, tank, world, memory, debug_on):
        self.strategy = StrategyScalarField(
            tank, world, [BasicPositionGetter(),
                          GridPositionGetter(7, 5)], [
                              BonusPositionEstimator(factor=1.2),
                              LastTargetEstimator(400),
                              TimeToPositionEstimator(2),
                              DuelPositionEstimator(1000),
                              TurretsDangerEstimator(),
                              FlyingShellEstimator(2000),
                              EdgePenaltyEstimator(1000, 120),
                              AddConstantEstimator(3000)
                          ], memory, debug_on)

    def change_state(self, *args, **kwargs):
        return self.strategy.change_state(*args, **kwargs)

    def make_turn(self, move):
        return self.strategy.make_turn(move)
Exemplo n.º 8
0
class StrategySecondRound2Enemies:
    def __init__(self, tank, world, memory, debug_on):
        self.strategy = StrategyScalarField(
            tank, world, [BasicPositionGetter(),
                          GridPositionGetter(7, 5)], [
                              BonusPositionEstimator(
                                  factor=1.4, ammo_crate=800, repair_max=1100),
                              LastTargetEstimator(400),
                              TimeToPositionEstimator(2),
                              PositionalPowerDangerEstimator(0.35, 4000),
                              TurretsDangerEstimator(),
                              FlyingShellEstimator(2000),
                              EdgePenaltyEstimator(1000, 100),
                              Distance2PEstimator(400, 200, 700, 200, 1000),
                              AddConstantEstimator(3000),
                          ], memory, debug_on)

    def change_state(self, *args, **kwargs):
        return self.strategy.change_state(*args, **kwargs)

    def make_turn(self, move):
        return self.strategy.make_turn(move)
Exemplo n.º 9
0
class StrategyOnePlayer5Enemies:
    def __init__(self, tank, world, memory, debug_on):
        self.strategy = StrategyScalarField(tank, world, [
            BasicPositionGetter(),
            BorderPositionGetter(7, 5, 80),
            GridPositionGetter(2, 2)
        ], [
            BonusPositionEstimator(factor=1.2),
            LastTargetEstimator(150),
            TimeToPositionEstimator(4),
            PositionalPowerDangerEstimator(0.35, 9000),
            HideBehindEstimator(5000),
            TurretsDangerEstimator(),
            FlyingShellEstimator(2000),
            EdgePenaltyEstimator(1000, 50),
        ], memory, debug_on)

    def change_state(self, *args, **kwargs):
        return self.strategy.change_state(*args, **kwargs)

    def make_turn(self, move):
        return self.strategy.make_turn(move)
Exemplo n.º 10
0
 def __init__(self, tank, world, memory, debug_on):
     self.strategy = StrategyScalarField(
         tank,
         world,
         [BasicPositionGetter(), BorderPositionGetter(7, 5, 80), GridPositionGetter(2, 2)],
         [
             BonusPositionEstimator(factor=1.2),
             LastTargetEstimator(150),
             TimeToPositionEstimator(4),
             PositionalPowerDangerEstimator(0.35, 9000),
             HideBehindEstimator(5000),
             TurretsDangerEstimator(),
             FlyingShellEstimator(2000),
             EdgePenaltyEstimator(1000, 50),
         ],
         memory,
         debug_on
     )
Exemplo n.º 11
0
 def __init__(self, tank, world, memory, debug_on):
     self.strategy = StrategyScalarField(
         tank,
         world,
         [BasicPositionGetter(), GridPositionGetter(7, 5)],
         [
             BonusPositionEstimator(factor=1.2),
             LastTargetEstimator(400),
             TimeToPositionEstimator(2),
             DuelPositionEstimator(1000),
             TurretsDangerEstimator(),
             FlyingShellEstimator(2000),
             EdgePenaltyEstimator(1000, 120),
             AddConstantEstimator(3000)
         ],
         memory,
         debug_on
     )
Exemplo n.º 12
0
 def __init__(self, tank, world, memory, debug_on):
     self.strategy = StrategyScalarField(
         tank,
         world,
         [BasicPositionGetter(), GridPositionGetter(7, 5)],
         [
             BonusPositionEstimator(factor=1.4, ammo_crate=800, repair_max=1100),
             LastTargetEstimator(400),
             TimeToPositionEstimator(2),
             PositionalPowerDangerEstimator(0.35, 4000),
             TurretsDangerEstimator(),
             FlyingShellEstimator(2000),
             EdgePenaltyEstimator(1000, 100),
             Distance2PEstimator(400, 200, 700, 200, 1000),
             AddConstantEstimator(3000),
             ],
         memory,
         debug_on
     )