Giter VIP home page Giter VIP logo

dota2_bots's Introduction

##My Dota2 Bots... Are on hold until further notice. I will be back, but as this API and the game itself updates rapidly, consider this code non-functional until further notice. Sorry :(

With 7.00 came a long awaited supported AI for writing our own bots, I play a LOT of bot games with friends so I couldn't resist taking a crack at it. Gives me an excuse to learn LUA as well.

##Updates! WARNING - Looks like I got hasty with some of these new builds, a few are missing a ; here or there and crashing. Please report them Added new builds for all 39 default bots (plus riki). Used one of the top rated community guides for each hero with a couple exceptions.

Greatly simplified how new item builds are setup thanks to an item file PBot/pbenologa set up a while back. Now you can specify derived items like mekansm without writing out each constituant peice. You can still write out each peace if you care what order they are bought in. I will continue to make this purchasing smarter as I go. Next goal is role specific dynamic team items.

Reverted to the original retreat mode, the modes do not play well with changes unless you change them all to match. Need more work on modes.

Have re-enabled ward/item modes. Default code seems to have fixed these 2 modes to be adequate again. Also made it so the bots of appropirate role buy courier/wards

Version 1 of meepo split push! Adjust his build to buy Boots of Travel instead of treads and Eth blade and Heart and he now can get poor mans shield out of his inventory for a better item late game.

##Current Bots Under Development Meepo - regularly beats default bots - Now has BOTs and split push, needs iteration and work on hitting buildings.

Puck - playable/rough - TODO's Orb Tracking for jaunt

Clockwerk - rough - TODO's need fight awareness and much skill work

##Current General Modes Under Development Jungling - Team wide jungle camp tracking and stacking with easy to use vectors. Vectors still being tweaked

Runes - Bots can 'call' runes to be theirs and go and collect them. Will also grab any rune it walks by that is available. Has a 30% chance they will ignore their called rune, this was a feel decision because every rune being fought for on every cycle just wasn't right.

Item Purchase - Set up for easily adding a new bot with just an item/skill build list. Needs sell/disassemble and role based purchase added

Utilities - Adds bot scope functions to CDOTA_bot_script to call using npcBot:func() left other functions in utilities module to be used with require()

##How To Install

UPDATE: Workshop is live you can now create a lobby and use workshop too to find WIP- Bots by FuriousPuppy instead of the following.

  1. Download the latest version
  2. Unzip and rename the folder to "bots"
  3. Move it to **"C:\Program Files (x86)\Steam\steamapps\common\dota 2 beta\game\dota\scripts\vscripts**"
  4. Server Location: Local Host, Bot Settings/Radient Bots and Dire Bots: Local Dev Script

Available hero_selections:

default hero_selection = 5v5 all pick tested with all bots or 1-2 players but should work for any # of players

hero_selection1 = 1v1 solo mid with just bots - rename to hero_selection to use

##Important Info I am playing within the default modes that we have the option of overwriting for now. This has it's limitations and my bots still fall victim to the decision making of the default bot code quite often. Pretty sure Meepo thinks he's Sterling Archer... only there are 5 of him...

Also, I am using some _generic files. This also has side effects.
The big one other bot coders might need to watch out for is that I override item_purchase_generic.lua and have it setup where there is a builds folder with files for every bot. If a bot isn't implemented yet it will just have "NOT IMPLEMENTED" in that file. THAT IS IMPORTANT and the game may crash without that. It also means every unit will try and call it, so be prepared for death wards, necronomicons etc. to generate console errors of the 'missing file' kind. This will not affect game play that i've ever seen.

References I use

http://dev.dota2.com/forumdisplay.php?f=497

https://www.reddit.com/r/dota2AI/

https://developer.valvesoftware.com/wiki/Dota_Bot_Scripting

http://docs.moddota.com/lua_bots/

Also, there are multiple discord discussion channels in the forums linked above. The people there are a big help and may recognize several chunks of code in here from those communities. Thanks Guys!

##Contributors Somanyrobots - hero_selection.lua PBot/pbenologa - ItemData.lua

Jump on in guys, there are over 100 Heroes in Dota2 and they aren't all writing their own code! I'm open to any discussion on overall dev direction, individual bot code, builds, wants/wishes but right now I'm only one guy. Anyone that wants to help is appreciated. There is a bot tournament or possibly set of tournaments as soon as Jan/Feb. If you'd like to join forces let me know.

dota2_bots's People

Contributors

furiouspuppy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dota2_bots's Issues

Bug with Bane and Clinkz abilities

Not sure if the bots are still being updated but there are 2 weird bugs with Bane and Clinkz.

  1. Bane

Issue: Nightmare sound effect does not end. Will stay on a hero the entire game and will even stack with newer instances of nightmare, increasing the volume. No known way to end the sound

Cause: I think it's because Bane-Bot will occasionally sleep a unit and instantly awaken them with the sub-ability, ignoring the 1s invulnerability period.

  1. Clinkz

Issue: Archers summoned through Clinkz Ult doesn't do anything. They just stand around and not fire.

Cause: No idea

Hope this helps.

Small Improvement

I noticed that bounty hunter had a recipe in his inventory while he had 3 items in his backpack, a priority system for inventories would be nice so that the bot always keeps the most expensive items in his inventory (excluding recipes since they do nothing).

bounty hunter

After the bots killed Roshan they ignored aegis which means aegis needs to be included in the priority system and if nobody takes it then they should deny it.

Getting into contact

Sorry for making an issue, are you on discord? or how do I get into contact with you ?

Mac Only: Script Runtime Error - lines with GetScriptDirectory()

Running at macOS, got 'Script Runtime Error' on every line with require(GetScriptDirectory() .. "[file]").

The problem was that at some point the dota2's Lua debugger tried to concatenate "scripts/vscripts/" with GetScriptDirectory(), resulting on something like "scripts/vscripts//[some directory]".

Replacing all of them to require("bots/[file]") fixed it for me!

Not sure if that would break your scripts for Windows users though.

Skins etc.

It seems that skins and other add-ons doesnt work with the experiment bots all of the time.
About 1/10 times I start a lobby there are skins on the bots. Is that an easy fix or too complicated too bother?
Appreciate it. Keep up the good work!

2 more issues

1: Meepo tries to farm the jungle with poof but for some reason he runs past the camp before he made sure to clear it (usually no monsters die at all and he simply wasted some mana). For some reason the issue doesn't occur at one of the camps but he usually ends up idling there for around 20 seconds every time he tries to farm the jungle. I only tested with the dire side so hopefully the bug is only happening there.

meepo afk
meepo still afk

2: It seems like most if not all of the heroes have trouble with investing points into talents.

Dragon Knight Armlet of Mordiggian

Dragon Knight uses armlet of mordiggian like 2 times a second during combat. If she used it more effectively she could have survived a few situations and just performed better in general.

There also seems to be a weird issue in which no hero uses phase boots to chase but it's always used effectively to retreat and to move across the map.

After dota2 update 7.11 allpick mode doesn't pick

After dota2 update 7.11 on 2018 March 25(or so), the AllPick mode added a new feature of banning a hero before picking, which caused the AI not picking heros and waiting all along losing 2 gold/s. With enough time the AI finally picked heros one by one and started playing, which is pretty galling compared to previous game experience.
I fixed this problem by replacing the code in hero_selection.lua line #405 with 'hero = GetRandomHero()', which is the same as testMode.
Hopefully this would be helpful. :D

Meepo & Puck bot builds not working always.

I have seen the Meepo & Puck bot item build bugging in almost every game.
They start buying the same item over and over again after a while. Be it multiple boots, gloves, null talisman recipes or belt of strengths. Only once have i seen Meepo actually finish a dragon lance.

I've run the lobby as local host & its been 5v5 all bots, though same happens if i'm in the game as well.
Doesn't matter which lane they take or which side they are.

Courier barely used

It doesn't seem like the bots use their flying courier for anything, maybe you should add a function that automatically calls the courier if X hero has more than 1500 gold worth of items in his stash.

Bots not spending gold

Dragon knight had 10k gold and very basic items 58 minutes into the game. Bounty hunter had 3.7k gold and slightly better items.So in conclusion there seems to be some issue for certain heroes that hinders them from buying items which leaves them way weaker than they should have been.

excessive gold

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.