Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- transitionMatrix = np.matrix([[0, 0, 0, 0, 0, 1, 0, 1, 0, 0],
- [0, 0, 0, 0, 0, 0, 1, 0, 1, 0],
- [0, 0, 0, 1, 0, 0, 0, 1, 0, 0],
- [0, 0, 1, 0, 0, 0, 0, 0, 1, 1],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- [1, 0, 0, 0, 0, 0, 1, 0, 0, 1],
- [0, 1, 0, 0, 0, 1, 0, 0, 0, 0],
- [1, 0, 1, 0, 0, 0, 0, 0, 0, 0],
- [0, 1, 0, 1, 0, 0, 0, 0, 0, 0],
- [0, 0, 0, 1, 0, 1, 0, 0, 0, 0]])
- stateVector = np.matrix([[1, 0, 0, 0, 0, 0, 0, 0, 0, 0]])
- nextState = np.matmul(stateVector,transitionMatrix)
- nextState # order: 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 - I am aware it doesn't start with 0
- # matrix([[0, 0, 0, 0, 0, 1, 0, 1, 0, 0]])
Add Comment
Please, Sign In to add comment