Difference between revisions of "Humilis"

From WikiManual
Jump to: navigation, search
Line 4: Line 4:
 
----
 
----
  
 
+
'Humilis
 +
 
  use NewMove
 
  use NewMove
   
+
  def Turn_At_Birth 60
'Humilis
 
 
   
 
   
 
  'remove waste
 
  'remove waste
Line 13: Line 13:
 
  *.waste 100 >
 
  *.waste 100 >
 
  start
 
  start
  'This shoots a particle of waste equal to a bot's current waste level
+
  'This shoots a particle of waste equal to a bot's current waste level  
 
  -4 .shoot store
 
  -4 .shoot store
 
  *.waste .shootval store
 
  *.waste .shootval store
Line 61: Line 61:
 
  start
 
  start
 
  7 rnd 50 store
 
  7 rnd 50 store
 +
stop
 +
 +
cond
 +
*.eye5 0 >
 +
.refup *50 add * .myup *50 add * !=
 +
start
 +
*.refvelup 30 add *.body mult 1000 div .up store
 +
*.refveldx *.body mult 1000 div .dx store
 +
stop
 +
 +
cond
 +
*.velscalar 0 =
 +
 +
*.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9
 +
add add add add add add add
 +
0 = 'nothign in any eyes
 +
*.eye5 0 =
 +
 +
*.nrg 200 > 'don't try this if we're too exhausted to really feed
 +
start
 +
60 .up store
 
  stop
 
  stop
 
   
 
   
Line 70: Line 91:
 
  'Cheap shots :)
 
  'Cheap shots :)
 
  .shoot dec
 
  .shoot dec
 +
 +
*.refvelup *.body mult 1000 div .up store
 +
*.refveldx *.body mult 1000 div .dx store
 
  stop
 
  stop
 
   
 
   
Line 78: Line 102:
 
  start
 
  start
 
  628 .aimdx store
 
  628 .aimdx store
  60 inc
+
  .Turn_At_Birth inc
 
  'i had to put some iflamma consepts in there -bau
 
  'i had to put some iflamma consepts in there -bau
 
  50 .repro store
 
  50 .repro store
Line 92: Line 116:
 
   
 
   
 
  cond
 
  cond
  *60 0 >
+
  *.Turn_At_Birth 0 >
 
  start
 
  start
 
  628 .aimdx store
 
  628 .aimdx store
  stop
+
  0 .Turn_At_Birth store
 
cond
 
*.eye5 0 >
 
*.velscalar 20 <
 
start
 
20 *.velscalar sub
 
2 div
 
*.body mult 1000 div
 
.up store
 
 
  stop
 
  stop
 
   
 
   

Revision as of 13:41, 10 November 2005

Click the discussion tab above to discuss the code.
added user feedback there. ~griz~


'Humilis

use NewMove
def Turn_At_Birth 60

'remove waste
cond
*.waste 100 >
start
'This shoots a particle of waste equal to a bot's current waste level 
-4 .shoot store
*.waste .shootval store
stop

'manage body
'cond
'*.body 10 mult
'*.nrg !%=
'start
'*.body 10 mult *.nrg sub dup
' 'difference between energy stored in body and in nrg
'0 floor .fdbody store 
'-1 mult 0 floor .strbody store
' 'if you feed and str the same it'll zero both effects and waste nrg
' 'I'll check on fixing it up latter 
'stop

'redone body management into 2 genes:
cond
*.body 10 mult *.nrg sub 400 > 'we have lots of body and little nrg
*.nrg 50 < or
start
100 .fdbody store
stop

cond
*.nr *.body 10 mult sub 400 > 'we have lots of nrg and little body
*.nrg 31000 > or
start
100 .strbody store
stop
'end body management

cond
start
'Naval Cord Removal
.tie *.robage sgn 1 sub -1 mult mult
.deltie *.robage 1 sub sgn 1 sub -1 mult mult
add inc
'this should do the trick to allow both tie and deltie to use same inc
stop

cond
*.robage 20 mod 0 =
'Finally figured out how to use mod handily :)
start
7 rnd 50 store
stop

cond
*.eye5 0 >
.refup *50 add * .myup *50 add * !=
start
*.refvelup 30 add *.body mult 1000 div .up store
*.refveldx *.body mult 1000 div .dx store
stop

cond
*.velscalar 0 =

*.eye1 *.eye2 *.eye3 *.eye4 *.eye5 *.eye6 *.eye7 *.eye8 *.eye9
add add add add add add add
0 = 'nothign in any eyes
*.eye5 0 =

*.nrg 200 > 'don't try this if we're too exhausted to really feed
start
60 .up store
stop

cond
'Gene should allow bot to test amongst 8 different refs randomly
.refup *50 add * .myup *50 add * !=
*.eye5 37 >
start
'Cheap shots :)
.shoot dec

*.refvelup *.body mult 1000 div .up store
*.refveldx *.body mult 1000 div .dx store
stop

cond
*.nrg 10000 >
*.robage 1000 >
'let's let younger bots do other things with excess energy
start
628 .aimdx store
.Turn_At_Birth inc
'i had to put some iflamma consepts in there -bau
50 .repro store
stop

cond
*.eye5 0 >
*.refeye *.myeye = and
*.eye5 0 = or
start
314 rnd .aimdx store
stop

cond
*.Turn_At_Birth 0 >
start
628 .aimdx store
0 .Turn_At_Birth store
stop

'junk DNA to allow conspec recognition to work (and they said junk DNA wasn't useful ;))
*.up *.dn *.dx *.sx *.shoot *.eye5 *.aimdx *.aimdx *.aimsx *.aimsx

end 'end is superfluous in 2.4, but adding it or not doesn't hurt anything...