Skip to content

Toldy/the-ants-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

  • Didn't commit the code to not harm the gameplay of others.
  • Feel free to reach me here if you are interested
  • Curiosity-driven work (Atm the goal isn't to build a real solid software)

YouTube logoDemo on Youtube 👀

What is The Ants - Bot?

A program who will play for you when you cannot play at The Ants: Underground Kingdom

The Ants logo

What can it do?

  • ✅ Farm resources by attacking world monsters
  • ☑️ Resource gathering
  • ☑️ Provide Allance Help
  • ☑️ Claim Alliance Gifts
  • ☑️ Upgrade buildings of your AntHill

How it works?

Diagram

Stack

Problems encountered

☑️ BlueStacks sometimes makes my Mac BlackScreen during its startup
✅ OCR's Result isn't accurate (Multiple data on the same line)

→ 💡 Split this date in multiple cropped images + OCR them 1 by 1

details here When scanning this:

Tesseract can return:

  • 460 Dye 220/1,540 @ 84/100 &, 4.0K
  • 460 Dye 220/1,540 @ PAPAL!) &, 4.0K
  • even worse cases...

It is better like this: marchunit_screenshot_0_name

marchunit_screenshot_0_power

marchunit_screenshot_0_stamina

✅ OCR's Result isn't accurate (Application graphics aren't always aligned the same way)

→ 💡 Find better values for thoses crop zones

details here See those 2 cases with different stamina:

image

OCR Result: 100/100

image

OCR Result: PAPAL!) 🤯

I hardcoded the crop zone value when stamina was 100/100. When Stamina drops to 93/100, crop zone is bad (because it contains part of the insect image). OCR This produces noise and a bad OCR result like

☑️ OCR not consistent

→ 💡

details here

Bot modes

1. AutoFarming

Goal

Farm resources by attacking monsters as much a possible.

Advantages
  • You wake up with a lot resources :)
  • Provides XP for your special Ants
Features
  • ✅ Computes which resource you need the most before attacking a monter
  • ✅ Use all March Units available (only the first two are used at the moment)
  • ☑️ Automatically refills your March Units with available soldier ants
Prerequisites

You build your March Units before launching the bot

About

Automation bot for "The Ants: The Underground Kingdom"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published