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] Medics and Support Ships should heal nearby units #4

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

[AI] Medics and Support Ships should heal nearby units #4

cpojer opened this issue May 7, 2024 · 6 comments
Labels

Comments

@cpojer
Copy link
Contributor

cpojer commented May 7, 2024

The AI currently does not know how to heal units. The Medic and Support Ship can heal various unit types, specified via healTypes. You can see how it is used in the getHealableVectors library function.

Implementation

For this task, the AI should receive a top level function healUnit that filters units that can heal units and finds nearby units to heal. It should make a good choice about whether to heal other units by considering health, cost of healing, and how many funds the AI is generating and/or whether it needs to build units or buildings instead. You may want to consider defining a weight for whether a unit should be healed or not, similar to whether an opposing unit should be sabotaged instead of attacked. getHealCost is used to determine to cost of healing a specific unit.

Additionally, the AI should consider building a Medic or Support Ship from time to time via its createUnit function.

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 added good first issue Good for newcomers ai labels May 7, 2024
@polar-sh polar-sh bot added the Fund label May 13, 2024
@ssaisrinivasdev
Copy link

Hi Team, I am getting this issue while setting up the project.
image
I followed https://athenacrisis.com/open-source/getting-started and had everything updated.
Anything am I missing?

@cpojer
Copy link
Contributor Author

cpojer commented May 20, 2024

This looks like an issue with Windows, please join our Discord's #tech channel for support.

@anan474
Copy link
Contributor

anan474 commented May 27, 2024

Anyone working on this? I want to attempt this issue.

@cpojer
Copy link
Contributor Author

cpojer commented May 27, 2024

There is no open PR for this, so feel free to create one.

@SnowDingo
Copy link

SnowDingo commented Jul 8, 2024

There is no open PR for this, so feel free to create one.

I'm currently working on creating a PR that closes this issue👍
And also, I was wondering what is the condition for medics to heal nearby units. Is there any limitation/requirements to medic's abilities?
スクリーンショット 2024-07-08 21 30 34

@anan474
Copy link
Contributor

anan474 commented Jul 9, 2024

@SnowDingo I have been playing a bit on this issue to learn the working of the AI. I have done the create healing units part here anan474@170a5d0 which is might be not ideal yet but you can use it. It calculate a score to create a Medic or Support Ship by considering the available heal units/building, units with heal needs and fund availability. I'm still trying to figure out the healing other units bit but might be slow going.

I'm currently working on creating a PR that closes this issue👍 And also, I was wondering what is the condition for medics to heal nearby units. Is there any limitation/requirements to medic's abilities?

I can think these might a good start to consider:

  • Weighting/sorting which unit need heal best.
  • Healing cost and available fund
  • Whether the target can be reached
  • If the move/action is suicidal (don't heal a unit which is near an enemy that can kill the medics, but let the target unit try to retreat to medic instead)
  • Whether the target unit is in or near a Shelter

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

No branches or pull requests

4 participants