Difference between revisions of "Conspec recognition"

From WikiManual
Jump to: navigation, search
(Edited by Elite)
(In and Out)
 
(11 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
- Easy to implement
 
- Easy to implement
  
'''Disdvantages:'''
+
'''Disadvantages:'''
  
 
- Very, very easily fooled
 
- 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 behavior. It's usually best to add '''*.eye5 0 !=''' to be sure.
 +
 +
cond
 +
*.in1 *.out1 !=
 +
start
 +
...
 +
 +
''More Complicated I/O''
 +
 +
However, you can set one I/O channel to a value and the other to a random number. If both I/O channels match, then you have either realy, realy bad luck or the other bot just failed in fooling you.
 +
 +
'''Example'''
 +
'''Step 1- Initialize I/O ports
 +
cond
 +
*.robage 0 =
 +
100 .out1 store
 +
32000 rnd .out2 store
 +
 +
'''Step 2'''
 +
cond
 +
*.in1 *.out1 !=
 +
*.in2 *.out2 =
 +
xor
 +
start
 +
'Put code for non-friendlies here
 +
...
 +
 +
'''To check if a bot is a conspec
 +
cond
 +
*.in1 *.out1 =
 +
*.in2 *.out2 !=
 +
and
 +
start
 +
...
  
 
== [[Memloc and Memval]] ==
 
== [[Memloc and Memval]] ==
Line 20: Line 62:
 
'''Advantages:'''
 
'''Advantages:'''
  
- Much rarer than the other forms of conspec recognition
 
 
- More secure than [[In and Out]]
 
- More secure than [[In and Out]]
  
'''Disdvantages:'''
+
'''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]] ==
Line 34: Line 89:
 
'''Advantages:'''
 
'''Advantages:'''
  
- Can't be tricked
+
- Can't be tricked passively
  
'''Disdvantages:'''
+
'''Disadvantages:'''
  
- A bot might have the same number of eyes as you
+
- Can be tricked if [[.myeye]] is altered by an info shot, [[venom]] or a [[virus]]
  
 +
- Some bots can change these values to match, usually with .delgene. BlueOnBlue in the Bestiary can do this.
  
 
== Other [[RefVar]]s ==
 
== Other [[RefVar]]s ==
  
 
Other [[RefVar]]s such as [[.refshoot]] can be used to identify members of your species too.
 
Other [[RefVar]]s 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
 +
 +
'''Disadvantages:'''
 +
 +
- Most bots may only have one instance of the command in their DNA
 +
 +
'''Example:'''
 +
 +
-For all refvars, including .myeye; remember to check if there is a bot with *.eye5 0 !=.
 +
cond
 +
*.ref__ *.my__ !=
 +
start
 +
...
 +
 +
== Other ==
 +
 +
Some other forms of conspec recognition have been thought up, but most are very impractical.

Latest revision as of 17:55, 29 March 2014

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 behavior. It's usually best to add *.eye5 0 != to be sure.

cond
*.in1 *.out1 !=
start
...

More Complicated I/O

However, you can set one I/O channel to a value and the other to a random number. If both I/O channels match, then you have either realy, realy bad luck or the other bot just failed in fooling you.

Example Step 1- Initialize I/O ports

cond
*.robage 0 =
100 .out1 store
32000 rnd .out2 store

Step 2

cond
*.in1 *.out1 !=
*.in2 *.out2 =
xor
start
'Put code for non-friendlies here
...

To check if a bot is a conspec

cond
*.in1 *.out1 =
*.in2 *.out2 !=
and
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

Disadvantages:

- Can be tricked if .myeye is altered by an info shot, venom or a virus

- Some bots can change these values to match, usually with .delgene. BlueOnBlue in the Bestiary can do this.

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

Disadvantages:

- Most bots may only have one instance of the command in their DNA

Example:

-For all refvars, including .myeye; remember to check if there is a bot with *.eye5 0 !=.

cond
*.ref__ *.my__ !=
start
...

Other

Some other forms of conspec recognition have been thought up, but most are very impractical.