Not an optimized implementation yet, but this feels like a decent algorithm for pseudo period 4. The trial and error portion can get down to 13R before additional test products are needed. With one additional arm testing for the WWWW case, it could get down to 9R. The limiting factor is building the sticks efficiently.