Advertisement

Troublesome genetic evolution

Started by October 20, 2005 08:25 AM
12 comments, last by GameDev.net 19 years, 1 month ago
Hi i am no expert in genetic programming but i think maybe a "flat" model where u put all the input into one huge state machine and let it choose might be wrong.

maybe a hirachy approach will make it better. The reason is there will be more machines to teach per bug but each will have a smaller search space.
So you will have a machine to handle enemy presence and position input, machine to handle food presence and position etc..
At the top there will be a machine that will need to give priority to all the request and decide what is more important - this too can be a learning machine of some sort that take all the request and decide what to do next.
The exact details are probably wrong but i think this is (a bit) more close to how "real" bug would learn - the brain has different areas responding to different input. Some input is ignored by some areas of the brain etc...

But then again it might be totally wrong too :)
I also thought about such an approach, much like how a real brain works, but I decided a "flat" one would be simpler to create.

I thought that I could do a more advanced one later if I managed create the simpler one first. So I wouldn't end up with a half-finished program which I couldn't get to work...

Yesterday I added some new stuff, and worked out a few bugs, and it seems to work better now. Today I'm going to add "lessons" (just expose ONE bug at a time to NOTHING except FOOD, until I get one which can handle the situation). Then I'm going to leave the program running for a while to see what it comes up with.

It might work.

edit:
Oh, uhh... I forgot to mention, the major difficulty I see with such a divided-senses-approach, is that I can't figure out how the bug should choose what mode to focus on..?
If it's in "search for food mode", how can it decide that it should switch to "search and destroy mode" when it cannot detect nearby enemies? And similiar situations. (the enemy-sense is shut off since it belongs to "search and destroy mode")
----------------------~NQ - semi-pro graphical artist and hobbyist programmer
Advertisement
In response to your edit, if you have a divided senses approach, you could add one more layer which decides which sense to pay attention to. This could be based on various drives - hunger, proximity to danger, etc. This would be the first layer which decides which sense to run, which then provides the action.

Just my $0.02

-Kirk

The idea would be to have two levels (at least): The lower level is 'mode urgency' - it senses for one thing, and using some algorithm comes up with a number describing the ugency of that one state. For example, you might have a 'food detector' that returns 1 when food is right below, and 0 when food is very far away. Then you could have an 'threat detector' that returns 1 when enemies are nearby and 0 when they are far away. Using these priorities, you can go into different states. For example one state might be FoodNear that is activated when the food detector is >0.75 or higher and enemy detector is 0.75, and a third might be FoodAndEnemyNear for when both are >= 0.75. Because FoodNear and EnemyNear both handle only one stimulus, they can have far fewer states. FoodAndEnemyNear will have more states, but you could even make it call EnemyNear if Enemy>Food or FoodNear if Food>Enemy, or make it call both and assign probabilities (get random number R, and if R > Enemy/(Enemy+Food) then do EnemyNear, otherwise do FoodNear) or something else entirely (maybe a small 'genetic program' of some kind makes the decision).

This is getting very close to fuzzy logic, which you might want to look into.

-Extrarius

This topic is closed to new replies.

Advertisement