Author Topic: Newbie Help for a bot's DNA  (Read 646 times)

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Newbie Help for a bot's DNA
« on: November 26, 2013, 03:40:34 PM »
'A vegetable designed to form long strands
'This will be a multibot. (It will transfer chloroplasts up?)
'.sexrepro????

'vars
def stem 0
def core 1
def probe 2
def seed 3
def flower 4

'custom memory locations
def temp 990
def type 991
def corexpos 992
def coreypos 993
def kelpid 995

'First, set eyes. Duh.
cond
*.robage 0 =
start
20 .eye5width store
'We will now space out the other eyes:
*.robage 0 =
-436 .eye9dir store
-327 .eye8dir store
-218 .eye7dir store
-109 .eye6dir store
 109 .eye4dir store
 218 .eye3dir store
 327 .eye2dir store
 436 .eye1dir store
50 .eye1width store
50 .eye2width store
50 .eye3width store
200 .eye4width store
200 .eye6width store
50 .eye7width store
50 .eye8width store
50 .eye9width store
stop

'Now, to make each cell turn if it's single.
cond
*.type .probe !=
*.numties 0 =
start
20 .aimdx store
stop

'Establish types
'Seed- Young core
'Core- Desides movement, ect. Grows out chain
'Probe- Carries -8 to a new strand, defends plant
'Stem- the average stem- transports nrg
'Flower -.sexrepro w/ probe to produce core. Produced only by bud.
cond
*.robage 0 =
start
1000 rnd .temp store
.seed *.temp sgn -- abs .type mult store
.flower *.temp sgn .type mult store
.probe *.temp 200 sub sgn 0 floor .type mult store
.stem *.temp 300 sub sgn 0 floor .type mult store
stop

'First generation is always a seed
start
*.thisgene .delgene store
.seed .type store
stop

'Mature core
cond
*.type .seed =
*.nrg 20000 >
start
.core .type store
*.xpos .corexpos store
*.ypos .coreypos store
stop

'Start development of stem by creating a bud. The core handles all asexual repro for the
'individual plant- also controls plant (head), flower is .sexrepro
cond
*.type .core =
*.nrg 5000 >
start
25 .up store
5 .repro store
stop

'If i'm a probe, I must sever my ties and start probing!
cond
*.type .probe =
start
 1 .tienum inc
 1 .deltie store
 1 .mrepro store
 30 .up store
*.type .stem =
 *.thisgene .delgene store
stop

'Create ties
cond
*.type .probe !=
*.numties 2 <
start
1 .tie inc
stop

'Delete ties
cond
*.numties 3 >
start
1 .tienum inc
.deltie store
stop

'Im a flower. I better put on my flower tag!
cond
*.type .flower =
*.type .probe =
start
*.type .stem =
 *.thisgene .delgene store
100 .out2 store
stop

'Im a probe and see a flower, ill go inseminate it! Yays!
cond
*.type .probe =
*.eye5 50 >
*.out1 100 =
start
-8 .shoot store
30 .dn store
start

'I'm a flower and im fertilized, I think I'll churn out a new core!!!!
cond
*.type .flower =
*.type probe =
*.fertilized 1 =
start
99 .sexrepro store
.type .shoot store
.seed .shootval store
stop

'Im a probe- ill burn excess body
cond
*.body 800  >
*.type .probe =
start
5 .fdbody inc
stop

'Im a stem-Ill follow the core!
cond
*.type stem =
*.multi 0 !=
start
*.trefxpos *.trefypos angle .setaim store
10 .up store
stop

'I'll tell my parts to straighten out!
cond
*.type stem =
*.multi 0 !=
start
stop


end

If any genes are blank, that is because I could not figure ut what to code in them. The biggest problem is they form vibrating clumps instead of strands. Any help?
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Newbie Help for a bot's DNA
« Reply #1 on: November 27, 2013, 11:12:31 AM »
sex repro:

Code: [Select]
cond
...
start
-8 .shoot store
50 .sexrepro store
stop
end

This one may have to be broken up into two genes, or even two separate robots. One is male the other female.
Remember a robot must be hit with sperm (-8 shot) and actively reproducing (sexrepro) in order to reproduce sexually.

chloroplasts:

Code: [Select]
cond
  *.chlr
  *.light
  <
start
160 .mkchlr store
stop

This is my latest simple gene for chloroplasts, chloroplasts are now compared vs light instead of a fixed value.

You must have a later version of DarwinBots such as version 2.46 to run both features correctly.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1573
    • View Profile
    • Games And Electronica
Re: Newbie Help for a bot's DNA
« Reply #2 on: November 27, 2013, 01:12:23 PM »
What exactly is the .light sysvar for? I tried your example and the bot just makes chloroplasts independent of if the the sun is on or not.
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Newbie Help for a bot's DNA
« Reply #3 on: November 27, 2013, 01:29:55 PM »
'light' was a shorthand for 'amount of ambient light available.' a.k.a. inverted robot density. Nothing to do with actual light.

edit:

The less 'light' there is (debugint the value, and watch what happens when the screen gets filled up with robots) the less energy a robot can extract from chloroplasts. But that is only after the energy gets formatted by day and night cycles and pondmode.
« Last Edit: November 27, 2013, 01:33:55 PM by Botsareus »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1573
    • View Profile
    • Games And Electronica
Re: Newbie Help for a bot's DNA
« Reply #4 on: November 27, 2013, 01:41:32 PM »
So in normal mode this gene should produce more chloroplasts the more bots there are in the sim, to compensate for the decrease in light intensity that lots of bots are causing?
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Newbie Help for a bot's DNA
« Reply #5 on: November 27, 2013, 02:07:54 PM »
Close. In normal mode the more bots there are (light sysvar approches zero) the less energy the robot can extract from chloroplasts. Therefore, To compensate for the decrease in light that bots are causing, at "lower light levels" it is not a good idea to have many chloroplasts. Given by: *.chlr *.light <

I have posted this graph once before, take a look @ it again.

image

What you see is, given the normal feeding rate is 150, what the actual feeding rate is based on chloroplast levels (the chloroplast levels are color coded) At 16,000 chloroplasts and 50% light the robots get fed a standard 150. You should also see what happens when the screen is completely filled up (i.e. light is zero) If the normal feeding rate is 150 the robots are actually loosing 150 units with 32,000 chloroplasts.

This was all based on how Shvarz explained it happens in real life.
« Last Edit: November 27, 2013, 02:12:15 PM by Botsareus »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1573
    • View Profile
    • Games And Electronica
Re: Newbie Help for a bot's DNA
« Reply #6 on: November 27, 2013, 02:28:24 PM »
I see! Interesting!
"God is an ever receding pocket of scientific ignorence." - Neil DeGrasse Tyson

"God is a kid with an ant farm" - Constantine

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Re: Newbie Help for a bot's DNA
« Reply #7 on: November 27, 2013, 02:35:02 PM »
This is all good, but I'm trying to get the bots all straight out, like in a chain (like jeffalish). I cant see where in  the code that can happen though...  :huh:
To być albo nie być, oto jest ze pytanie

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Newbie Help for a bot's DNA
« Reply #8 on: November 27, 2013, 03:02:54 PM »
Dumpling, you may be interested in this link here:

http://forum.darwinbots.com/index.php/topic,6186.msg1388185.html#msg1388185

Offline MysticalDumpling

  • Bot Destroyer
  • ***
  • Posts: 205
  • Kurwa chuj!
    • View Profile
Re: Newbie Help for a bot's DNA
« Reply #9 on: December 27, 2013, 11:52:41 AM »
Thanks! Ill post up the working version later...  :D
To być albo nie być, oto jest ze pytanie