Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (18 sloc) 686 Bytes
from Actions import Actions
import copy
class StateGenerator:
def generateState(self, gridWorld, actionType, oldActorCell):
# performance optimization for new states to be considered
# generate all possible states
# by applying all agent actions
# and environment effects on these actions
possibleStates = []
moveState = gridWorld.proposeMove(actionType)
if moveState is None:
# cant move
moveState = oldActorCell
if moveState != oldActorCell:
# move may fail
return possibleStates
You can’t perform that action at this time.