Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: Welwordion on November 23, 2007, 09:50:47 PM

Title: Incomplete constructed Mb individuals?
Post by: Welwordion on November 23, 2007, 09:50:47 PM
After trying to programm a certain growth routine I asked myself how come a certain percentage grows like intended while others fail their growth routine, I mean if you deactivate brownian motion and every bot has the same starting conditions how come that not all either do it right or all fail but rather a percentage fails and a percentage succeeds?
Any thought on that?
Title: Incomplete constructed Mb individuals?
Post by: Peksa on November 24, 2007, 06:48:24 AM
That pretty much depends on the code you're using and what happens after the start, when the conditions aren't necessarily same for everyone. With so little information, I can't say much more.
Title: Incomplete constructed Mb individuals?
Post by: Welwordion on November 24, 2007, 08:59:32 AM
Well the questions was meant  in general, cause this is not the first time I observed this, so I wanted to collect a list of things that can go wrong, but if you want a  code how about:

def generation 971

cond
*.robage 0 =
start
.generation inc
stop

cond
*.robage 1000 >
*.generation 1 =
*.eye5 0 =
*.nrg 20000 >
start
30 .repro store
stop

cond
*.robage 2 =
*.generation 2 =
start
628 .aimsx store
stop

cond
*972 2 <
*.generation 2 =
*.robage 2 >
start
972 inc
157  *972 2 mult mult .aimdx store
5 .repro store
95 .sharenrg store
stop

cond
*.generation 3 =
*.robage 10 <
*.multi 0 =
start
*972 .tie store
stop

end
Title: Incomplete constructed Mb individuals?
Post by: Numsgil on November 24, 2007, 09:08:30 AM
Tie physics are a little unpredictable.  That could be part of the problem.
Title: Incomplete constructed Mb individuals?
Post by: Welwordion on November 24, 2007, 09:15:17 AM
I can delete the last gene  and the 95 .sharenrg store the result stays the same some generation 2 bots have one descendant some two.
Title: Incomplete constructed Mb individuals?
Post by: Numsgil on November 24, 2007, 09:24:55 AM
Bots won't reproduce if there isn't enough room.  Since ties are unpredictable, sometimes they move the relative positions of the bots just enough so that their isn't enough room for the next bot.
Title: Incomplete constructed Mb individuals?
Post by: Peter on November 24, 2007, 09:26:15 AM
Quote from: Welwordion
After trying to programm a certain growth routine I asked myself how come a certain percentage grows like intended while others fail their growth routine, I mean if you deactivate brownian motion and every bot has the same starting conditions how come that not all either do it right or all fail but rather a percentage fails and a percentage succeeds?
Any thought on that?
I'd put it on luck, some are just lucky enough to grow, come in front of a veggie and some others are just unlucky.
Title: Incomplete constructed Mb individuals?
Post by: Welwordion on November 24, 2007, 09:32:00 AM
At  num o you mean this includes the birthtie? (cause like I said I can remove all tie binding in that bot but it still the same result)

At peter: luck would mean that there are certain "random" factors each bot
suffers, but like I asked when brownian motion is removed what are these random factors?
Is there something like static in the memory locations? I rememeber vaguely some talk about such an idea.
Title: Incomplete constructed Mb individuals?
Post by: Numsgil on November 24, 2007, 09:42:55 AM
Quote from: Welwordion
At  num  o you mean this includes the birthtie? (cause like I said I can remove all tie binding in that bot but it still the same result)

Yes, that would include the birth tie.  The unpredictableness comes from how ties are simulated-- as damped springs.  Damped springs are notoriously difficult to simulate in a physics simulation (like Darwinbots) because you're simulating a second order ODE with numerical integration methods.  That is, the equation:

x''(t) = x(t) * -k + x'(t) * -b

Note that it's an equation that relates the second order derivative to the first and actual function.  Yikes!

So the moral of the story is, especially with MB, you need to provide some time and space as a "wiggle room", to allow the ties to settle in to a stable configuration.
Title: Incomplete constructed Mb individuals?
Post by: Peter on November 24, 2007, 09:58:50 AM
Quote from: Welwordion
At peter: luck would mean that there are certain "random" factors each bot
suffers, but like I asked when brownian motion is removed what are these random factors?
Is there something like static in the memory locations? I rememeber vaguely some talk about such an idea.
Those random factors are simply said the phycics in ths sim, including tie-phycics, I think Numsgil is more of an expert about it, as he has to make them too for DB3. So well let him answer, his answers are probably better  . He knows what really matters.

Quote from: Numsgil
Note that it's an equation that relates the second order derivative to the first and actual function.  Yikes!
I haven't got a clue where you're talking about, but yikes it sounds like it is even a rather small part of the whole phycics.

Quote from: Numsgil
So the moral of the story is, especially with MB, you need to provide some time and space as a "wiggle room", to allow the ties to settle in to a stable configuration.
Especially the time is a troubling factor, in becoming a MB the first few cycles any movement could do strange things, haven't coded a real strong MB, but with stupido(posted in starting gate) it was clear in the it needed to settle(and he's really simple), some F1 or F2 bots already conquered the field  .
Title: Incomplete constructed Mb individuals?
Post by: Numsgil on November 24, 2007, 10:04:01 AM
For DB3, I'll implement some actual joints, so we won't have these sorts of issues.
Title: Incomplete constructed Mb individuals?
Post by: Peter on November 25, 2007, 11:11:41 AM
Ok, I just looked of the multi-bot, could have seen this earlier, and well as I look you are every generation changing the angle in aimdx or aimdx, in ties it works better if you use an angle from the tie, (*.fixang) that way the angle will be measured from the tie. You could also use *.fixleng so make set a lenght of the tie.

In fact taking aimdx or aimsx you're taking a little chance that it could go wrong, not a big chance but it could screw some things up. Sometimes the tiephycics just seem to need little to let it go wrong, there is an enormous lot of power in those ties, little movement could invoke a lot of phycics sometimes.

Maybe I am going figure out how it works and abuse it  

Quote
For DB3, I'll implement some actual joints, so we won't have these sorts of issues.
Nice, he wait how does it work then in DB 2 the ties are connected to the bot and in a multibot the angle gets stuck after awhile. Well that has to need some kind of joint doesn't it. It is connected to some place.

Joint is place where it is connected, right. I could be wrong.
Title: Incomplete constructed Mb individuals?
Post by: Numsgil on November 25, 2007, 11:17:57 AM
By joint, I mean something like a pin joint, or axle (if the axle is sticking straight out of the screen).  The physics would be far more deterministic.
Title: Incomplete constructed Mb individuals?
Post by: fulizer on December 07, 2007, 06:21:07 AM
if your trying to make some structured mb thats arnt kust straigt lines ask Py they have some idea about activating certain genes if they have a certain id given to them bu their parents (in the cas of ants that would be the queen ant)
Title: Incomplete constructed Mb individuals?
Post by: Peter on December 07, 2007, 06:48:22 AM
Well PY isn't active on the forum, but even with very simple multibots it helps to set a 'head' and 'body' part, to make clear whitch part decides everything. Hmm, you said ant-bots I am going to take a look and learn something about it, maybe their id-system could be interesting for multi-bots.
Title: Incomplete constructed Mb individuals?
Post by: Welwordion on December 07, 2007, 11:42:26 AM
I am using a generational system that relies on genetic memory and conditions in the first few cycles to distribute roles among my bots, for example

cond
*.robage 0(or 1 when I sensorial information) =
....( sometimes a second condition like *972 0 >, or *.refbody *.body div 3 >)
start
971 inc
stop
Title: Incomplete constructed Mb individuals?
Post by: Peter on December 07, 2007, 12:17:36 PM
I know what you mean I have tried to make on desame way a multibot. With genetic memory, just storing before reproduction a value inside it and that way make a little id for each bot. The multibot doesn't work jet, have to look some more inside tie stuff, now I've got a 4 headed multibot looking like this, and they're all in the inside looking at each other  , and they can't turn somehow.
O___O
!  .  .  . !
!  .  .  . !
O___O

The ant-bots simply work by putting in a value with a tie anywhere in the memory of a new born young and that way programming the workers.

My multibot in the starting gate, works with a very simple id-system,
1 No ties, now I am the head and reproduces to make a tail.
2 A tie, I am the tail.
Title: Incomplete constructed Mb individuals?
Post by: EricL on December 07, 2007, 12:30:17 PM
Quote from: Peter
and they can't turn somehow.
O___O
!  .  .  . !
!  .  .  . !
O___O
The ties have hardened and the angles have fixed.  They can't turn because the rigid structure arrangement prevents them.   Try using .fixang.
Title: Incomplete constructed Mb individuals?
Post by: Peter on December 07, 2007, 01:22:02 PM
Quote from: EricL
Quote from: Peter
and they can't turn somehow.
O___O
!  .  .  . !
!  .  .  . !
O___O
The ties have hardened and the angles have fixed.  They can't turn because the rigid structure arrangement prevents them.   Try using .fixang.
If using .fixang the ties will form a cross and the eyes are yes more or less standing outwards, yes but not all very good. I used aimleft before the tie harded, but not with really good results, now I am going to make a triagle instead of a quadruple, a quadruple is a little instabel.
Title: Incomplete constructed Mb individuals?
Post by: fulizer on December 12, 2007, 03:52:49 AM
look at genes used in vermus to designate the bot as a head that way you can change it to cut off ties if it gets a certain amount (eg a worm mb will cut of ties if it has more than one so that it remains in a straight line)
my 50th post!
I got 3 stars now
horray!
Title: Incomplete constructed Mb individuals?
Post by: Numsgil on December 12, 2007, 12:20:57 PM
Quote from: fulizer
my 50th post!
I got 3 stars now
horray!

Have the warm and fuzzies started yet?  
Title: Incomplete constructed Mb individuals?
Post by: fulizer on December 13, 2007, 03:48:04 AM
Quote from: Numsgil
Quote from: fulizer
my 50th post!
I got 3 stars now
horray!

Have the warm and fuzzies started yet?  
kinda