Bots and Simulations > The Gene depository

Help with something else

(1/3) > >>

Panda:

--- Code: ---'Treebot v0.1 - Not working perfectly yet.

def available 101
def parentbot 102
def canfix 103
def recordtime 104
def timerepro 105
def typelook 106
def type 971
def first 972
def parentx 973
def parenty 974
def mytree 975
def bot 956

'(type)- 5 = trunk
'        4 = major branch
'        3 = minor branch
'        2 = branch
'        1 = leaf
'        0 = seed

cond
  *.robage 0 =
start
  1000 rnd .mytree store
  *.thisgene .delgene store
  6 .type store
stop

'2
cond
  *.robage 35 =
start
  1000 rnd .bot store
  *.type 1 add .typelook store
stop

'3
cond
  *.robage 31 =
start
  *.bot .parentbot store
stop

'4
cond
  *.robage 1 =
start
  *.type 1 sub .type store
'  -436 .eye9dir store
'  -327 .eye8dir store
'  -218 .eye7dir store
'  -109 .eye6dir store
'  109 .eye4dir store
'  218 .eye3dir store
'  327 .eye2dir store
'  436 .eye1dir store
'  109 .eye1width store
'  109 .eye2width store
'  109 .eye3width store
'  109 .eye4width store
'  109 .eye5width store
'  109 .eye6width store
'  109 .eye7width store
'  109 .eye8width store
' 109 .eye9width store
  *.type 4 sub .fixpos store
stop

'5
cond
  *.multi 0 =
  *.robage 20 >
  *.in1 *.typelook =
  *.in2 0 =
  *.eye5 50 >
  *.in3 *.mytree =
  *.in4 *.parentbot =
start
  1 .tie store
stop

'6
cond
  *.numties 0 =
  *.type 5 !=
start
  0 .fixpos store
stop

'7
start
  *.type .out1 store
  *.mytree .out3 store
  *.bot .out4 store
stop

'8
cond
  *.numties 0 =
start
  0 .recordtime store
  0 .canrepro store
stop
  
'9
cond
  *.multi 1 =
start
  *.tiepres .tienum store
  *.type 20 mult 10 sub .sharenrg store
  *.type 150 mult .fixlen store
'  628 .fixang store
  100 .stifftie store
  314 .setaim store
  100 .up store
stop

'10
cond
  *.multi 1 =
  *.recordtime 0 =
start
  *.robage .canrepro store
  1 .recordtime store
stop

'11
cond
  *.multi 1 =
  *.canfix 300 add *.robage <=
start
  1 .fixpos store
stop

'12
cond
  *.numties 5 >=
start
  1 .out2 store
stop

'13
cond
  *.type 5 =
  *.multi 1 = or
  *.canfix 300 add *.robage <=
  *.timerepro 2 <
  *.type 1000 mult *.nrg <
  *.type 100 mult *.body <
start
  *.xpos .parentx store
  *.ypos .parenty store
  314 .aimsx store
  *.type 10 mult 20 sub .repro store
  .timerepro inc
stop

'14
comd
  *.multi 0 =
  *.type 5 !=
start
  *.parentx *.parenty angle .setaim store
  15 .up store
stop

'15
cond
  *.type 1000 mult *.nrg >
  *.type 100 mult *.body <
start
  100 .fdbody store
stop

'16
cond
  *.type 1000 mult *.nrg <
  *.type 100 mult *.body >
start
  100 .strbody store
stop
end
--- End code ---
The problem is with copying what is in .bot to .parentbot(the line where it says that it isnt working):

--- Code: ---'3
cond
  *.robage 31 =
start
  *.bot .parentbot store
stop
--- End code ---
. I have tried loads of things to fix it but they are not working.

I have added the sim options I am using to run the bot.

Moonfisher:
Doesn't seem like that line would be the problem...
Are you aware that racial mem starts at 971 and the bot var is defined to 956 ?
Since you give it a value at age 35, but transfer the value at age 31... I'm asuming it was suposed to be inherited...
Also you should be aware that loc 976 isn't transfered immediatly, and not at all if you break the birth tie right away.

Panda:
How long will it take for it to copy then

Moonfisher:
I'm not sure, but I think the last 15 values are copyed one cycle at the time over 15 cycles. Probably starting with 976...
You can also pack more information into one var if you like.

Panda:
I realised one of my defined values wasnt being used so I swapped it with that one

Navigation

[0] Message Index

[#] Next page

Go to full version