Author Topic: Sexrepro and conspec genes from sexbau  (Read 1013 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Sexrepro and conspec genes from sexbau
« on: June 08, 2013, 01:51:10 PM »
first we need to setup the vision, the robot will only mate with robots it sees in eye5
note that we also store 55, this is our way to recognize conspec
Code: [Select]
'vision setup
cond
*.robage 2 <
start
358 .eye0dir store
538 .eye1dir store
717 .eye2dir store
897 .eye3dir store
1076 .eye4dir store
1435 .eye6dir store
1614 .eye7dir store
1794 .eye8dir store
1973 .eye9dir store
50 .eye0width store
50 .eye1width store
50 .eye2width store
50 .eye3width store
50 .eye4width store
50 .eye5width store
50 .eye6width store
50 .eye7width store
50 .eye8width store
50 .eye9width store
'cospec setup
55 .out1 store
stop
'I see something in a waird eye, lets turn so I see it with eye5

cond
*.eye1 0 >
start
556 .aimdx store
stop
cond
*.eye9 0 >
start
-556 .aimdx store
stop

cond
*.eye2 0 >
start
417 .aimdx store
stop
cond
*.eye8 0 >
start
-417 .aimdx store
stop

cond
*.eye3 0 >
start
278 .aimdx store
stop
cond
*.eye7 0 >
start
-278 .aimdx store
stop

cond
*.eye4 0 >
start
139 .aimdx store
stop
cond
*.eye6 0 >
start
-139 .aimdx store
stop

cond
*.eye5 0 >
start
0 .aimdx store
stop

This is my conspec gene when robot is ready to mate:

Code: [Select]
cond
55 *.in1 =
*.body 3000 >
start
-8 .shoot store
'store this until body is less then 3000
1 999 store
stop

cond
55 *.in1 =
*.body 3000 >
start
50 .sexrepro store
'store this until body is less then 3000
1 999 store
stop

you may have to run this gene (above) more then one time , as robot tend to lose there ability to reproduce after a while.

edit:

we also want the robots to move together when it is time to mate:

Code: [Select]
cond
55 *.in1 =
*.body 3000 >
start
1 .up store
stop