-
Notifications
You must be signed in to change notification settings - Fork 237
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
Add an initial setup for the AI base chunk manager #6677
base: develop
Are you sure you want to change the base?
Conversation
This looks good. A couple of things that popped into my head. How could we make it easier to include adjacency information in the chunk? having a reference to adjacent sites so an AI could say build a factory here, what sites are adjacent to that? That would make adjacency much easier to figure out since they would instantly know what was available and what sizes they are so for example an AI would know if it wanted to build a t3 artillery what sites would be required to fully power it with t3 pgens. It would also help when it comes to reclaiming site positions since the AI would understand the preferred priority as it shifts tiers. The front facing edge, which you mentioned could be simply set by the cursor position when the template is created. Black listed positions. Which would not be something the chunk would include pre game, but having a data table for it, would be important at usage time. The AI can identify resource points and blacklist those positions when I chunk is queried. But that sounds very complex to get right when it comes to adaptive maps or something strange like crazy rush. Can it have multiple TypePreferences for an offset? e.g If I have a TypePreference of TECH3, would I be able to still put a TECH1 unit there if the same size (obviously factories come to mind). Or would we be looking to use different chunk templates instead? I guess that would depend on what is recorded when an AI uses one to start building somewhere. Template BIAS. Being able to say that a template has a bias category, simply front/rear from a start position. Not sure how to easily capture that. But being able to identify a chunk that we want to use at the rear of a base rather than the front of the base and vice versa. The AI can determine the direction of front and back in game. |
Description of the proposed changes
Continuation of #6674
Revisits the base chunk format to be easier to use. Introduces a small base chunk manager that we'll use in the near future to load in the base chunks of an AI. It is a brain component, therefore existing AIs can add the component and then load in the chunks that they find relevant.
Testing done on the proposed changes
The following:
Is turned into:
Additional context
Also introduces a utility function to convert a base chunk into a regular build template. This will be used in the future to debug the loaded base chunks 😄 !
Checklist