[Info] Bots

Discussion in 'Mapping Questions & Discussion' started by The Political Gamer, Dec 18, 2009.

  1. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,704
    http://www.teamfortress.com/post.php?id=3279

    http://forums.steampowered.com/forums/showpost.php?p=12673281&postcount=9

    How to use bots:

    On official KOTH maps:
    tf_bot_add

    On non official KOTH maps:
    sv_cheats 1
    nav_max_view_distance 6000
    nav_gererate
    tf_bot_add

    CP/KOTH/ARENA:
    Bots work as intended on all but cp_steel

    PL/PLR:
    Busted, BLU will push the cart but RED will stay on the cap point.

    A/D CTF/CTF:
    Busted, teams stay in spawn and will not cap intel.

    General notes:

    tf_bot_add does allow optional class and team parameters. The command takes up to three arguments of <count> <class> <team>, which can appear in any order.

    For example, tf_bot_add 5 red pyro would add 5 pyros to the red team.

    tf_bot_force_class random for scouts and spies mixed in with the rest of the bots.

    Bots will constantly get caught on clipping issues, as they follow very close to walls when walking.

    The bots are actually very good in spawncamping

    The bots do not allway avoid props, sometimes they just keep walking staight into a prop. They do avoid it after a few seconds.

    They think a func_door brush is unpassible.

    Class Notes:

    Medic:

    Medics will prioritize heavies over every class when healing, and occasionally they will appear to be spamming the fire button rather then constantly healing.

    Medics will also fall off high ledges due to constant strafing, yet continue to attempt healing their previous target, even through a wall.

    Engineer:

    Engineers will build a Sentry and a Dispenser near an ammo kit and constantly return to the kit to build up their sentry.

    Engineers prioritize their sentry when building, and level it up first.

    Engineers build in a diagonal line, with the sentry in front and the dispenser behind.

    When attacking, Engineers will primarily use their pistol, unless very close to the enemy.

    Engineers, once their buildings are maxed, will stay crouched behind sentries and constantly hit them with their wench.

    Engineers are more likely to build close to one another, however they do not appear (at the moment) to share metal with each other's dispensers

    Engineer bots will build teleports if you set a tf_bot_min_travel_to_build_teleporter from 4000 to 0

    Sniper:

    Snipers will always headshot a class when zoomed in, however they occasionally will noscope.

    Snipers (along with a few other classes) seem to huddle around dispensers.

    Snipers will also fire on sight, rather then build up their shots. (When *searching* they will stay zoomed in however).

    Heavy:

    Heavies tend to play direct offense, they will consistently spin up their gun and walk into the heat of battle, even in the way of an enemy sentry.

    I will add more info when I get the time to test these things more!

    Special thanks to Jack Riguel, martijntje, Randdalf, Ravidge, and TheBladeRoden for the expanded notes.
     
    • Thanks Thanks x 11
    Last edited: Dec 24, 2009
  2. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,883
    Positive Ratings:
    5,126
    I have contacted valve about this.

    Bots only fully understand KoTH, and partially understand CP and Arena.

    Other gametypes are in the works, this is just beta testing :)
     
  3. FaTony

    FaTony Banned

    Messages:
    902
    Positive Ratings:
    160
    ...and I've spent half of a year coding my own AI bots. Oh well...
     
    • Thanks Thanks x 1
  4. Jack Riguel

    Jack Riguel L10: Glamorous Member

    Messages:
    721
    Positive Ratings:
    254
    I couldn't get bots to work on anything besides KOTH. Did you nav_gernate the other ones as well? I tried badlands, dustbowl, and arena_nucleus and they didn't respond.

    Also I found a few interesting traits:

    *Medics will prioritize heavies over every class when healing, and occasionally they will appear to be spamming the fire button rather then constantly healing.

    *Medics will also fall off high ledges due to constant strafing, yet continue to attempt healing their previous target, even through a wall.

    *Engineers will build a Sentry and a Dispenser near an ammo kit and constantly return to the kit to build up their sentry.

    *Engineers prioritize their sentry when building, and level it up first.

    *Engineers build in a diagonal line, with the sentry in front and the dispenser behind.

    *When attacking, Engineers will primarily use their pistol, unless very close to the enemy.

    *Snipers will always headshot a class when zoomed in, however they occasionally will noscope.

    *Snipers (along with a few other classes) seem to huddle around dispensers.

    *Snipers will also fire on sight, rather then build up their shots. (When *searching* they will stay zoomed in however).

    *Heavies tend to play direct offense, they will consistently spin up their gun and walk into the heat of battle, even in the way of an enemy sentry.

    I'm actually very impressed with the current AI the bots have, and if you load them up you'll notice they have some pretty funny names that I wont' spoil here. :p

    EDIT: Never-mind, I figured it out. Once I get a few more tests running I'll do a full class by class behavior sheet. They actually respond very well to a lot of dangers... I'm running them in my map arena_cargo, and they actually respond to and use the moving train (a dynamic prop) for cover.

    Here's a few new items:

    *Engineers, once their buildings are maxed, will stay crouched behind sentries and constantly hit them with their wench.

    *Engineers are more likely to build close to one another, however they do not appear (at the moment) to share metal with each other's dispensers

    *Bots in general will constantly get caught on clipping issues, as they follow very close to walls when walking.

    EDIT #2:

    Bots do not like pl_waste. They will only fight over the initial point. Oddly enough, blue team will hang back and build up ubers and play more "attacker" classes (mostly soilders and heavies), while red team will stand on the center point.
    (Engies will run around building up in a few areas, while demos, snipers, soldiers, pyros, and medics stand on the point.

    Oddly enough, BLU will occasionally push the cart forward, however they abandon it very quickly. Red team will push it slightly back, however I think it reads a a dispenser for them so they use it for heath and then abandon it.

    Also, I have not yet seen a bot play either Spy or Scout.
     
    • Thanks Thanks x 4
    Last edited: Dec 18, 2009
  5. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    I do that all the time, it is not that weird of a tactic.

    I do like this. The only way I've got it working is by using a dedicated LAN server, wich is kind of annoying.

    some things I am wondering
    * can the bots use unlockables?
    * can we make the bots spawn as specific classes (say I want to simulate a scout rush)
     
  6. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    "tf_bot_force_class" = ""
    - If set to a class name, all TFBots will respawn as that class



    There's also a bunch of tf_bot_ commands for tweaking the AI behavior. Right now it seems that Sniper is the most customizable.
     
    Last edited: Dec 18, 2009
  7. Jack Riguel

    Jack Riguel L10: Glamorous Member

    Messages:
    721
    Positive Ratings:
    254
    I reread my post and found that it's mostly me just rambling about how cool this all is. Once I get back home I'm gonna spend a few solid hours messing with the bots and seeing how they behave to different situations and in different maps. (I find running them in pl_waste to be very interesting, and slightly humorous as well).

    The old bot setup allowed for specific classes to be selected, however I do not think that scouts and spies, will work correctly (both classes are never picked by any of the bots I've spawned). I'll test this when I get back though

    Also, as far as I know, bots cannot use unlockables since they would require a "drop" and more importantly... a connection to the steam cloud.

    I still have to say though , I am amazed at the bot's AI on assault maps. I watched two medics build ubers on two different heavies and attack at the same time using two different routes. The engineer's AI is especially interesting, while they mostly stay defensive and stationary by their sentries, they will occasionally attack when threatened and I've seen some take more unused paths to surprise the enemy and run away once they make a kill.

    AI has always amazed me, and while I can tell Valve made this for use in small lan game and single player, there is so much potential for map makers here to use this feature. While the best tests are made with real people, these bots could prove useful in quick-updates and for pre-testing a map version before it's released. I'm definitely going to spend a lot of time with this feature, I'm especially interested to see how they work when I play as spy...
     
  8. Nutomic

    Nutomic L11: Posh Member

    Messages:
    888
    Positive Ratings:
    177
    Although i never mapped for any other game than tf2, i was always angry at people mapping for other games, that could easily test their maps with bots. These will hopefully solve this, at least partially.

    /puts bots on his map and lets run
     
  9. TheBladeRoden

    TheBladeRoden L7: Fancy Member

    Messages:
    491
    Positive Ratings:
    167
    Then again, on UT2004 half of my efforts were spent on pathing and trying to get the bots to run the map properly.
     
  10. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    215
    If valve makes these bots even half as good as the l4d bots, I will re-purchase the game in gratitude.
     
  11. MangyCarface

    aa MangyCarface Mapper

    Messages:
    1,616
    Positive Ratings:
    1,309
    They have to be 2x as good as the l4d bots:

    -Variety of objectives
    -More vertical aspects
    -l4d bots are fucking retarded

    Edit: Working on a test map of l4d-style campaign. I called it first!!!!
     
    Last edited: Dec 18, 2009
  12. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    215
    I've noticed soldiers don't seek the high ground or rocket jump. Also, bots don't appear to be fond of jumping at all.
     
  13. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    so I used the bots on one of my custom maps. The map design was kind of rubbish, and the bots thaught so to. They usually took the one path, wich I did not intend as the main path.

    * the bots are actually very good in spawncamping
    * the bots do not allway avoid props, sometimes they just keep walking staight into a prop. They do avoid it after a few seconds.
    * they think a func_door brush is unpassible.
     
    • Thanks Thanks x 2
  14. Trotim

    aa Trotim

    Messages:
    1,180
    Positive Ratings:
    1,028
    That's funny, when I tested they kept trying to run through func_doors that were still closed (like the Arena cap doors in Lumberyard)
     
  15. Micnax

    aa Micnax I maek map

    Messages:
    2,065
    Positive Ratings:
    1,522
    I wonder how they'll work on koth_hiddentomb...

    OFF TO TESTING!
     
  16. Mr.Late

    Mr.Late L7: Fancy Member

    Messages:
    408
    Positive Ratings:
    157
    I tested bots with my custom PL map.

    -Bots sometimes forgotted the cart, but usually there was 1 bot pushing it.
    -Bots defended precisely on the CP.

    However, they did quite good job for alpha/beta bots.
     
  17. Fraz

    aa Fraz Blu Hatte, Greyscale Backdrop.

    Messages:
    944
    Positive Ratings:
    573
    They haven't been "taught" how to work pl yet.
     
  18. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    466
    Engineer bots will build teleports if you set a cvar from 4000 to 0 (can't remember what it's called though, tf_bot_.... teleporter_range, something like that).
     
    • Thanks Thanks x 1
  19. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,517
    tf_bot_min_travel_to_build_teleporter
    "- How far away our goal needs to be before we try to build a teleporter"

    There are actually tons of commands to use. I'm waiting for someone to write a massive list of what each option does.... I'm too lazy to do it myself. Here's a quick list and their in-game description however.

    Code:
    "tf_bot_force_class" = ""
     game
     - If set to a class name, all TFBots will respawn as that class
    "tf_bot_notice_gunfire_range" = "3000"
     game
    "tf_bot_sniper_personal_space_range" = "1000"
     game cheat
     - Enemies beyond this range don't worry the Sniper
    "tf_bot_add"
     game
     - Add a bot.
    "tf_bot_kick"
     game
     - Remove a TFBot by name, or all bots ("all").
    "tf_bot_warp_team_to_me"
     game cheat
    "tf_bot_debug_seek_and_destroy" = "0"
     game cheat
    "tf_bot_path_lookahead_range" = "300"
     game
    "tf_bot_pyro_deflect_tolerance" = "0.5"
     game cheat
    "tf_bot_sniper_aim_error" = "0.01"
     game cheat
    "tf_bot_sniper_aim_steady_time" = "0.5"
     game cheat
    "tf_bot_sniper_aim_steady_rate" = "10"
     game cheat
    "tf_bot_debug_sniper" = "0"
     game cheat
    "tf_bot_keep_class_after_death" = "0"
     game
    "tf_bot_ammo_search_range" = "2000"
     game cheat
     - How far bots will search to find ammo around them
    "tf_bot_health_critical_ratio" = "0.3"
     game cheat
    "tf_bot_health_ok_ratio" = "0.8"
     game cheat
    "tf_bot_health_search_near_range" = "1000"
     game cheat
    "tf_bot_health_search_far_range" = "2000"
     game cheat
    "tf_bot_melee_attack_abandon_range" = "500"
     game cheat
     - If threat is farther away than this, bot will switch back to its primary weapon and attack
    "tf_bot_retreat_to_cover_range" = "1000"
     game cheat
    "tf_bot_debug_retreat_to_cover" = "0"
     game cheat
    "tf_bot_wait_in_cover_min_time" = "1"
     game cheat
    "tf_bot_wait_in_cover_max_time" = "2"
     game cheat
    "tf_bot_offense_must_push_time" = "60"
     game cheat
     - If timer is less than this, bots will push hard to cap
    "tf_bot_sniper_offense_push_time" = "60"
     game cheat
     - If timer is less than this, the Sniper will try to cap
    "tf_bot_min_travel_to_build_teleporter" = "4000"
     game cheat
     - How far away our goal needs to be before we try to build a teleporter
    "tf_bot_debug_sentry_placement" = "0"
     game cheat
    "tf_bot_medic_stop_follow_range" = "100"
     game cheat
    "tf_bot_medic_start_follow_range" = "300"
     game cheat
    "tf_bot_medic_max_heal_range" = "600"
     game cheat
    "tf_bot_medic_debug" = "0"
     game cheat
    "tf_bot_medic_cover_test_resolution" = "8"
     game cheat
    "tf_bot_sniper_flee_range" = "400"
     game cheat
     - If threat is closer than this, retreat
    "tf_bot_sniper_linger_time" = "5"
     game cheat
     - How long Sniper will wait around after losing his target before giving up
    "tf_bot_sniper_patience_duration" = "20"
     game cheat
     - How long a Sniper bot will wait without seeing an enemy before picking a new spot
    "tf_bot_min_setup_gate_defend_range" = "750"
     game cheat
     - How close from the setup gate(s) defending bots can take up positions. Areas closer than this will be in cover to ambush.
    "tf_bot_max_setup_gate_defend_range" = "2000"
     game cheat
     - How far from the setup gate(s) defending bots can take up positions
    "tf_bot_min_setup_gate_sniper_defend_range" = "1500"
     game cheat
     - How far from the setup gate(s) a defending sniper will take up position
    "tf_bot_max_point_defend_range" = "1250"
     game cheat
     - How far (in travel distance) from the point defending bots will take up positions
    "tf_bot_koth_sniper_spot_min_range" = "1000"
     game cheat
    "tf_bot_koth_sniper_spot_density" = "2"
     game cheat
     - How many sniper spots, on average, per 25x25 unit area
    "tf_bot_sniper_spot_max_count" = "100"
     game cheat
     - Stop searching for sniper spots when each side has found this many
    "tf_bot_show_sniper_spots"
     game cheat
     - Display the current set of sniper spots.
    "tf_bot_sniper_spot_epsilon" = "10"
     game cheat
    
     
    • Thanks Thanks x 4
    Last edited: Dec 19, 2009
  20. rawket

    rawket L1: Registered

    Messages:
    4
    Positive Ratings:
    1
    Oh awesome, right when I started wondering how I could get a group of people to help test a map Valve comes out with bots! Thanks for the info :D