this works is actually a very standard thing for optimal control theory which is if you have a predictive forward model of the world they gives you the state of the world at time T plus 1 as a function of state the world time T your action and perhaps some latent variable that represents all those stuff you don't know about the world that you can you can sort of run this in your head you can you know run your world model in your head with a proposed sequence of action and see what the result will be and you can measure the cost of it you