Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: Endy on February 02, 2006, 03:14:43 AM

Title: Single Store
Post by: Endy on February 02, 2006, 03:14:43 AM
Finally, I always thought it would be possible and now I have the results. B)  Using only one store the bots can do everything they need to. Needless to say I'm proud of this little coding triumph :D

My job actually helped me here. I managed to picture the problem in terms of directing different fluids to different locations and the main problems of using only store became clear. :)

Let me know what you all think.

Code: [Select]
' Single Store
' Name says it all bot can reproduce, eat, move, and spin only using one storage location

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
Title: Single Store
Post by: Numsgil on February 02, 2006, 12:15:49 PM
I believe insanity is the proper term.   :D

Seriously though, that's crazy.  Good job.