Agents Discussion

On the subject of agents I think we’re all keen to move away from the little X’s however I don’t think it’s obvious how to move forward so I wanted to open a discussion about it.

We talked about just turning oxytoxy into a compound cloud but that has a couple of problems.

If you are vulnerable to your own oxytoxy that could make things quite complicated. For example we will have to write a pathfinder for the ai so it doesn’t kill itself too much. Will it be annoying for the player to have to swim around your own clouds?

If you are not vulnerable to your own oxytoxy then how do we display that? Does each species have a different coloured cloud? If so this will make the screen a crazy rainbow mess. Can we communicate “these are all oxytoxy but from different species” using only colours?

Moreover where are we going with the agents system in general? I can kind of see three ways forward:

  1. We work on some individual agents now (like slime / oxytoxy / signals etc) but then switch to a lock and key method later.

  2. We go straight from X’s to a lock and key method.

  3. We don’t do a lock and key method, keep things simple, and just do individual agents with single effects for the whole stage.

So what does everyone think about this? Where would you like to go in the long run? Do you have any ideas for oxytoxy, and other agents, affecting your own cell?

2 Likes

I mentioned on slack a while ago regarding the immunity of a species to its own toxins. There are very few (if any) examples of creatures in nature who are not immune to their own venoms. Not being immune would essentially be an evolutionary dead-end. With that in mind I am very much in favor of the lock and key method. This means species with sufficiently similar toxins would be essentially immune to one another’s attacks. However, the question is how do we illustrate the “closeness” of various toxins? I don’t think that different colored clouds is a good option because those are already used for compounds. Perhaps a good solution for representing toxins that allows the player some means of deciding if their own toxin is sufficiently similar for it to not pose an imminent threat is to simply render all toxins as the same color but to illustrate the difference between your own toxin and the other toxin via their intensity. If you have no toxins then they all appear a very menacing deeply saturated red (or purple or whatever). If you develop a toxin then you see your own cloud as a much less saturated version of the same color indicating that it will not harm you.

2 Likes

I suppose that I should add that the way i was picturing this was with agents essentially just doing straight damage to other cells. I think this should be relatively easy to implement in a lock & key fashion and we can always expand on it later. Naturally I’d eventually like to have agents that target specific organelle and species who can resist things without having stores of the agent themselves. But, for ease of implementation, I was thinking that cells w/o a toxin vacuole (since that’s what’s currently in the game) have a variable toxin_type = [0, 0, 0, 0, 0, 0] once the player cell acquires a toxin vacuole its toxin_type changes to be something like [1/sqrt(6), 0, 2/sqrt(6), 0, 0, 1/sqrt(6)] (note that the magnitude is 1). Suppose it attacks 2 different cells with its toxin. Enemy 1 has toxin_type = [1,0,0,0,0,0] and enemy 2 has toxin_type = [0,0,1,0,0,0]. The damage dealt to these enemies would be the magnitude of the difference between the cell’s toxin_type and the enemy’s divided by sqrt(2) times the base_damage.
In the example given above the player cell will deal approx 76% of the base_damage to enemy 1 and 42% to enemy 2.

What do other people think? Should I make a quick mock-up code for this sort of thing? Does anybody have a better idea for something we can implement easily and refine as we go?

1 Like

Firstly I think the saturation of colour idea is nice, it’s very elegant.

Do you think it would work for all aggressive agents? For example rich, saturated red could mean “this agent will effect you a lot” and dull, washed out red could mean “this agent won’t effect you much” without giving away what the agent does? Presumably as a player you only need to know to avoid it, you don’t need to know upfront what it will do to you.

Secondly re locks and keys I wonder if from the players perspective it’s quite hard to operate. Like choosing a bit string is quite a lot like building proteins but it’s quite hard to think in 6 dimensions.

What if each lock and each key was a 2d vector and, as you suggest, the intensity of the effect could be proportional to the distance between them. That way we can plot them all on a 2d graph and the player can easily see where to place their key for maximum effect.

Here’s an image where the blue x’s are the lock coords and the red x is the key coords. Is this rather simpler to understand? Like is it more obvious which species the red key will effect?

1 Like

That is definitely easier to display graphically to the player but allows less diversity in toxins.

I’m not sure which property is more important.

1 Like

I think it comes down to how exactly we want to allow the player to edit their toxin. If they’ve got 2 knobs to play with for the 2D toxins then it’s very easy to understand how that would work. I’m personally in favor of a higher dimensionality because that opens the door for us to have each dimension actually have specific meaning in the future. Perhaps the first element targets the cell’s membrane, the second element causes the vacuoles to drain, etc. Either way once we have a basic system in the game it’s a fairly simple matter to change the dimensionality and we can start with an intermediate value (say 3 or 4) and see if people have a hard time understanding it.

2 Likes

I think a prototype of the “pick your agent screen” might really help.

Imagine I have just added an agent gland and it’s asking me to enter the code / key for that agent.

Assume for now that the only thing the agent does is damage, proportional to how well its key fits the lock.

How do I make this decision? What am I looking at? How are the possible keys displayed (graph? list? chart of some kind?)? What info do I have on other cells locks (can I see all cells locks or some part of their locks or do I have no info)? etc.

I think it’s got to be reasonably simple because the player might have several agents and they might adjust their codes quite a lot so it can’t be hugely complex.

If you fancy thinking about it having something to play with would be awesome. Just to kind of have the experience and see if it’s a cool choice.

I might get around to that sometime this weekend. Having an editor window to adjust the properties of a specific organelle is worth doing though because we can use the same template if we want players to be able to specialize other things as well.

Edit: Pushed a basic prototype for 3D toxins. since we force magnitude to equal 1 it’s easily represented in 2D space.

1 Like

I was thinking a bit more about this.

Having agents be a protein the player designs is a cool feature. I think microbes predominantly communicate and interact with the world via proteins so if we can model that then it could be a powerful, realistic feature.

I wondered if, as a player, if what you would really want is to be able to specify what the agent does and not what it’s code is. So I might want to say “this cell is too fast to catch, give me an agent that powers down it’s flagella” rather than saying “I want an agent with code 01001010, let me know what that does”.

So here’s a diagram for a possible menu system where you select which agent to program, which cell it will primarily effect and which organelle it would primarily effect and then the game tells you what the code of that protein would be and what other effects it would have. I feel like that’s reasonably straightforward to operate, but it does mean you can’t make an agent that’s 50% targeted to one organelle and 50% to another. Can you imagine using it? Does it make sense?

The lock on the left would let you spend MP to reset your locks on your organelles to reduce the effectiveness of other cells agents.

What do you think about “alien base pairs”? So instead of “ACGT” we could pick 2,4 or 6 random letters to be that planets basecode and then display the agents to the player in that code. Whatever is happening under the hood (like bit strings / code distances etc) may not be of much interest to the player and we could hash it in to an alien dna string.

I like the idea of having players decide what they want things to do and then the game doing all of the rest behind the scenes. However, there are likely to eventually be hundreds or even thousands of species so I think that the agents shouldn’t target “Species 1 mitochondria” but instead it should target mitochondria in general. Using a 6 digit string for instance we can say mitochondria damaging is the first element. If a cell has agent [1,0,0,0,0,0] then they specialize entirely in shutting down the mitochondria and trying to paralyze their prey by preventing ATP production so that they can then approach and kill it via engulfment or a straw. However, being so specialized, all a cell needs to defend against such a thing is some [1,0,0,0,0,0] proteins of their own. On the other hand say a cell wants an extremely general agent that has many effects but doesn’t do any of them particularly well. Their code would be [1,1,1,1,1,1]/sqrt(6) and this would be effective at damaging any specialist (against the first cell I mentioned only 1/6 could be resisted) or undefended cell while having the added benefit of providing the cell with a general antitoxin to defend against anything thrown at it albeit not extremely well. The effectiveness of your agent will still vary from cell to cell due to the potential presence of an agent of their own or due to their organelles. If you specifically target mitochondria then you will have no effect on cells that only have chloroplasts, if you generalize then some of your agents effects are useless against a cell without flagella, etc.

This is the idea I had in mind when I said

Interesting.

If we had one agent per organelle, one that shuts down flagella and one which shuts down chloroplasts etc. And you could choose whether to fill your agent gland completely with one of them or with a mixture of several of them. Would that be equivalent to the system you’re proposing?

Like [1,0,0,0,0,0] would be an agent gland completely filled with mitochondria agent and [1,1,0,0,0,0]/sqrt(2) would be half and half mitochondria and flagella agents?

That’s one of the options that was mentioned in the op. I think it’s clearer than a bit string approach and easier to operate, however I think it’s less deep.

Also with anti-toxins would it ever really be worth developing them? If species 1 has a good agent that kills me would I not be better getting an agent that kills species 1 rather than trying to stop them killing me? In the sense that a good offence is the best defence.

I’m proposing that the “anti-toxin” for species 1 is to copy species 1’s toxin. That way you’ve improved your offensive capabilities against all species that don’t have that toxin and are now immune to species 1’s toxin.

that’s exactly the thought I had.

1 Like

I was reading a bit about viruses. Something I didn’t know before from wikipedia:

“Some viruses cause no apparent changes to the infected cell. Cells in which the virus is latent and inactive show few signs of infection and often function normally. This causes persistent infections and the virus is often dormant for many months or years.” (1)

and

“Viruses also leave cells through exocytosis, in which the host cell is not destroyed.” (2)

And that gave me an idea. If each organelle has a code / lock associated with it what if we had a type of virus that could hack agent glands to make more of itself?

So it’s a free floating cloud in the environment and if you absorb some of it then it will hack one or more of your agent glands so they no longer produce what you want but they produce more of the virus and constantly spew it out. If you want to defend against it you can change the code of your agent glands but the virus can also adapt over time.

What do you think? Is that reasonably realistic? I feel like losing control of one of your agent glands means you still might be able to unlock the editor so it doesn’t end your run, it’s just a handicap.

better off simulating viruses as small particles i think if we want to be realistic but it doenst need to be.

1 Like

I had a go at a super simple lock and key style agent system. Code is in the prototypes repo.

Each organelle has a lock, in this case 9 digits long. The first 6 digits are the same between all species (so every mitochondria in all species has the same first 6 digits) and then the last 3 are customized by the species.

Here is a readout of the effectiveness of a random agent (key) and an agent which has been specifically tailored to attack species 0 mitochondrion. As you can see the random agent doesn’t have much effect on anything. The tailored agent is 100% against it’s target, reasonably good against the mitochondria of other species and not much use against other stuff.

I’d be interested if anyone has opinions about things like:

how much should an agent aimed at a mitochondrion of species 0 effect the mitochondrion of species 1? How much should an agent aimed at a mitochondrion effect a chloroplast?

Code Output

Basic Agent Simulator

Picking a Random Agent
My agent has code:
[0.6588051443708589, 0.8336697452742982, 0.37737886318665415, 0.9657502448263748, 0.6793901307535771, 0.4191261415580064, 0.5972539823703953, 0.9343545271389039, 0.2671055965430258]
and will have effect
Species: 0 , organelle: m , strength: 14 %
Species: 3 , organelle: m , strength: 14 %
Species: 1 , organelle: m , strength: 11 %
Species: 2 , organelle: m , strength: 10 %
Species: 0 , organelle: y , strength: 10 %
Species: 4 , organelle: y , strength: 10 %
Species: 3 , organelle: y , strength: 10 %
Species: 4 , organelle: f , strength: 10 %
Species: 2 , organelle: v , strength: 9 %
Species: 1 , organelle: f , strength: 9 %
Species: 1 , organelle: y , strength: 8 %
Species: 1 , organelle: v , strength: 8 %
Species: 3 , organelle: f , strength: 8 %
Species: 4 , organelle: v , strength: 8 %
Species: 2 , organelle: c , strength: 7 %
Species: 2 , organelle: y , strength: 6 %
Species: 4 , organelle: m , strength: 6 %
Species: 2 , organelle: f , strength: 5 %
Species: 0 , organelle: c , strength: 5 %
Species: 0 , organelle: f , strength: 4 %
Species: 0 , organelle: v , strength: 4 %
Species: 3 , organelle: v , strength: 4 %
Species: 1 , organelle: n , strength: 4 %
Species: 4 , organelle: c , strength: 3 %
Species: 1 , organelle: c , strength: 3 %
Species: 3 , organelle: c , strength: 2 %
Species: 2 , organelle: n , strength: 2 %
Species: 4 , organelle: n , strength: 2 %
Species: 3 , organelle: n , strength: 2 %
Species: 0 , organelle: n , strength: 1 %

Targeting species 0 mitochondrion
My agent has code:
[0, 1, 0, 1, 0, 0, 0.7293874831919958, 0.5984416999416611, 0.3679633868455632]
and will have effect
Species: 0 , organelle: m , strength: 100 %
Species: 2 , organelle: m , strength: 84 %
Species: 3 , organelle: m , strength: 78 %
Species: 1 , organelle: m , strength: 72 %
Species: 4 , organelle: m , strength: 57 %
Species: 0 , organelle: y , strength: 25 %
Species: 2 , organelle: c , strength: 22 %
Species: 2 , organelle: v , strength: 22 %
Species: 1 , organelle: v , strength: 21 %
Species: 0 , organelle: c , strength: 20 %
Species: 1 , organelle: y , strength: 18 %
Species: 4 , organelle: y , strength: 18 %
Species: 0 , organelle: v , strength: 17 %
Species: 4 , organelle: v , strength: 16 %
Species: 4 , organelle: c , strength: 15 %
Species: 3 , organelle: y , strength: 14 %
Species: 3 , organelle: c , strength: 14 %
Species: 2 , organelle: y , strength: 13 %
Species: 3 , organelle: v , strength: 13 %
Species: 1 , organelle: c , strength: 10 %
Species: 3 , organelle: f , strength: 8 %
Species: 1 , organelle: f , strength: 8 %
Species: 4 , organelle: f , strength: 6 %
Species: 2 , organelle: f , strength: 5 %
Species: 0 , organelle: f , strength: 5 %
Species: 1 , organelle: n , strength: 0 %
Species: 2 , organelle: n , strength: 0 %
Species: 4 , organelle: n , strength: 0 %
Species: 3 , organelle: n , strength: 0 %
Species: 0 , organelle: n , strength: 0 %

Why are there some 0% values? Is the specialized toxin perpendicular to all “organelle n” locks?

1 Like

Here’s the function that compares two codes. I put the result to the 5th power so if an overlap is not very high then it gets squashed pretty hard. Those 0%'s are roundings of numbers less than 1.

def compare(s1, s2):
	score = 0
	for i in range(len(s1)):
		score += 1 - abs(s1[i] - s2[i])
	return (score/bitstring_length)**5

As of now, toxins in Thrive merely act as a ranged weapon for the celluar stage. The various ideas I have aggregated here are intended to address the various complaints from players and the simplicity of the toxins. I have presented this to provide materials for discussion on the subject, and would like to hear what anyone would like to share or criticize.

Toxins and Customization
To begin, we all know that in reality there are hundreds of various unique toxins and compositions with different targets and effects. However, in Thrive we will either have to collapse these endless varieties into a select few representative toxins, or lend the player the creative freedom of designing a toxin with unique traits. I have elaborated on the two proposed methods below. Keep in mind that toxin customization would likely need a new UI element, perhaps attached to the oxytoxisome.

  1. Basic premade toxins categorized into types like A, B, and C (letters replaced with names once included). alongside basic protein complexes or metabolosomes to combat them.
    Having atleast 3 varieties of premade toxins that behave differently would grant cells diverse methods of hunting and defense. For example A could act as the current toxin and simply deal damage, while B could act as a motile inhibitor, slowing afflicted cells enough to be caught.

  2. Customizable toxins. (Could still be categorized based on effect.)
    Toxins would be customizable in how deadly, persistent, or iresistable they are, as well as what functions they target in the afflicted cell. With the sheer amount of potential toxin types that could arise from this, the toxins would likely still need to be categorized based on how they effect the cells for the sake of resistance and simplicity (EX: all toxins that deal flat damage are considered A type).

Now I’m sure everyone will immediately favor option 2 as more customization is always favorable. However, the most immediate problem with such vast customization is going to be the amount of unique editors and menus required for being able to customize anything. Having too many menus and editors could force the game to develop a steep learning curve and a generally overwelming depth that could confuse many players. That doesnt mean we can’t have it however, as we could have both versions of this idea, basic and advanced for the player to choose. But that is a discussion for another time.

Toxin Behavior
As of now, toxins in thrive simply inflict damage on cells when they collide. The idea I proposed below is intended to turn toxins into a more dynamic and unique threat from basic physical damage.

Instead of an immediate effect on the cell, toxins could instead collect inside the target, remaining harmless until the critical limit is reached. Once this limit is surpassed, the cell will be afflicted with the detremental effects of the toxin until the build-up is reduced back to safe levels. Toxic buildup will gradually decrease over time, and could potentially be hastened by specialized metabolic processes. Additionally, certain cell walls and membranes could increase the build-up limit, allowing the cell to contain more toxins without harm.
This method greatly appeals to me, but it could potentially be difficult to code, along with potential complications in how the build-up could be effectively represented to the player.

Toxin Delivery
Alongside how toxins effect cells, introducing new and alternative ways to deliver them is just as important to making toxins a diverse threat. Below are methods I have proposed on how to implement such features.

  1. Organelle upgrades:
    The oxytoxisome could be upgraded into different forms that will deliver toxins in new ways. This would be a simpler method once organelle upgrades are implemented.

  2. Toxin delivery tied into behavior:
    The method that cells deliver their toxins could be included in the behavior editor. This could make it easier to switch between delivery methods as you wouldn’t need to mess with upgrading or downgrading specific parts. However, we would need to see about how to handle choosing multiple delivery methods in the options.

  3. Toxins tied to parts:
    Similar to concept 1, toxin delivery could be tied to specialized or altered parts rather than the oxytoxisome. An example would be a pilus being upgraded to deliver toxins.

Toxin Resistance
With toxins already being a considerable threat to cells, it makes sense that defending yourself from them must be reworked alongside the new features to keep the game balanced and fun. Just like how it works in the game now, toxin resistance could be a percent decrease to the effectiveness of the toxins, whether it be decreasing amount of build-up or amount of damage. However with there being three or more types of toxins, toxic resistance may need to be split into several individual values relating to each type. Doing this will ensure that it will be very expensive, if not nearly impossible to build complete immunity to all toxins.
If we choose to use the build-up system for toxins, it may be suitable to allow the cell’s own toxins to harm them should they not be immune, or otherwise unable to dispose of it quickly enough. This could be problematic with AI toxic cells however, so keep that in mind. Otherwise with the immediate effect system it might be best to leave cells invulnerable to their own toxins.

  1. Specialized Organelles:
    Toxic resistance could be increased by the use of specialized metabolosomes that break down the toxins faster, or membranes that provide a net resistance to all toxic intake. Oxytoxisomes could also provide an amount of resistance to the cell’s own toxin, but not as much as specialized organelles.

  2. Enzyme/Protein slots:
    This idea has been discussed before, and still remains as a potential option for toxic protection. The proteins and enzymes utilized for this feature are free-floating in the cytoplasm rather than being centered in an organelle complex. So they do not take up space in the cell, or are tied to a placed part by traditional means. My take on this idea would be that all cells have atleast 2 slots that they can place any component from a list into these slots. Placing the same compound into multiple slots would increase the effectiveness of said compound. The size of your cell could potentially provide more slots for this, as well as the presence of a nucleus.
    Toxic resistance could be tied into this mechanic by allowing cells to have free-floating enzymes that neutralize a specific toxin when encountered. The problem with this method is that the location of the slots is still a subject of discussion, along with complaints that this feature is “too gamey”.

I hope that what I have posted here sparks constructive discussion on the matter of toxins and how they could work. My own preferences are point 2 for customization, Point 2 for toxic delivery, and both 1 and 2 for toxic resistance. I look forward to what others think about what I have brought to the table, as well as any provided ideas of their own.

3 Likes

Now that we can make particle effects easily i think it’s time to get rid of the X projectiles and change the way toxins work. As i said on discord, i want toxins to be clouds that damage cells inside them, but there have been other proposals, like flamethrower-like projectiles, toxins that explode in an area and even an editor that lets the player make anything in between.

Concepts

CE3F83F3-8494-48EF-AC3E-0E67F3591576 shot 1

I suppose using a simple projectile is good enough for this release (i even made the particle effect already) but since we have all these new proposals i think we need to discuss how would they work and their impact on gameplay.

EDIT: I think is better to move this to this thread, since last message already mentions customization

I think all of these ideas for how toxins work would be great to have. maybe its something that should be added to the behavior editor whenever we are doing work on that?