Sniper Ai + mechanics question

Hamster
Script
Script
Posts: 28

Sniper Ai + mechanics question

Post#1 » 25 Dec 2016, 17:26

Hi guys, trying to optimise a Sniper AI here and I have a few questions:

1) are this bot stats uptodate for current patch: https://itch.io/t/46583/update-51-balancing

2) When it comes to shields & health, is any damage lost when "punching through" shields?

Example, a Sniper has 3k health & Shields and 3k attack.

This means that, assuming all damage "punches through" shields My sniper should be able to 1 shot an enemy sniper that is at 50% 50% shields (or 100% life & 0% shields, not that thats relevant to the question)

If however, there is some dmg buffer when going from shields to health then the target bot may live.

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: Sniper Ai + mechanics question

Post#2 » 25 Dec 2016, 17:32

I don't think any damage is lost.

Hamster
Script
Script
Posts: 28

Re: Sniper Ai + mechanics question

Post#3 » 25 Dec 2016, 18:26

Okay then, lets crunch some numbers. Below is a little Python script that calculates the break points for your sniper to kill an enemy in a single shot.

Code: Select all

# [Health, Shields]
BOT_VALUES= {"SNIPER": [3000, 3000],
       "MACHINE G": [7000, 5000],
       "ASSAULT": [5000, 3000],
       "SHOTGUN": [3000, 5000]}

def otk_kill(shot_damage, target_stats, target_name):
    results = []
   
    percent_values = [0, .25, .5, .75, 1]

    target_health  = target_stats[0]
    target_shields = target_stats[1]

    for percent_health in percent_values[1:]:
        current_health  = target_health  * percent_health
        for percent_shields in percent_values:
            current_shields = target_shields * percent_shields
   
            if current_health + current_shields <= shot_damage:
                results.append(
                    ("KILL {}".format(target_name), percent_health, percent_shields)
                    )
    return sorted(results, reverse=True)

for bot_class in BOT_VALUES:
    print ( otk_kill(3000, BOT_VALUES[bot_class], bot_class) )
    print ("")


RESULTS:

    [('KILL SNIPER', 1, 0), ('KILL SNIPER', 0.75, 0.25), ('KILL SNIPER', 0.75, 0), ('KILL SNIPER', 0.5, 0.5), ('KILL SNIPER', 0.5, 0.25), ('KILL SNIPER', 0.5, 0), ('KILL SNIPER', 0.25, 0.75), ('KILL SNIPER', 0.25, 0.5), ('KILL SNIPER', 0.25, 0.25), ('KILL SNIPER', 0.25, 0)]

    [('KILL SHOTGUN', 1, 0), ('KILL SHOTGUN', 0.75, 0), ('KILL SHOTGUN', 0.5, 0.25), ('KILL SHOTGUN', 0.5, 0), ('KILL SHOTGUN', 0.25, 0.25), ('KILL SHOTGUN', 0.25, 0)]

    [('KILL ASSAULT', 0.5, 0), ('KILL ASSAULT', 0.25, 0.5), ('KILL ASSAULT', 0.25, 0.25), ('KILL ASSAULT', 0.25, 0)]

    [('KILL MACHINE G', 0.25, 0.25), ('KILL MACHINE G', 0.25, 0)]

How to use this stuff should be pretty simple:

...if Enemy Sniper in Range (0-25% shields, 50-75% health) shot.

this should be an instant kill all the time since accuracy = 100%

pier4r
Skynet
Skynet
Posts: 3390

Re: Sniper Ai + mechanics question

Post#4 » 25 Dec 2016, 19:00

http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
HBomb
Algorithm
Algorithm
Posts: 93

Re: Sniper Ai + mechanics question

Post#5 » 25 Dec 2016, 21:10

pier4r wrote:https://www.reddit.com/r/Gladiabots/wiki/alpha5_2/math_analysis_bot_fights


I needed this in my life. Thank you

HDeffo
Neural Network
Neural Network
Posts: 212

Re: Sniper Ai + mechanics question

Post#6 » 25 Dec 2016, 21:19

HBomb wrote:
pier4r wrote:https://www.reddit.com/r/Gladiabots/wiki/alpha5_2/math_analysis_bot_fights


I needed this in my life. Thank you


You're welcome :lol:

Return to “Strategies”

Who is online

Users browsing this forum: No registered users and 1 guest