Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent action if unit already has that action #249

Closed
tweakimp opened this issue Feb 27, 2019 · 7 comments
Closed

Prevent action if unit already has that action #249

tweakimp opened this issue Feb 27, 2019 · 7 comments
Assignees

Comments

@tweakimp
Copy link
Contributor

tweakimp commented Feb 27, 2019

Many python bots suffer from sending the same action many times, for example if an army is sent over the map and gets the same attack command every frame.

We should filter out unnecessary commands in do_actions or combine_actions

@tweakimp tweakimp self-assigned this Feb 27, 2019
@mindme333
Copy link

mindme333 commented Feb 27, 2019 via email

@Lambdanaut
Copy link
Collaborator

So if the order_target corresponds to the new action, just don't do the new action?

@tweakimp
Copy link
Contributor Author

tweakimp commented Mar 2, 2019

the action has to be the same,too
in your example, if you attack a point and then move to that point, you wouldnt do the move

@Lambdanaut
Copy link
Collaborator

Lambdanaut commented Mar 2, 2019

okay, makes sense.
I think if we do this we should add an optional flag to force_action in case there is some edge case.

@tweakimp
Copy link
Contributor Author

tweakimp commented Mar 2, 2019

Do you think the single actions should have this option or the do_actions function? That means: do you want to force every action for that do_actions call or only specific actions?

@Lambdanaut
Copy link
Collaborator

I think it makes sense to change both of them, if it's not too much work.

@tweakimp
Copy link
Contributor Author

Fixed in #252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants