How Should AI Use The Signaling Agent?

I’ve started this thread so that we can decide when, where, and how the AI should use the signaling agent once that gets added to the game.

There was a tiny bit of discussion about this on the GitHub issue, which I’ll link here: https://github.com/Revolutionary-Games/Thrive/issues/5118 (We should probably base this discussion on that.)

Just as a reminder, here are all the commands:

  • No command. (Could this one be useful in any way?)

  • Move to me. Non-player cells of the player’s species swarm the player cell.

  • Follow me. Non-player cells of the player’s species move towards the player cell, but maintain some distance.

  • Flee from me. Non-player cells of the player’s species move away from the player cell.

  • Become aggressive. Non-player cells of the player’s species become significantly more likely to attack and chase other cells around them.

1 Like

To actually get this rolling, I’ll say my initial proposal, based on the comments on the above issue.

Command When to use Required behaviour
Move to me Precursor to using the Binding Agent if there is one and conditions are right
Move to me Precursor to becoming aggressive for self-defense >=50% aggressive
Follow me Precursor to becoming aggressive for attacking >=75% aggressive
Become aggressive Self-defense* >=50% aggressive
Become aggressive Attacking >=75% aggressive
Flee from me Fleeing after being attacked <50% aggressive, >=33% fear
Flee from me Hasn’t moved much within 10 or so seconds, assumption is it’s being blocked by something >=50% active
No command 30 seconds or less after last command was used (Credit to “blak” on Discord)

* Attacking an organism as a response to being attacked by it

2 Likes

As you used it in the next post, probably default to this when other conditions are not met?

afbeelding
Here, I would say that the “Move to me” usage is not necessary, Follow me would be better for this use case. I don’t see why a less aggressive species should cluster together more and obstruct itself?


A few things come to mind here:

  • This should have the requirement that the species has pili or toxins, otherwise additional numbers will not help them in a fight.
  • There should be some quorum sensing here: they should become aggressive if there’s enough of them to win. Perhaps the required number of allies nearby to trigger it could depend on set aggression/bravery?
  • That’s a fairly high aggression requirement. Won’t species that already have such high aggression fight without the command anyway?
  • Come to think of it, this command should probably also increase bravery?

afbeelding
I don’t think putting in the fear setting requirement here is necessary. If microbe AI has decided to flee, that means it wants to run away from this other cell based on its fear setting. I think that’s sufficient.

afbeelding
Rather than using the behaviour requirement, I think it would be better to check if the cell is actively trying to move, but failing.


I can think of a logic scheme for the “should we fight back?” question that I will add later.

2 Likes

I agree because the “move to me” is basically only added to be useful for binding to other cells. So before the AI can use the binding agent, I think the AI should never send that signal.


Also one thing in general is that the microbe AI usually doesn’t totally lock behaviours for certain behaviour value ranges. Like instead of requiring 50% aggression value to ever use the become aggressive signal, I think there should be a range like if your aggression slider is maxed out the chance to be aggressive should be like 90% and instead if it is quite low, the AI could still have like a 10% chance to become aggressive (with 0% only being at quite passive behaviour).

Yeah, definitely need to avoid triggering this for sessile species accidentally.

3 Likes

I was thinking that maybe it’s made so that the commands that require aggression are used if RollCheck(speciesAggression, Constants.MAX_SPECIES_AGGRESSION, random) is true. Would that be a good idea?


Alright, here’s the updated table that incorporates your suggestions. Still not final.

Command When to use
Move to me Precursor to using the Binding Agent if there is one and conditions are right
Follow me Precursor to becoming aggressive, has pili and/or toxins
Become aggressive Attacking
Flee from me Fleeing after being attacked
Flee from me Trying to move but hasn’t been able to, assumption is it’s being blocked by something
No command 30 seconds or less after last command was used (Credit to “blak” on Discord)

I can’t remember the exact way to use the RollCheck (as the microbe AI is one of the rare systems that I did not write myself), but that looks like a pretty reasonable way.

1 Like

Definitely agree with not using certain behaviour setting thresholds as hard requirements, but rather as modifier on when to use certain commands.


So on those combat responses I was talking about previously, my suggestion would be:

Organism is attacked by Other:

  • Organism decides to flee (determined by fear and the Other’s stats):
    • Organism has no pili or toxins: Flee from me
    • Organism has pili or toxins:
      • It’s not (practically) possible to gather enough friendlies to reach a (fear and the Other’s stats-controlled) threshold: Flee from me
      • It is possible to reach that threshold:
        • There are enough friendlies nearby that it crosses the threshold: Become Aggressive
        • There are not enough friendlies nearby: Follow me
  • Organism decides to fight back:
    • Organism has no pili or toxins (just trying to engulf): No Command
    • Organism has pili or toxins:
      • Other is trivially weak: No Command
      • Else: Follow me / Become Aggressive Note 1

Does that look okay? I can write the same from the perspective of a potential predator deciding what commands to send.

Note 1: Not sure how Follow Me interacts with other situations. Do they just ignore everything?