Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!psgrain!solace!news.ifm.liu.se!liuida!t91matfa
From: t91matfa@ida.liu.se (Mattias Fagerlund)
Subject: Re: Evolving a flock/army
X-Nntp-Posting-Host: astmatix.ida.liu.se
Message-ID: <t91matfa.829576582@news>
Sender: news@ida.liu.se
Organization: CIS Dept, Linkoping University, Sweden
X-Newsreader: NN version 6.5.0 #6 (NOV)
References: <t91matfa.829227479@news> <4kng1i$q0v@news.bellglobal.com>
Date: Mon, 15 Apr 1996 13:56:22 GMT
Lines: 126

> T9> There is a program called boids.exe that use 'genetic algorithms' to
> T9> evolve the behaviour of 3 flocks, but the program only 'trims' a
> T9> previously designed set of rules, there is no rule mutation.
>
>Keep that in mind because ...
>
> T9> Most mutation would take place in the constants of the rules, seldom
>
>So what's the difference?
>

I said 'most', not 'all'. One idea I've considered is having all individuals
in a flock have different constants in their rules, but all flocks have
(slightly) different rulesets.
The best individual in a flock get to spawn a new flock, where not only
the constants differ, but where new rules are added or deleted or rewritten.
It could work, but perhaps it wont.

>Perhaps you could create a red code (corewars lingo, sorry), or some sort of
>"high-level" assembly (bunch of high-level functions with arguments) that you
>could evolve with a genetic programming algorithm?
>

Isn't this pretty much exactly what the PvN came up with? I'm not saying that
it is a bad idea, I just think that fuzzy rulesets would fit the boids to a tee.

Using fuzzy rules, it's fairly easy to create rules that have a very smooth
output which isn't easy using a normal rulebased system;

If RangeError is Positive then make SteeringAngle Negative;
If RangeError is NearZero then make SteeringAngle NearZero;
If RangeError is Negative then make SteeringAngle Positive;

These three rules govern a car that drives around in a perfect circle aiming
to stay X meters from a certain point. The RangeError holds the difference
between X and the cars distance from the central point. Writing this as a
normal rulebased system would be far trickier.

My assumption here is that since theses three simple rules can govern a car
with such precission, and theses three rules are so easy to come up with, it 
wouldn't be all that hard to evolve these rules. 
But perhaps how I perceive the solution isn't relevant? What do yall think?
Will these rules easier be evolved than normal - non fuzzy - rules?

> T9> * Different weapons/shields/... could be thrown into the genepool to
> T9> evolve game-ai instead.
>
>Maybe, but you'd have to change the analogy.
>

What's wrong with birds with guns?

> T9> The WASTE engine, when done, could house the universe the flocks live in
>
>I'd love to see someone try.  How would you implement a turn-based flocking
>algorithm anyway?
>

OK, the ruleset would be very different, but it would probably work. Though,
as someone pointed out to me by email, a simple rulebased system could
probably not evolve a very good wargame ai.
Adding a meta ai that give the boids orders could be a solution to this...

> T9> in, but the universe I've envisioned is simpler then what both Von
>
>Probably.  P:VN and WASTE are war-oriented, whereas what you're look at is an
>Artificial Life project.
>

Yes, but it can be extended to be a game. Perhaps adding a predator that the
user could control...can't we call it a game? Please?

> T9> Well, I'd really love to hear your ideas on this. I'd also want to
> T9> know if anyone has heard of anything similar done/being done. Is anyone
> T9> other than me interested in this?
>
>Well, as far as I understand it, you're trying to evolve a group who use a
>common rule set instead of individuals.
>

Yes! I think the behaviour of a evolving flock would much more interesting 
than the behaviour of a single individual. If the flock starts out with very
simple rules (no collision avoidance and so on) and later on evolves flocking,
*that* would be cool!

>Being such a self-referencing fool that I am, an idea similar to this was put
>forth in WASTE for the ant AI system.  There'd be more than one colony of
>ants, each with a queen.  The queen's DNA would help control higher-level
>functions whereas the unit's DNA would control more local, individual
>functions.
>
>The colonies would take turns fighting and the queen's DNA would evolve
>through that competition.  Similarly, the DNA within the colony also evolves.
>

A splendid idea. On problem I see is that the evolution time could easily be
far higher than a conventional system, with just one level of evolution, 
if the ants of different coloines are totally un-related.

For instance, what if the ants of one colony come up with a brilliant strategy,
and the queen is a dim-wit? Also, if the queen is a genious, but the ants keep
falling over eachother. On the other hand, if the ants are all of the same
species then a good queen strategy can not be coupled with a good ant strategy
evolved to fit the queens strategy.
One possible solution would be to have several ant species and several queens.
At the start of every battle the queen gets 10 ants from each species, and
at the end of the battle, the best queen and the best ant species are rewarded
and the loosers are punished.
One interesting consequence would be that most species would blankly refuse
to kill it's own kind, even if they were part of the other tribe, since that
would be counter-productive.

>Maybe you could incorporate something like that?

Perhaps. I sounds a bit complicated to do though.

********************************************************************
Mattias Fagerlund, mfa@dtek.se
      *** 2 + 2 = 5 for extremely large values of 2. ***
		- whoever I stole it from
********************************************************************
--
---------------------------------------------------------------------------
t91matfa@und.ida.liu.se = Mattias Fagerlund, Linkoeping Sweden
One day I'll make me a real .signature, one day. You'll see.
---------------------------------------------------------------------------
