```python
def gen_plan(state: BridgeState, center_x: float, center_y: float, yaw: float):
    
    import numpy as np
    
    # Build the bridge
    actions = []

    block_size_z = state.getFrame("block_red").z_size
    
    # Red #
    pos_x = np.cos(yaw) * block_size_z * .5 + center_x
    pos_y = -np.sin(yaw) * block_size_z * .5 + center_y
    actions.append(Action("pick", ["block_red", None]))
    actions.append(Action("place_sr", [pos_x, pos_y, None, None, None]))

    # Green #
    pos_x = -np.cos(yaw) * block_size_z * .5 + center_x
    pos_y = np.sin(yaw) * block_size_z * .5 + center_y
    actions.append(Action("pick", ["block_green", None]))
    actions.append(Action("place_sr", [pos_x, pos_y, None, None, None]))

    # Blue #
    # Here the pick axis is relevant as it influences the place
    slack = .03
    pos_z = block_size_z + slack
    actions.append(Action("pick", ["block_blue", "x"]))
    actions.append(Action("place_sr", [center_x, center_y, pos_z, True, yaw]))
    
    return actions

def gen_domain(initial: BridgeState):
    return {
        "center_x": ContinuousSampler(-0.5, 0.5),
        "center_y": ContinuousSampler(-0.5, 0.5),
        "yaw": ContinuousSampler(0, 6.282),
    }
```
