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
A script to install a Windows game through GOG on Linux

proton-gog-install A script to install a Windows game through GOG on Linux. Based on this gist. Tested on Arch, might work elsewhere. Requirements: Im

5 Dec 28, 2022
Implementation of Conway's game of life in python.

👾 👨🏻‍💻 Conway's Game of Life 👨🏻‍💻 👾 by FranciscoCharles An interactive simulator that implements the standard Conway Game of Life with a simpl

3 Oct 01, 2021
Repository with console python implementation of Simple Artificial Life (simplified MAS) and Conway's game of life

artificial-life-game Repository with console python implementation of Simple Artificial Life (simplified MAS) and Conway's game of life Installation c

Vladislav 6 Nov 14, 2022
Lutris desktop client in Python / PyGObject

Lutris Lutris is an open source gaming platform that makes gaming on Linux easier by managing, installing and providing optimal settings for games. Lu

Lutris 6.1k Dec 30, 2022
This is a two player snake game

Trake This is a two player snake game How to play the game There is food and two players. You try to eat food to become large and gain points. Player

Grrub 1 Dec 19, 2021
Guess number game with PyQt5

Guess-Number-Project Guess number game with PyQt5 you can choose a number in your mind and then computer will guess a nummber and you guide the comput

MohammadAli.HBA 1 Nov 11, 2021
Minecraft clone using Python Ursina game engine!

Minecraft clone using Python Ursina game engine!

Taehee Lee 35 Jan 03, 2023
Minecraft - Online Players Overlay Generator

Minecraft - Online Players Overlay Generator Contents About Quick Start Download Pre-Built Binary Run from Source Configuration Command-Line Options F

4 Sep 12, 2022
pyLodeRunner - Classic Lode Runner clone made in pyxel (Python)

pyLodeRunner Classic Lode Runner clone made in pyxel (Python) Controls arrow key : move the player X : dig right side Z : dig left side ESC : quit gam

2 Feb 12, 2022
Multi minecraft server helper for python

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

3 Mar 17, 2022
Utility to find games owned by all (or at least some) of the passed players.

SteamCommonGameFinder Utility to find games that are owned by all (or at least some) of the players you pass into this programm. You can already find

Daniel O'Grady 4 Jan 04, 2022
A tool for the creation of rooms used in maps in the game Wastelands

Wastelands Room Data editor A tool for the creation of rooms used in maps in the game Wastelands Creates .wrd files, that get loaded by the map genera

Avant 6 Jul 12, 2021
A 16x16 clone of Minecraft Classic, written in Python with the Ursina Engine

VoxelCraft A 16x16 clone of Minecraft Classic, written in Python with the Ursina Engine Features:Trees, Water(But there's no gravity, so if you break

2 Jun 23, 2022
Chesston (Chess+Python) is a two-player chess game with graphical user interface written in PyQt5

♟️ Chesston (Chess+Python) is a two-player chess game with graphical user interface written in PyQt5. 💿 Dependencies This program uses Py

6 May 26, 2022
A Simple 2048 Game Built Using Python

Game 2048_Python Dựa trên trò chơi nổi tiếng 2048 của Gabriele Cirulli. Mục tiêu của trò chơi là trượt các khối được đánh số trên một lưới để kết hợp

Le Phuong Anh 3 Dec 13, 2021
Generates and prints proxies for the card game Magic: the Gathering

MTG-Proxy-Generator This program generates proxies for the card game Magic: the Gathering. These proxies can then be printed off and used. These copie

Carl L. 1 Jan 31, 2022
This is a simple Tic-Tac-Toe game.

Tic-Tac-Toe Nosso famoso e tradicional Jogo da Velha, mas agora em Python. Development setup Para rodar o programa, basta instalar python em sua maqui

João Assalim 1 Oct 10, 2022
Tekken-python-ml - A project of playing tekken game using python

Tekken Python Description Hi this is new project of playing tekken game using py

Programminghut 13 Dec 30, 2022
A Python based program that displays Your Minecraft Server's Status Infos.

Minecraft-server-Status This (very) small python script allows you to view any Minecraft server's status Information Usage Download the file, install

Jonas_Jones 2 Oct 05, 2022
A popular children's game developed in Python.

Pedra Papel e Tesoura Um dos jogos mais populares da infância... 🪨 📜 ✂️ 💻 Situação do projeto: Projeto finalizado ✔️ 🛠 Tecnologias: Python Tkinter

Arthur V.B.S. 2 Dec 05, 2022