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] Prioritize Win Conditions when possible #5

Open
cpojer opened this issue May 7, 2024 · 0 comments
Open

[AI] Prioritize Win Conditions when possible #5

cpojer opened this issue May 7, 2024 · 0 comments

Comments

@cpojer
Copy link
Contributor

cpojer commented May 7, 2024

Right now the AI does not consider win conditions besides escort by label/amount. When there is a capture win condition for another player, the AI should actively try to deny those captures. If there is a capture win condition applying to the AI, it should produce more units with the capture ability and focus on the capture targets (either all buildings or filtered by label). If there are defeat (one) by amount or label conditions that apply to the AI, it should seek out the corresponding units in particular.

You can find more info about how to set up win conditions in code in WinConditions.test.tsx.

Steps

I believe a good start is to tell the AI about capture-able targets (or specific opponents to attack) by adding them to the "interesting vectors" list in getInterestingVectors or getWinConditionVectors. For building more units with the capture ability, determineUnitsToCreate and its callsites are most relevant.

AI Info

The current AI is called DionysusAlpha and its code can be found there. There are also many AI specific helpers in dionysus/lib. Check out the AI Playground.

Test for new AI behaviors should be added to AIBehavior.test.tsx. These tests must fail without the change from this issue, ie. they must ensure that the AI deterministically implements the new behavior.

Funding

  • We're using Polar.sh to distribute funds.
  • You receive the reward once the issue is completed & confirmed by Nakazawa Tech.
Fund with Polar
@cpojer cpojer changed the title [AI] Prioritize denying or going for captures when there are "capture by label" or "capture by amount" win conditions [AI] Prioritize Win Conditions when possible May 8, 2024
@cpojer cpojer added the ai label May 8, 2024
@polar-sh polar-sh bot added the Fund label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant