Dota2 AI bot - Last Order Dota2 Solo AI

Overview

Last Order Dota2 Solo AI

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

对战规则

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

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

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

4.游戏不能暂停。

配置文件

(以Windows为例)

  1. 修改gym_env/dota_game.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,注意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 gym_env/dota_game.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, note that the username of steam should be English, otherwise there will be an error.

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

Owner
bilibili
bilibili Open Source Task Force
bilibili
To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

Vaibhaw 7 Oct 13, 2022
Pyvidplayer - An extremely easy to use module that plays videos on Pygame

pyvidplayer An extremely easy to use module that plays videos on Pygame Example

17 Dec 05, 2022
The Bowling Club (Facebook Game) get all strikes.

TheBowlingClubBot The Bowling Club (Facebook Game) get all strikes. FAQ Q: What is this? A: TheBowlingClubBot is a automation bot with 99.99% guarante

#~Rith 1 Jan 19, 2022
Multi minecraft server helper for python

呐 Yuki 您的群组服操作小助手。 使用Python3编写。使用 .yaml 配置文件记录子服,配合Screen管理Linux系统上的Minecraft子服,支持MCDR子服与非MCDR子服。 功能: 开启所有子服 关闭所有子服 重载所有子服MCDR 重载所有子服ChatBridge 使用方法:

3 Mar 17, 2022
This a Chess PGN saver which allows you to save your game pgns, in a .pgn file

PGN Saver This a Chess PGN saver which allows you to save your game pgns, in a .pgn file This can be a very useful tool for the people using chessbase

3 Jan 06, 2022
Vac-Man in Python

Vac-Man in Python This is my personal version of Vax-man game using python, which is the first task of EA Software Engineering Virtual Experience Prog

ZiXiang Luo 3 Jan 05, 2022
Game Boy emulator written in Python

If you have any questions, or just want to chat, join us on Discord. It is highly recommended to read the report to get a light introduction to Game B

Mads Ynddal 3.7k Dec 30, 2022
Simple wordle clone + solver + backtesting

Wordle clone + solver + backtesting I created something. Or rather, I found about this game last week and decided that one challenge a day wasn't goin

1 Feb 08, 2022
PLVRA is a TUI (Terminal User Interface) implementation of wordle / termo in portuguese, written in Python

PLVRA is a TUI (Terminal User Interface) implementation of wordle / termo in portuguese, written in Python

Enzo Shiraishi 1 Feb 11, 2022
Tic-Tac-Toe - Tic-Tac-Toe game build With Python

Tic Tac Toe This game is very popular amongst all of us and even fun to build as

PyLaboratory 0 Feb 06, 2022
Follow the numbers - A simple game where the player should follow the numbers and connect the dots

follow_the_numbers This is a simple game where the player should follow the numb

Sammy Mishinev 3 Nov 22, 2022
Wordle - Wordle Clone With Python

Wordle Clone Python This is a cli clone of the famous wordle game developed by J

Shivam Pandya 20 Jul 07, 2022
Simplerpg - python terminal game made from scratch.

Simplerpg - python terminal game made from scratch.

reversee 3 Sep 17, 2022
Just a copied of flappy bird game made by Thuongton999

flappy-bird Just a copied of flappy bird game made by Thuongton999 Installation and Usage Using terminal (on Window) Make sure you installed Python an

ThuongTon 9 Aug 08, 2021
user friendly python script who is able to catch fish in the game New World

new-world-fishing-bot release 1.1.1 click img for demonstration Download guide Click at latest release: Download and extract bot.zip: When you run fil

297 Jan 08, 2023
Easily manage wine prefixes in a new way. Run Windows software and games on Linux

Bottles Easily manage wineprefix using environments Documentation · Forums · Telegram group · Funding 📚 Documentation Before opening a new issue, che

Bottles 4.1k Jan 09, 2023
A networking library for multiplayer games.

Aerics A networking library for multiplayer games. Getting Started Install Python Open cmd/terminal and type: pip install Aerics Examples Creating a

Yusuf Rençber 3 Jan 04, 2023
A game that depicts a real astronaut's struggles

Interstel-quickscooping-game Right from the beginning of our (i.e, me and me alone) journey in the creation of this game, our goal was to give a game

Sharath V 3 Jul 12, 2021
A small module for creating a card deck, used for making card games

card-deck This module can be used to create small card games such as BlackJack etc.. To initialize the deck, use: Deck() To shuffle the deck, use: Dec

4 Dec 31, 2021
Ghdl-interactive-sim - Interactive GHDL simulation of a VHDL adder using Python, Cocotb, and pygame

GHDL Interactive Simulation This is an interactive test bench for a simple VHDL adder. It uses GHDL to elaborate/run the simulation. It is coded in Py

Chuck Benedict 2 Aug 11, 2022