Giter Club home page Giter Club logo

hotspybot's Introduction

HoTS Py Bot

This is a pixel scanner (on steroids) bot for Heroes of The Storm, a MOBA by Blizzard This projects makes extensive use of the OpenCV2 library for python, it uses threads and processes to parallelize the screen analysis making data acquisition really fast and on par with human performace.

The goal for this bot is to play and win games VS AI with the help of machine learning algorithms (in the future), in the current state the bot can determine:

  • Game State
    • Lobby
    • Roster
    • Loading Screen (and map side)
    • Thanks screen
    • In game screen
    • mvp screen
    • after-game screen (leave screen) Once in game it can track:
  • Own hero HP
  • Teams levels
  • Map:
    • own structures
    • enemy structures
    • camps / objectives
    • Player position (dodgy)

All this is possible tanks to the use of the opencv2 library. It uses 2 types of matching, color matching and tempalte matching to determine the game state and track structures players and hp.

The short-term goal is to make it gather enough data to feed to the ML algorithm.

How to run the bot

Requirements

  1. python 3.9.x
  2. tesseract-ocr
  3. redis server

Setup

  1. clone the repo: git clone https://github.com/mozempk/HoTSPyBot.git
  2. cd into the repo folder: cd /path/to/HoTSPyBot
  3. create a python 3 virtual environment: python -m venv /path/to/repo/HoTSPyBot/.venv
  4. activate the virtual environment, you will need to run the proper activate script for your OS. plese refer to this guide
  5. if you haven't already, install tesseract-ocr, refer to this guide
  6. install python dependencies: pip install -r requirements.txt
  7. generate the template files:
  cd /path/to/repo/HoTSPyBot/Utils
  python ./templateFileBuilder.py
  1. create a .env file in the root of the repo
  2. inside it place the redis connection string, eg: REDIS=redis://default:password@host:port
  3. run the main script: python main.py

You can checkout app state updating in real-time at http://localhost:3000

Data that remains to be acquired:

  1. enemy and allied heroes position in the hero's FoV
  2. track enemy and friendly minions in the hero FoV
  3. Teams' level (OCR)
  4. Own cooldowns (OCR)
  5. determine What own spells do (it needs to be as generic as possible) ?

hotspybot's People

Contributors

gsalucci avatar

Stargazers

 avatar  avatar Onur avatar  avatar Guillaume Le Biller avatar MatiasOjeda avatar Abdalrahman Saqr avatar  avatar Aaron avatar  avatar  avatar OzgunKB avatar Patrick Magee avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

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.