I am trying to solve the Light Up puzzle using PDDL. To implement the effect of the action placing a bulb in a cell, I have to place a bulb in (x, y) and then lit up the same row and column as long as there is no black cell. I am unable to lit up the cells till the black cell.
For example, for a 5*5 grid, if I want to place a bulb at (0,1) and there is black cell at (3, 1), I would want to lit up only cells (0,1), (1,1), (2,1) if I am only considering the column. But I would not want to lit up cell (4,1) as it is after the black cell.
So, if I use something like forall, how would I break the for all loop when it finds a black cell on it's way in a row/column?