• Stars
    star
    399
  • Rank 104,032 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dota2 AI bot

Last Order Dota2 Solo AI

该库提供一个由强化学习训练出的Dota2影魔solo智能体。该智能体通过自我对战的训练方式训练,从随机动作开始学习复杂的策略。玩家可以与该智能体进行影魔solo对战。

对战规则

1.物品方面不可以出凝魂之露,灵魂之戒,魔瓶,真眼。

2.不可以吃符,或使用魔瓶吃符。不可以使用塔防。

3.一局比赛最⻓时限为10分钟,超时将自动杀死重开房间。

4.游戏不能暂停。

配置文件

(以Windows为例)

  1. 修改play_with_human_local.py中的Dota2客户端路径。

    根据下图路径的示例修改为对应路径。

    img

    Dota2客户端路径可根据下图指引找到:

    从team库中找到小齿轮图标,点击并进入属性界面。

    img

    点击本地文件然后再点击浏览即可打开Dota2客户端所在文件夹。

    img

  2. 安装python3

    下载python3.8的安装包:https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe

    双击安装包,第一个页面在红线所示位置选中复选框,然后点击Install Now进行安装。

    img

  3. 安装依赖环境

    在开始菜单找到powershell,右键点击以管理员模式运行。

    首先进入此项目根目录(以D盘为例,如果last_order文件夹在E盘,则把D改为E):

    cd D:\last_order

    然后依次执行下面命令:

    pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

    pip install -r .\requirements.txt

    等待安装完毕。

    安装完成后,执行下面命令即可启动游戏,详情请看下一节。

    python .\play_with_human_local.py

启动对战

首先启动steam。

在上面说明中安装好python3.8和依赖库之后,在管理员模式运行的 powershell 进入项目根目录。执行下面命令即可启动游戏。

python .\play_with_human_local.py

后系统将自动启动Dota2客户端。

然后根据以下图片指引开启对战。

在客户端首页点击开始DOTA:

page2image26786432

选择创建比赛房间:

page3image27100800

选择夜魇队伍并点击编辑:

page4image27108080

检查房间设置是否与下图红框一致:

page5image27170288

最后选择影魔即可开启对战:page5image27165920

Additional links

https://arxiv.org/abs/1912.06680

https://github.com/TimZaman/dotaservice

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



Last Order Dota2 Shadow Fiend Solo AI

This library provides a Dota 2 Shadow Fiend solo AI trained by reinforcement learning. Shadow Fiend solo AI is trained to learn complex strategies starting with random actions through self play training. Players can play Shadow Fiend against this AI.

Rules

  1. No Infused Raindrops, Soul Ring, Bottle or Sentry Ward.

  2. You should not use runes or Glyph of Fortification.

  3. The maximum time limit for a game is 10 minutes, and the dota2 client will be automatically killed and reopened after the time limit.

  4. The game cannot be paused.

Configuration file

(Take Windows as an example)

  1. Modify the path of Dota2 client in play_with_human_local.py.

    Modify it to the corresponding path according to the example of the path below.

    img

    The Dota2 client path can be found according to the following guidelines.

    Find Dota2 from the TEAM library, right click on it and go to the properties screen.

    Click on the local files and then click on Browse... to open the folder where the Dota 2 client is located.

  2. Install python3

    Download the python 3.8 installation package: https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe

    Double-click the installer, check the checkbox on the first page where the red line is, and then click Install Now to install.

    img

  3. Install the dependencies

    Find powershell in the start menu, right click on it and run it in administrator mode.

    First go to the root directory of this project (take the D:\ drive as an example, if the last_order folder is on the E:\ drive, change D to E).

    cd D:\last_order

    Then execute the following commands in sequence.

    pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

    pip install -r .\requirements.txt

    Wait for the installation to complete.

    Once the installation is complete, execute the following command to start the game, see the next section for details.

    python .\play_with_human_local.py

Start the game

First open steam.

After installing python 3.8 and the dependencies in the above instructions, run powershell in admin mode and enter the project root directory. Execute the following command to start the game.

python .\play_with_human_local.py

After that the system will automatically start the Dota2 client.

Then follow the instructions in the image below to start the game.

On the first page of the client, click on PLAY DOTA.

page2image1

Select CUSTOM LOBBIES and click CREATE.

page2image2

Select The Dire team and click EDIT:

page2image3

Check and change the lobby settings to match the following image:

page2image4

Finally, select Shadow Fiend to start the game:

page2image5

Additional links

https://arxiv.org/abs/1912.06680

https://github.com/TimZaman/dotaservice

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

More Repositories

1

ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
C
32,047
star
2

flv.js

HTML5 FLV Player
JavaScript
22,695
star
3

DanmakuFlameMaster

Android开源弹幕引擎·烈焰弹幕使 ~
Java
9,490
star
4

ailab

Python
5,450
star
5

MagicaSakura

MagicaSakura 是 Android 多主题框架。~ is an Android multi theme library which supporting both daily colorful theme and night theme.
Java
3,544
star
6

boxing

Android multi-media selector based on MVP mode.
Java
3,193
star
7

overlord

Overlord是哔哩哔哩基于Go语言编写的memcache和redis&cluster的代理及集群管理功能,致力于提供自动化高可用的缓存服务解决方案。
Go
2,187
star
8

gengine

Go
1,867
star
9

discovery

A registry for resilient mid-tier load balancing and failover.
Go
1,764
star
10

vim-vide

Lightest vimrc, while strong enough. 最轻的vim配置,却足够强!
Vim Script
781
star
11

drawee-text-view

Simple drawee spannable text view based on Fresco
Java
764
star
12

join-us

大B站需要更多的小伙伴~ ( ゜- ゜)つロ 乾杯~
702
star
13

NativeBitmapFactory

DFM jni
C++
320
star
14

jni4android

JNI Generater for Android
C
305
star
15

BRouter

Kotlin
301
star
16

biliobs

C++
240
star
17

quiche

C++
191
star
18

UnityBVA

C#
189
star
19

kratos-demo

a project that use kratos
Go
188
star
20

bas

Bilibili Animation Script
HTML
187
star
21

apk-channelization

[不支持v2签名]Android多渠道输出脚本
Python
147
star
22

libyuv

mirror of https://chromium.googlesource.com/external/libyuv/
C++
147
star
23

BurstLinker

🚀 A simple GIF encoder for Android.
C++
131
star
24

xpref

A SharedPreferences' wrapper that truly supported sharing data across multi-process
Kotlin
85
star
25

soundtouch

SoundTouch library compiled for ijkplayer/Android http://www.surina.net/soundtouch/sourcecode.html
C++
80
star
26

mahimahi

C++
76
star
27

muzei-bilibili

Muzei 插件,bilibili 壁纸源
Java
71
star
28

vlc-android-macbuild

Deprecated, official site is recommended http://git.videolan.org
Java
70
star
29

LastOrder

StarCraft AI bot
C++
61
star
30

vlc-ports-android

fork of git://git.videolan.org/vlc-ports/android.git
C++
56
star
31

bbip

Bilibili High Performance IP Resolve Library
C++
55
star
32

oresty

Lua
52
star
33

SMGo

Shang-Mi cipher library. Constant-time implementation of SM2 and SM4.
Go
40
star
34

bilibili.github.io

35
star
35

adaptation

too painful to work with PagerAdapter
Java
32
star
36

vlc

fork of git://git.videolan.org/vlc.git
C
30
star
37

openssl

mirror of https://www.openssl.org
C
29
star
38

twirp

twirp rpc
Go
26
star
39

ci-ijk-ffmpeg-ios

Prebuilt FFmpeg for ijkplayer on iOS
Shell
18
star
40

abtest

A layered experiment framework for C++/java/go
15
star
41

flvbind

A tools to combine multiple flv file to a single flv file.
C
13
star
42

uptool

JavaScript
12
star
43

gas-preprocessor

personal fork of git://git.libav.org/gas-preprocessor.git
Perl
12
star
44

nginx_quic_module

C
12
star
45

jmp_logpipe

A tool for jumper analyize log and send the command to remove UDP server for aduit. And this tool will denied for lszrz protocol to prevent a large log for storage.
C
10
star
46

nginx_quic_stack

C++
10
star
47

ci-ijk-ffmpeg-android

Continuous integration for ijkplayer on Android
8
star
48

vim

B站Vim会所
6
star
49

arrange-play

Java
5
star
50

IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
Objective-C
4
star
51

bilibili_wtm

Python
1
star