Author Topic: Single Store  (Read 1562 times)

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Single Store
« on: February 02, 2006, 03:05:54 AM »
' Single Store
' Name says it all bot can reproduce, eat, move, and spin only using one store command

cond
start
' zero's just in case
50 *50 sgn mult dec
51 *51 sgn mult dec
52 *52 sgn mult dec
53 *53 sgn mult dec

'Repro
50 *.nrg 5000 sub sgn sqr mult 40 *.eye5 sub sgn sqr mult inc

'Shoot
51 *.eye5 35 sub sgn sqr mult *.refeye *.myeye sub sgn abs mult
*50 sgn 1 sub -1 mult mult inc

'move
52 *.eye5 sgn *.refeye *.myeye sub dup div mult mult
*51 sgn 1 sub -1 mult mult inc

'spin
53
*.eye5 sgn
*.refeye *.myeye sub dup div
1 sub -1 mult mult
*.eye5 sgn 1 sub -1 mult add dup div mult
*52 sgn 1 sub -1 mult mult *50 sgn 1 sub -1 mult mult inc

' Here's the single store
314 rnd *53 mult 20 *.vel sub 2 div *52 mult -1 *51 mult 50 *50 mult add add add
.aimdx *53 mult .up *52 mult .shoot *51 mult .repro *50 mult add add add
store

'Testing Dna
'*50 1000 mult *51 100 mult *52 10 mult *53 add add add 70 store

' below should zero all
50 *50 sgn mult dec
51 *51 sgn mult dec
52 *52 sgn mult dec
53 *53 sgn mult dec

stop
end