Bots and Simulations > Bot Tavern

[For Shadowgod] Seasnake problem

(1/1)

spike43884:

--- Code: ---'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
--- End code ---

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)

Shadowgod2:
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.

spike43884:

--- Quote from: Shadowgod2 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.

--- End quote ---
IK you have your own bots to work on...Strange, I swear we had maxtielen... Whats *.tielenx do?

Shadowgod2:
.tielen1 through 4

look them up

spike43884:

--- Quote from: Shadowgod2 on December 23, 2014, 09:04:13 AM ---.tielen1 through 4

look them up

--- End quote ---
Hmm k. will do soon....
.maxlen and .minlen would be good though.

Navigation

[0] Message Index

Go to full version