Code center > Suggestions
A small idea to help make brainy bots
Botsareus:
--- Quote ---cond
*.20 0 >
start
*.20 .up store
stop
--- End quote ---
Translation:
--- Quote ---Lets say memory location 20 is equal to 310.
Thats means if the robot is not dead (.nrg > 0) it will move *.nrg .up store
--- End quote ---
I need this to make an effective "nerual network" bot.
Numsgil:
It's an interesting idea. I have a * operator that I've been working on that returns the value of the memory location pointed to by the top value on the stack.
So you could do *20 * to get the memory location *20 is pointing to.
Botsareus:
Here is how this bot is supposed to work
The robot counts one memory location up every cycle we call this memory location "n"
The robot waits until it reproduces or until it kills another robot or until its energy is below 300..........
Basicaly we have a dna inside dna , after the robot reproduces or kills another robot it checks if it did better on time and energy then lest time. If it did then the sub-dna is saved as the "defult sub-dna", otherwise a new more mutated virsion of the "active sub-dna" is created out of the defult sub-dna.
Here is the model of sub dna (all this memory is used up twice , once for defult sub-dna , once for active sub-dna)
(there are special genes that copy defult sub-dna into active sub dna and wise versa)
a(20) 'instruction number
b(20) 'instruction type
all conditions are ">"
c 'is condition top part a number or a sysvar
d(20) 'condition top part value
e 'is condition buttom part a number or a sysvar
f(20) 'condition buttom part value
then we go
cond
*.20
*.40
>
start
*60 *80 store
stop
cond
*.21
*.41
>
start
*61 *81 store
stop
somthing like that...
PurpleYouko:
EERRRMMMM???
*.20 won't work since the dot is only used to prefix a sysvar name.
*20 will return the value stored in memory location 20. It always has done.
so *60 *80 store will store the value in memory location 60 into the memory location pointed at by the value currently stored in memory position 80
If mem(60) contains 25 and mem(80) contains 1 then this will store 25 into position 1 (.up)
Unless I am reading the post wrong there is nothing difficult about any of this.
Botsareus:
Problem:
--- Quote ---*.20 won't work
--- End quote ---
I need it to work.
I also revise my post above for lack of accurasy in design , brb.
Navigation
[0] Message Index
[#] Next page
Go to full version