Skip to content

Automation bot for "The Ants: The Underground Kingdom"

Notifications You must be signed in to change notification settings

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