Egoistically / ALAuto

Azur Lane bot based on azurlane-auto. Discord: https://discord.gg/vCFxDen.
Do What The F*ck You Want To Public License
105 stars 43 forks source link

Get's stuck when unable to reach enemy #33

Closed nooblvlboss closed 4 years ago

nooblvlboss commented 4 years ago

When the bot selects an enemy that the fleet can't reach, it seems to be stuck there. This seems to only happen if the enemy is not a boss. I had to manually select an enemy.

bot error log
Egoistically commented 4 years ago

Was this on an event map?

MetalDevOps commented 4 years ago

Was this on an event map?

can we using on event map? LUL

nooblvlboss commented 4 years ago

No it was on 8-4. I think the issue was I exited the map and came back manually (like when the bot killed 1 enemy). It went on clearing map as usual but then got stuck when it was unable to access. The bot seems fine if I don't touch it at all though.

Egoistically commented 4 years ago

can we using on event map? LUL

Yes and no, assets can be manually added but it will treat it as a normal map.

No it was on 8-4. I think the issue was I exited the map and came back manually (like when the bot killed 1 enemy). It went on clearing map as usual but then got stuck when it was unable to access. The bot seems fine if I don't touch it at all though.

Yeah you are not supposed to interfere in any way. So now it works fine?

nooblvlboss commented 4 years ago

Yep!

MetalDevOps commented 4 years ago

Farming on 10-3 and got stuck like our friend

the bot keep click on mark

I dont do anything, was the 3rd run without problems.

nooblvlboss commented 4 years ago

Sorry for re-opening this issue. Just woke up, and same thing had happened.

hjk22 commented 4 years ago

I believe the problem is that the target type is added together with the coordinates to the blacklist, so the script is unable to correctly filter them out. In combat.py line 282 to the variable location is assigned the result of the get_closest_target function, which contains also the target type. Try substituting this line with location = self.get_closest_target(self.blacklist)[0:2], this should solve this issue.

MetalDevOps commented 4 years ago

I believe the problem is that the target type is added together with the coordinates to the blacklist, so the script is unable to correctly filter them out. In combat.py line 282 to the variable location is assigned the result of the get_closest_target function, which contains also the target type. Try substituting this line with location = self.get_closest_target(self.blacklist)[0:2], this should solve this issue.

Will try, thanks.

Egoistically commented 4 years ago

Should be fixed with @hjk22's solution. Pushed it already https://github.com/Egoistically/ALAuto/commit/01e18b5a06064e3c8964802a30fe2d1d7112abd9. Please let me know whether or not it works.

MetalDevOps commented 4 years ago

looks like it didn't work, farming at 7-3 got stuck here

I marked X where the bot was clicking

Egoistically commented 4 years ago

It's a different issue at least, the blacklist checks for exact coordinates and those are different by a pixel or a few. Some kind of checker for near coordinates needs to be coded to solve that. Will check it out tomorrow.

MetalDevOps commented 4 years ago

It's a different issue at least, the blacklist checks for exact coordinates and those are different by a pixel or a few. Some kind of checker for near coordinates needs to be coded to solve that. Will check it out tomorrow.

alright, no problem.

Just another example

I marked X where the bot was clicking

I noticed that whenever the node ends in this pattern gives error in this map.

7-3 btw.

Egoistically commented 4 years ago

@whoamikyo Try this: https://github.com/Egoistically/ALAuto/commit/8551e862a2ca02a46d5502ec1d19a82ce90df826, now it filters close coordinates too. I have no idea about the bot clicking on that red cross, it is kinda nonsense.

MetalDevOps commented 4 years ago

@whoamikyo Try this: 8551e86, now it filters close coordinates too. I have no idea about the bot clicking on that red cross, it is kinda nonsense.

Testing now, thanks.

MetalDevOps commented 4 years ago

Looks like it didn't work, the bot tries to reach the target but even giving error because the path is closed, he keeps trying.

Egoistically commented 4 years ago

@whoamikyo Now? https://github.com/Egoistically/ALAuto/commit/5419ff24eaee965a73b1d00b24f30fa45d3ba169.

MetalDevOps commented 4 years ago

let me test again.