More efficient board encoding.