Markov Chains, Computer Science, Programming, Probability, Problem Solving.
self.state_possibilities[val].index(max(self.state_possibilities[val])) selected = self.states[next_state_index] remaining_states = [state for state in self.states if state != selected] remaining_probs = [self.state_possibilities[val][self.states.index(state)] for state in remaining_states]