Bots and Simulations > DNA - General
Newbye question
Panda:
Lets say you want to add 25 and 25 together and then wanted to store it into a memory location .repro
25 + 25 into .repro
25 25 add .repro store
Dunno' if that helps...
duartel:
Okay, I understood... Nothing :x
Mabye I should try getting coding classes.
Panda:
I only really knew the bear basics when I first came here, but I just stuck at it. It's weird how everything works. Basically "add" takes the two values before it and adds them together. Like 25 25 add, think of that being replaced by 50... And then if you want to store that in .repro, you use store. and that takes the 1st value, and puts that in the second memory location... like 20 .repro store. will store 20 into .repro.
Numsgil:
The first (implied) step is to be able to convert what you want to do (for instance, fire a -1 feeding shot if you see something in front of you) into a mathematical/coding expression (if central eye sees something closer than 50, then fire -1 shot). From there you can convert that to DNA code: *.eye5 50 > -1 .shoot store
Sounds like you're having trouble with the first step. Can you breakdown your description in the first post into steps of pseudocode that would do what you want? You sort of need to know what sysvars are available, probably, just to know what's possible and what isn't (there's no implementation of digging, so trying to build a bot that digs into shapes is just not possible with the program at present).
duartel:
Let's see if I can explain...
It would be carnivore and canibal. It would eat any non-vegetable that he'd see.
The exception is it's children, but only for three seconds. This is so it wouldn't eat it's own children right after they were born =p
The rest of the stats would be pretty low. It would have to almost crash with something to see it and would be relatively slow. But once it sees something, it starts running super fast and would strike it's victim really hard. It's atack would take out a lot of health from it's victim. Tough it would take a lot of energy from itself too... Like 30(I don't know if that's a lot tough)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version