mlpy.mdp.IMDPModel.sample¶
-
IMDPModel.
sample
(state=None, action=None)[source]¶ Sample from the probability distribution.
The next state is sampled for the given state and action from the probability distribution. If either state or action is
None
the next state is sampled from the initial distribution.Parameters: state : State, optional
The current state the robot is in.
action : Action, optional
The action perform in state state.
Returns: State :
The sampled next state.