Git Product home page Git Product logo

Comments (2)

tmarenko avatar tmarenko commented on July 16, 2024

Optimization = Why not let bot remember in how much time a level is been completed and then only check for Home Screen Button

Because you could change team or characters in team and this data will become irrelevant. Storing this info is addinional problem. Checking only from Home Button is an additional problem which I described below.

after the battle is ended Bot checks for Notification error

There is multiple notification such as: "All stages done" notification, shield lvl up notification, notification when you see new item in rewards list, etc. Full list here: https://github.com/tmarenko/mff_auto/blob/master/lib/game/notifications.py#L224
All notifications which happen at the of the battle should be checked because bot can't progress without clicking "OK" or "Tap to continue" in-game buttons.

only check for Home Screen Button

That would work in 6.x.x version of the game but in 7.x.x they introduced transparency for Home button.
Structual similarity (https://github.com/tmarenko/mff_auto/blob/master/lib/structural_similarity/ssim.py) for transparent image isn't so good: for example, that's why I was forced to changed it inside Co-op. Lower similarity for transparent image would cause false recognition. Someone emailed me about this: they set 0.5 threshold for Home button and it falsely triggered "end of battle" condition before even starting the battle.
Checking text from in-game interface seems more stable than images so I usually try to minimize checking images.

Network Error Issue recognization could be ease.

Network Error notification can occur anywhere after clicking on button in-game or at the end of the battle.

First problem is to determine when bot will need to check for this notification:

  1. after any click_button except while battling (in battle that will slow down spell casting)
  2. while looking for "end of battle" condition
  3. or maybe check whenever 'wait_until' function is triggered?

The second problem is how to decorate it:
https://github.com/tmarenko/mff_auto/blob/master/lib/game/game.py#L70-L85

There is already two applicable decorators and there could be problems if we ll need to undecorate function back. Order of decorators isn't set somewhere so it's possible to unpack function at wrong state.
Probably should make separate module for decorators and ordering to prevent this problem.

Honestly, I've just forgot about Network Error feature. I'll look into this feature again.

from mff_auto.

dbzdivik avatar dbzdivik commented on July 16, 2024

closing this too

from mff_auto.

Related Issues (20)

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.