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

AI will repeatedly build buildings in dangerous places, each time the building is destroyed #479

Open
expert74777 opened this issue Dec 20, 2024 · 2 comments
Labels
enhancement New feature or request hardcoded Issue cannot be fixed by modifying the ai scripts

Comments

@expert74777
Copy link

The AI will repeatedly build buildings in dangerous places, each time the building is destroyed, but will continue to build in that place, ultimately resulting in the AI not being able to develop its technology and troops very well.
I built a few defense towers on the far edge of the AI base and placed some of my own troops to guard them, but when the AI expanded their base to build buildings, they would come close to this dangerous place, and when the new buildings were destroyed, they would not go to a slightly safer place to build, but would continue to come to this dangerous place and keep building.
Eventually, the AI will not be able to develop its technology and troops.

@SMUnlimited SMUnlimited added hardcoded Issue cannot be fixed by modifying the ai scripts enhancement New feature or request labels Dec 20, 2024
@jzy-chitong56
Copy link
Contributor

jzy-chitong56 commented Dec 22, 2024

I think the logic of global takeover harvesting can handle this well, but I still insist on querying nearby threats every time the harvesting cycle is completed. It is indeed too resource intensive, especially when sending control instructions too centrally. I suspect it may cause lag

This is my logic
https://github.com/jzy-chitong56/AMAI-CN/blob/master/Jobs/FIX_BUILD.eai


However, that's not the point
The key is to distinguish between time periods
At the beginning of the game, the AI was attacked by the enemy TR, and at this point, he may not have been able to obtain the first hero. It is necessary and logical to avoid dangerous locations and build. The difficulty is how to determine where is not dangerous and suitable for construction

An optimal solution is to build it in an ally's home
If there are no allies, you can directly go to the enemy's house to build, or take a middle position between the two paths. Because the enemy can come, the distance should not be very far, but this may cause problems in repairing the building, especially for the human race
Anyway, it's difficult to counter TR without army, and ELF tree won't even stand up

If in the middle and later stages, early defense is the key, quickly killing the threat before it takes shape. The focus here is not on dealing with the construction logic. If the army are already gone, then it is meaningless whether to build or not


@SMUnlimited
Speaking of which, I would like to ask why you haven't dealt with the merging of TR yet.
Discover any serious issues again, or was it because there were too many conflicts in this branch?

@SMUnlimited
Copy link
Owner

Speaking of which, I would like to ask why you haven't dealt with the merging of TR yet.
Discover any serious issues again, or was it because there were too many conflicts in this branch?

Just time to look at it. And its not as much of a priority compared to other mechanics. Takes time to review, fix issues, test etc as well as the PR contains changes not related to tower rush or is changes already merged so takes longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hardcoded Issue cannot be fixed by modifying the ai scripts
Projects
None yet
Development

No branches or pull requests

3 participants