Difference between revisions of "Conspec recognition"
(→In and Out) |
|||
Line 36: | Line 36: | ||
- More secure than [[In and Out]] | - More secure than [[In and Out]] | ||
− | ''' | + | '''Disadvantages:''' |
- Can be fooled | - Can be fooled | ||
+ | '''Example:''' | ||
+ | -Using the length of DNA as conspec | ||
+ | '''Step 1:''' Set memory location to read to DNA length | ||
+ | cond | ||
+ | *.memloc .dnalen != | ||
+ | start | ||
+ | .dnalen .memloc store | ||
+ | stop | ||
+ | |||
+ | '''Step 2:''' Read the value of the other bot's DNA length. This may not work if no bot is visible, so add *.eye5 0 != to be sure. | ||
+ | cond | ||
+ | *.memval *.dnalen != | ||
+ | start | ||
+ | ... | ||
== [[Refeye and Myeye]] == | == [[Refeye and Myeye]] == |
Revision as of 22:27, 6 October 2008
Bots use various methods to identify others of their species.
In and Out
Bots can use the numbers stored in in/out to identify conspecs.
Advantages:
- Easy to implement
Disadvantages:
- Very, very easily fooled
Example:
Step 1-Initialize IO port
cond *.robage 0 = start 100 .out1 store stop
Step 1-Check In against out. note that if nothing is visible, the in values default to 0, which might screw up bot behaviour. It's usually best to add *.eye5 0 != to be sure.
cond *.in1 *.out1 != start ...
Memloc and Memval
Bots can use Memloc and Memval to read a location in another bot's memory. This can be used for conspec recognition.
Advantages:
- More secure than In and Out
Disadvantages:
- Can be fooled
Example: -Using the length of DNA as conspec Step 1: Set memory location to read to DNA length
cond *.memloc .dnalen != start .dnalen .memloc store stop
Step 2: Read the value of the other bot's DNA length. This may not work if no bot is visible, so add *.eye5 0 != to be sure.
cond *.memval *.dnalen != start ...
Refeye and Myeye
By far the most popular form of conspec recognition.
Advantages:
- Can't be tricked passively
Disdvantages:
- Can be tricked if .myeye is altered by an info shot, venom or a virus
Other RefVars
Other RefVars such as .refshoot can be used to identify members of your species too.
Advantages:
- Can't be tricked passively
- Rarer than Refeye and Myeye and so less likely to be targeted
Disdvantages:
- Most bots may only have one instance of the command in their DNA
Other
Some other forms of conspec recognition have been thought up, but most are very impractical.