Exemplo n.º 1
0
def setup():
    robot.maze = RobotMaze(mazeWorld,0.,0.,10.,10.)
    robot.path = mazeSearch(robot.maze)
    robot.initialLocation = robot.maze.indicesToPoint(robot.maze.start)
    robot.slimeX = []
    robot.slimeY = []
    # graphical window for path and slimeTrail
    robot.window = plotWindow.PlotWindow()
    #show the soar world #plot the soar world
    soarWorld.plotSoarWorld(PATH_TO_WORLD,robot.window)
    #plot the robot's planned path
    robot.window.plot([robot.maze.indicesToPoint(i).x-robot.initialLocation.x for i in robot.path],
                       [robot.maze.indicesToPoint(i).y-robot.initialLocation.y for i in robot.path],'r',
                       label = 'Intended Path')
def brainStop():
    p = PlotWindow('Slime Trail')
    soarWorld.plotSoarWorld(PATH_TO_WORLD, p)  #show the soar world
    p.plot(robot.slimeX, robot.slimeY)  #plot the recorded slime trail data
def brainStop():
    p = PlotWindow('Slime Trail')
    soarWorld.plotSoarWorld(PATH_TO_WORLD,p) #show the soar world
    p.plot(robot.slimeX,robot.slimeY) #plot the recorded slime trail data