IOODBot

Published on

This is a project I made to sharpen my skills in logical control and computer vision.

 

The Bot

This project mainly relies on the following:

The game I picked, "I'm On Observation Duty 6," was a good start for my next botting project. Gameplay only requires clicking. To play the game, you must monitor the locations and click on anything that changes. It can be very subtle. The first part of the bot needs to locate the positions of changes.

The bot uses OpenCV to do the following:

  1. Take a screenshot
  2. Break down the screenshot
  3. Compare sections with the base data
  4. Output the section with the highest difference

Originally, this bot was thrown together to annoy a friend. It would get a reference image and give its best guesses. The rest of the work was manual. It also wasn't very reliable. After writing it, I had the idea to give it autonomy. This required a higher reliability. What I didn't foresee was the problem of special case anomalies...

Special cases were a nightmare to work around. The bot is extremely good at telling you if there is an anomaly. It isn't as good at telling you what it is. In some cases, it struggles in where it is. For this reason, I needed to manage special cases by having the bot take a guess after every failure. It would guess in order of likelihood/severity of the type of special case.

The success of the bot is a race against the clock. The game is lost when 3 anomalies are missed for a small amount of time. If the bot misses only one anomaly, it puts the whole run at risk. The anomalies also show up at a fairly rapid rate. The bot needs to be as fast as possible and juggle multiple duties. For example, it will report an anomaly at the end of the loop, change the camera and capture the next screenshot, and then judge the next room. This cuts down time by dodging text that shows up on a failed report. This text would throw off the visuals. The only other option would be to wait about 10 seconds for the message to disappear. This is precious time that needs to be conserved.

A deep dive into the bot can be watched here:

https://www.youtube.com/watch?v=TZ2sEBo2Dmg

The program can be downloaded here:

https://github.com/GROTTAKE/ObserverIOODBot

Results may vary as your screen may be a different aspect ratio from mine.