380
« on: June 07, 2005, 08:08:04 PM »
Hey as you might have read I'm trying to make a veggie that links to nearby family members and monitors their energy levels, sending energy via ties when they fall below a certain level. I'm hoping this could be the precursor for a multibot that could actually move around and consume other bots.
Anyway this is what I have so far, I have a feeling it is grossly inefficient and bug-filled so can someone help please??
'Start Genome
def tie1 0
def tie2 0
def tie3 0
'Gene1:
cond *.nrg 6000 >
start
50 .repro store
15 .aimdx store
stop
'Gene2:
cond *.eye5 0 !=
*.refeye *.myeye =
.tie 0 =
start
1 .tie store
inc .tie1
stop
'Gene3:
cond *.eye5 0 !=
*.refeye *.myeye =
.tie2 0 =
start
2 .tie store
inc .tie2
stop
'Gene4:
cond *.eye5 0 !=
*.refeye *.myeye =
.tie3 0 =
start
3 .tie store
inc .tie3
stop
end
All this does is make 3 ties and reproduce though. I don't know how to make a bot check to see if a tie still exists or not.
This is harder than I thought lol.