```python
def gen_plan(state: BridgeState,
             a_start_x_offset: float, a_start_y_offset: float,
             a_end_x_offset:   float, a_end_y_offset:   float,
             b_start_x_offset: float, b_start_y_offset: float,
             b_end_x_offset:   float, b_end_y_offset:   float):
    
    import numpy as np

    # Build the block towards the target
    actions = []
    red_box = state.getFrame("big_red_block")
    target = state.getFrame("target_pose")
    
    # First push start
    a_start_x = red_box.x_pos + a_start_x_offset
    # a_start_y = red_box.y_pos + a_start_y_offset  # Bad initialization
    a_start_y = red_box.y_pos + .1 + a_start_y_offset  # Good initialization
    
    # First push end
    a_end_x = a_start_x + a_end_x_offset
    # a_end_y = red_box.y_pos + a_end_y_offset  # Bad initialization
    a_end_y = red_box.y_pos - .4 + a_end_y_offset  # Good initialization
    
    # Second push start
    b_start_x = a_end_x + a_end_x_offset
    b_start_y = a_end_y + a_end_y_offset
    
    # Second push end
    b_end_x = target.x_pos + a_end_x_offset
    b_end_y = target.x_pos + a_end_y_offset

    # Push down #
    actions.append(Action("push_motion", [a_start_x, a_start_y, a_end_x, a_end_y]))

    # Second Push (For adjusting position) #
    actions.append(Action("push_motion", [b_start_x, b_start_y, b_end_x, b_end_y]))

    return actions

def gen_domain(initial_state: BridgeState):
    return {
        "a_start_x_offset": ContinuousSampler(-0.3, 0.3),
        "a_start_y_offset": ContinuousSampler(-0.3, 0.3),
        "a_end_x_offset":   ContinuousSampler(-0.3, 0.3),
        "a_end_y_offset":   ContinuousSampler(-0.3, 0.3),
        "b_start_x_offset": ContinuousSampler(-0.3, 0.3),
        "b_start_y_offset": ContinuousSampler(-0.3, 0.3),
        "b_end_x_offset":   ContinuousSampler(-0.3, 0.3),
        "b_end_y_offset":   ContinuousSampler(-0.3, 0.3),
    }
```
