Author Topic: [For Shadowgod] Seasnake problem  (Read 4578 times)

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
[For Shadowgod] Seasnake problem
« on: December 22, 2014, 02:24:36 PM »
Code: [Select]
'Should move like SEASNAKE



def head 50
def hunt 51

'Gene Move On (turning)
cond
*.eye5 0 =
*.head 1 =
*.hunt 0 =
start
60 rnd .aimdx store
60 rnd .aimsx store
1 .hunt store
stop


'Gene Move On (Moving)
cond
*.eye5 0 =
*.head 1 =
*.hunt 1 =
start
1 .tout1 store
2 .hunt store
stop

cond
*.eye5 0 =
*.head 1 =
*.hunt 2 =
start
500 .fixlen store
3 .hunt store
stop

cond
*.eye5 0 =
*.head 1 =
*.hunt 3 =
start
1 .fixpos store
4 .hunt store
stop

cond
*.eye5 0 =
*.head 1 =
*.hunt 4 =
start
0 .tout1 store
5 .hunt store
stop

cond
*.eye5 0 =
*.head 1 =
*.hunt 5 =
start
0 .fixlen store
0 .hunt store
stop


'Gene Food Finder (Head)
cond
*.eye5 0 >
*.refeye *.myeye !=
*.multi 1 =
*.head 1 =
*.reftype 0 =
*.dist 6 >
start
1 .tout1 store
*.dist 6 sub .fixlen
stop

'Gene Food Finder (Head)
cond
*.eye5 0 >
*.refeye *.myeye !=
*.multi 1 =
*.head 1 =
*.reftype 0 =
*.dist 6 =<
start
0 .tout1 store
*.dist 6 sub .fixlen
-1 .shoot store
-6 .shoot store
stop


'Gene Head Recieved (Tail)
cond
*.head 0 =
start
*.tin1 .fixpos store
stop



'Gene Avoiding Family
cond
*.multi 1 =
*.eye5 0 =
*.head 1 =
*.refeye *.myeye =
start
314 rnd .aimdx store
stop


'Gene Duplicate
cond
*.numties 0 =
*.robage 0 !=
start
50 .repro store
.head inc
stop


'Gene Recombine
cond
*.robage 0 =
start
.tie inc
stop


' Gene Reproduce
cond
 *.nrg 15000 >
 *.numties 2 <
start
 40 .repro store
stop


'Gene Splits.
cond
 *.nrg 14000 >=
 *.multi 1 =
 *.head 0 =
start
.deltie inc
.head inc
stop

'************************************************************

'Gene multibot control center
cond
*.multi 1 = or
start
40 .sharenrg store
999 .maxlen store
75 .stifftie store
628 .fixang store
stop


end

What in its movement cycles have broken it....It should move like a seasnake....But won't!
Until this is sorted out I can't complete my ultra-long seasnake (worked out solution to getting it to keep in its snakey pattern)

OFFTOPIC: What DNA would make the length of a tie stay BETWEEN 50 and 500 (There isn't a .minlen sysvar is there? I can't find WIKI mentions to .maxlen or .minlen)
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: [For Shadowgod] Seasnake problem
« Reply #1 on: December 22, 2014, 11:54:02 PM »
those sysvars don't exist but you can customize a var

def maxtielen 50
def mintielen 51

start
500 .maxtielen *.maxtielen 500 sub sgn 1 add mult store
stop

cond
*.tielenx *.maxtielen >
start

or

def mintielen 50
def maxtielen 500

cond
*.tielenx .maxtielen >
start


i'll work on the bots when i have the time. also i have my own bots to work on too.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: [For Shadowgod] Seasnake problem
« Reply #2 on: December 23, 2014, 05:10:41 AM »
those sysvars don't exist but you can customize a var

def maxtielen 50
def mintielen 51

start
500 .maxtielen *.maxtielen 500 sub sgn 1 add mult store
stop

cond
*.tielenx *.maxtielen >
start

or

def mintielen 50
def maxtielen 500

cond
*.tielenx .maxtielen >
start


i'll work on the bots when i have the time. also i have my own bots to work on too.
IK you have your own bots to work on...Strange, I swear we had maxtielen... Whats *.tielenx do?
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: [For Shadowgod] Seasnake problem
« Reply #3 on: December 23, 2014, 09:04:13 AM »
.tielen1 through 4

look them up

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: [For Shadowgod] Seasnake problem
« Reply #4 on: December 23, 2014, 11:13:50 AM »
.tielen1 through 4

look them up
Hmm k. will do soon....
.maxlen and .minlen would be good though.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.