Bots and Simulations > Interesting behaviour bots

Fractals using darwinbots.

(1/3) > >>

peterb:
I was in the midle of some coding, and got a nice sample of DNA in between. Doing fractals trough darwinbots.
I think its a kind of amazing since nature also uses these structures and so darwinbots can generate it too within its language.
I wonder if other evo sims could do it, darwinbots is quite intresting.

I post the code twice since I noted the .repro command has great effect when changed.
And so two different versions of almost the same code are shown here.

A smal step for an amoeba but a huge step for evolution   
Feel free to use the code


[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'full rotatoin = 1256


--- Code: ---cond
*.971 6 <
start
.971 inc
1256 6 div .aimdx store
30 .repro store
stop

'first
cond
*.971 1 =
start
1256 4 div
*.971 .tie store
stop

cond
*.nrg 3000 mod 0 =
start
.971 0 store
stop

--- End code ---


if we put more energy to the cibling different shapes get generated see :

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'full rotatoin = 1256


--- Code: ---cond
*.971 6 <
start
.971 inc
1256 6 div .aimdx store
70 .repro store
stop

'first
cond
*.971 1 =
start
1256 4 div
*.971 .tie store
stop

cond
*.nrg 3000 mod 0 =
start
.971 0 store
stop

--- End code ---

Its all very basicly it cannt eat yet dough it might be verry intresting to others I tought so I posted it.

Oh yeah 2 notes
1) you might pause your environment and go to cycle by cycle to see it grow and repro its shape.

2) And when you use above code its better to see when it is not a vegy type (dont ask me why)

bacillus:
Wow.
I tried to modify it, but there was something I wasn't sure about:

--- Code: ---cond
*.971 1 =
start
1256 4 div
*.971 .tie store
stop
--- End code ---
why not just write
cond
 *971 1 =
start
 1 .tie store
stop

it'll have the same effect.

peterb:

--- Quote from: bacillus ---Wow.
I tried to modify it, but there was something I wasn't sure about:

--- Code: ---cond
*.971 1 =
start
1256 4 div
*.971 .tie store
stop
--- End code ---
why not just write
cond
 *971 1 =
start
 1 .tie store
stop

it'll have the same effect.
--- End quote ---


You're right the code should be improved, and actualy that is what I'm trying to figuring out now.
The birth tie disolve automaticaly while it would be nicer to keep on working with it.

Another note maybe people reading the topic trying it get disapointed is that a fractal.
wherent it those beautifull collor things ??
Take a look here http://www.miqel.com/fractals_math_pattern...e-fractals.html
Basicly its a repeating shape, what the above darwin code tries look much like the honeycomb fractal on that site.
Think of it as each cell/bot as a branch dividing to x new branches, while each sub also does this, that explains the shape.

In fact seeing it in Darwin Bots much closer describes some of these fractals as they compare to nature.
Fractals or "the golden ratio" are solutions of close packaging problems.
I once had a dutch computer drawing architect teacher how got a DR degree by making clear that the golden ratio isnt some magical number.
But is related to construction physics, and close packaging. And those rules he explained govern the distribution for example of solar flower seeds (in the flower). And many other natural structures. In his time he was at the frontline with his research and publication, working together with a bioligy DR in Germany. (even got on a TV documentary). Well he got his degree and he had used autocad in combination with math to explain it, all.
(so that part was quite complex).

And so I think its nice to see that also a system like Darwin Bots logic shows us fractals.
This means that ordening might be how to say..
Does verry easily develop using verry simple logic, and simple rules.
Rules with an origin in genetics !.

Hmm if I only could remind his name, I could show it to him, I'm sure he would be excited about it.

peterb:
oh ehm and about the code, well I was in the middle of another idea so it wasnt optimal,
In fact I had not fractals in mind (I tried to create a circle, a wheel like multibot )
But when it became fractals, I saw this was a nice error;
As I didnt want to loose the code I posted it as it was at that moment (with some errors).
I had tought of puting tie numbers to adress ciblings  for later multibott communication.

I still have the disapiring birth tie problem, I want to keep it but how to tackle that problem?.  

peterb:
Okay, the .tie problem was a bit hard to crack; one needs to replace the "born .tie" with a new one.
But while recreating the new .tie you have to shoot the tie exactly to your parent.
Wel at last I solved it here is sample code, feel free to use it.
Note you can use the txt attachment but dont run it as as a veggy it should be an animal  
Oh and it doesnt eat or reproduce, not implemented that. this is just a code demonstration

maybe someone can explain why it doesnt work that good as a veggy ?
 as it would be so nice for plants, their physics must be different (but what?)

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'A simple Fractal (repeating patern)
'like a tree who splits its branches
'By PeterB

'For some unknown reason dont make it a vegetable
'That doesnt endup with a nice shape, I dont know why that is.
'So it has to be like animal.. perhaps a sea sponge
'Dough I have not yet implemented feeding, or further reproducing.
'It is mainly to show the code used so others can use it too.  

'I want to make a note.
'That its intresting to see that DNA meets fractals trough the logic of DarwinBots
'As we now fractals also shapes lots of what we see in nature.
'See how little rules are required in genetic code
'Maybe someone can make an advantage out of it as nature does it.
'
'
'--------------------------
'most important part :
'(note rotation and the <10 have impacts on shape)
'
cond
*971 10 <
*.robage  5 >
start
971 inc
20 .repro store
1256 20 div .aimdx store
stop
'
'--------------------------
'The parts below mainly deal with getting some distance from its parent. (impacts shape)
'Create a new .tie who will persist over time
'And after the tye has been created it rotates. (impacts shape)
'I could have scripted it in less genes but that makes it harder to understand.
'
'
cond
*.robage = 0
start
*.tiepres .deltie store
stop
'
'
cond
*.robage = 1
start
'*.tiepres .deltie store
 *.nrg 5 mult 8 add .dn store
stop
'
'
cond
*.robage = 4
start
.tie inc
stop
'
'
cond
*.robage = 5
start
1256 3 div .aimdx store
stop
'
'
' its better to fix its pos for a second or it may move to much
' it is not realy required to use this
cond
*.robage 15 =
start
.fixpos inc
stop
'
cond
*.robage 15 =
start
.fixpos dec
stop

Navigation

[0] Message Index

[#] Next page

Go to full version