So what your talking about is heading in a similair direction to what I was thinking. Rather than have a pure neural network where an output could be as simple as ‘wave left flagella’, you get more complex verbs like ‘flee microbe x’, as well as more complex senses like ‘target microbe has spikes’ rather than simply ‘target mass > x in direction y’.
I’m hoping that we can go a few levels of abstraction further, though I’m not sure how. Perhaps it’s a simplification if we replace ‘flee microbe x if score is < -5’ (with the weights you describe spikes = -3, toxin = -6), with ‘flee all spikes with weighting 3’ and ‘flee all toxin producers with weighting 5’. Perhaps not?
What I am fairly sure about is that we can use boids as basic building blocks. Behaviours like ‘approach’ can be weighted with positive scores for food/friends and negative scores for danger, and we can build custom behaviours for interactions with compound gradients, and combat itself.
That’s a more basic level than what you’ve been thinking about though (?) - given a set of senses to use, and a set of responses you can trigger, how do you link them up? In principal I agree with what your saying: everything that can be sensed is given some sort of weighting (which may be evolvable), and apply that to potential responses; probably with different sense-response combinations having different weightings.
Given a sensing range, there’s certainly enough information available for a microbe to choose which nearby cells are threats or food, pick the most important, and move appropriately. Whether you do something beyond simply moving towards/away (such as using offensive/defensive agents) is potentially a separate choice, or may be heavily linked to the first decision. Neural networks give more chance for interactions like that, individual weighted functions less so, though they also don’t exclude that possibility.
I definitely like the idea of these weights being modified by the cells status - being more aggressive when hungry for example - as well as environmental stimulus (time of day, temperature).
[quote=“tjwhale, post:3, topic:60”]
So if you are a microbe alone on the screen (which will never happen as the ai will only be around when the player is around but bear with me) you will decide if you like the concentration of compounds in the area. If you do you will hang around and if you don’t you will move off. That’s your relationship with the environment.[/quote]
This is the sort of thing we need to make possible, and again there are several approaches, either we can have a finite state machine detect no other cells present and switch into ‘resource gathering’ mode (no good, for all the reasons in the OP); or we could define some sort of hierarchy of behaviours, with interrupts: ‘gather resources’ is the least urgent default action, which is interrupted by the much more urgent ‘escape predator’. The third option fits my preference for continuous behaviour: microbes are always attempting to gather environmental resources (with a low weighting), and they are always running from predators (with a high weighting), so that when there is no predator present, resource gathering is the dominant driver of behaviour, but that becomes negligible when one appears.
Feedback from other cells of your species, or your internal state, can be added into any of the above systems. I’ve experimented with this before, but it’s incredibly difficult to balance manually (i.e.: having ‘run away’ be strong enough when needed, without being overpowering when not, is pretty tough; if you try to add a tendency not to run if in a herd, you’ll probably destroy the original balance, and have trouble both restoring that, and getting good responses in herds which are/aren’t big enough to provide defense). My experiments used almost exclusive linear weightings and (multiplicative) modifiers, so it’s probably that a more intricate control system (such as a neural net, or possibly logarithmic weightings/modifiers) would work better, and that a learning AI would be better at tuning the values - that’s no guarantee though.
The other massive questions is just what senses are/should be available? Can a microbe detect whether another cell has spikes, or an internal toxin organelle? Can it even detect its presence without touching it? Compound gradients will give some things away (it’s presence, leaked toxins from an organelle maybe, some idea of its size), but not everything (note that I’m not suggesting we use this information explicitly, we don’t want to be sampling compound levels for AI behaviour, but we can decide what is reasonably knowable from such information and implicitly sense that). This is something we need to discuss in more detail, but it potentially simplifies the available information, and the resulting behaviours, significantly (for the cell stage). It’s too late at night to go into this further now, so I’ll come back to it next time.
I suggested (on slack) that the players species behaviour should follow the same system as the AI’s, so that the building blocks available to the AI would be those available in the behaviour editor. I didn’t mean that the player’s cell should ever behave autonomously, though that might be interesting (in the sense that the player could build something similair to a macro used in an mmo game).
I’m still concerned that we simply won’t have enough replicates available to really train an AI, regardless of whether we use a neural net or something else - that’s still the main problem we need to solve.