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
Simple Covid-19 shooter game in python.

Covid_game 🍹 Simple Single Player Covid Game Using Python. 🍹 Has amazing background music theme. 😄 Game Instructions: Initial Health is 5, try to s

Tanya Yadav 2 Aug 05, 2022
A Python tic tac toe game

Tic Tac Toe A Python tic tac toe game To start the game, run python3 main.py First, you have to select the game level. Today, it has three levels In a

Phant 1 Jan 14, 2022
Easy and fun game to play a bit. Written in python

NumGuesser Easy and fun game to play a bit. Written in python

Lodi#0001 4 May 22, 2022
This repository contains the Unix Game challenges and metadata

This repository contains the Unix Game challenges and metadata

Nokia 7 Apr 06, 2022
source codes for my(small indie game developer) games

My repository for most of my finished && unfinished games Table of Contents Getting Started Prerequisites Installation Usage License Contact Prerequis

Gustavs Jākobsons 1 Jan 30, 2022
Minimalistic generic chess variant GUI using pyffish and PySimpleGUI, based on the PySimpleGUI Chess Demo

FairyFishGUI Minimalistic generic chess variant GUI using pyffish and PySimpleGUI, based on the PySimpleGUI Chess Demo. Supports all chess variants su

Fabian Fichter 6 Dec 20, 2022
Pong is one of the first computer games that ever created, this simple

Pong-Game Pong is one of the first computer games that ever created, this simple "tennis like" game features two paddles and a ball, the goal is to de

Lateefah Ajadi 0 Jan 15, 2022
Code for an arcade pop-a-shot style basketball game on Raspberry Pi

Basketball-Game Code for an arcade pop-a-shot style basketball game on Raspberry Pi, made over the course of winter break 2022. How To Run: Running th

Seth Reis 1 Jan 21, 2022
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
Algorithm to solve Wordle correctly 100% of the time within 6 attempts.

WordleSolver © Zulkarnine, 2022. Algorithm to solve Wordle 100% of the time within 6 attempts. You can go ahead and run main.py to run it for all 2315

Zulkarnine Mahmud 69 Dec 11, 2022
Launch any Heroic-Games-Launcher game using bash scripts without having to open Heroic.

HeroicBashLauncher Ever wanted to launch your EGS games installed through Heroic Games Launcher directly from the terminal, Lutris or any other fronte

288 Dec 27, 2022
We tried to recreate this classic game using python physics libraries.

We tried to recreate this classic game using python physics libraries. The result is certainly hilarious but enjoyable. One of my very first physics application.

Delwys Glokpor 2 Dec 12, 2021
游戏中按TAB键查看所有玩家分数的小程序

DDNet-show-points-in-game DDRaceNetwork 游戏中按TAB键查看所有玩家分数的小程序

3 Oct 13, 2022
Lutris helps you install and play video games from all eras and from most gaming systems.

Lutris Lutris helps you install and play video games from all eras and from most gaming systems. By leveraging and combining existing emulators, engin

Pop!_OS 2 Nov 15, 2021
Games: Create interesting games by pure python.

Create interesting games by pure python.

4.2k Jan 06, 2023
A programme which basically has the same function as the actual Rock paper scissors game.

A programme which basically has the same function as the actual Rock paper scissors game.

1 Feb 11, 2022
A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras.

dinoGame A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras. Installation Download

1 Oct 26, 2021
2D ping pong game

pingpong 2D Ping Pong game How to play: player 1 w To move up s To move Down player 2 up To move up down To move Down To change the game settings, you

menachem 0 Mar 27, 2022
Krieg is a Python package for a general game framework.

Krieg Krieg is a Python package for a general game framework. It provides base classes for implementing simple games. Some example games are already i

Juho Kim 2 Jan 06, 2022
My first Minecraft CPU. Created in collaboration with Peer Carnes as a final project in CS 281: Architecture and Assembly at the University of Puget Sound

Minecraft CPU This is my first ever Minecraft CPU, created in collaboration with Peer Carnes. We created a custom assembly language, including an asse

Andy Chamberlain 4 Oct 10, 2022