Rules are parsed line by line. The first three characters define the conditions for the left, middle, and right pixels. W means white, B means black, and ? means any.
The fourth character is a space, and the fifth is the outcome of that condition. W means white, B means black, and R means random.
Here are a few interesting ones you can try out:
(one in the middle, ignore overflow) B?B W W?W W W?B B B?W B
(random, loop) B?? W W?? B