예제 #1
0
 def testSimulation4(self):
     "Test cleaning 100% of a 5x5 room with SuperRobot"
     x = ps3.run_simulation(2, 1.0, 2, 5, 5, 5, 1.0, 100, ps3.SuperRobot)
     self.assertTrue(
         95 <= x <= 125,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #2
0
 def testSimulation6(self):
     "Test cleaning 90% of a 10x10 room with SuperRobot"
     x = ps3.run_simulation(5, 1.0, 3, 10, 10, 10, 0.9, 100, ps3.SuperRobot)
     self.assertTrue(
         100 <= x <= 110,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #3
0
 def testSimulation1(self):
     "Test cleaning 100% of a 5x5 room with FaultyRobot"
     x = ps3.run_simulation(1, 1.0, 1, 5, 5, 1, 1.0, 100, ps3.FaultyRobot)
     self.assertTrue(
         125 <= x <= 275,
         "Simulation output was outside of 99.7% confidence interval!\n",
     )
예제 #4
0
 def testSimulation4(self):
     "Test cleaning 100% of a 5x5 room with 2 RobotWithACats"
     x = ps3.run_simulation(2, 1.0, 2, 5, 5, 5, 1.0, 100, ps3.RobotWithACat)
     self.assertTrue(
         172 <= x <= 200,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #5
0
 def testSimulation3(self):
     "Test cleaning 90% of a 10x10 room with FaultyRobot"
     x = ps3.run_simulation(1, 1.0, 1, 10, 10, 1, 0.9, 100, ps3.FaultyRobot)
     self.assertTrue(
         360 <= x <= 415,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #6
0
 def testSimulation6(self):
     "Test cleaning 90% of a 10x10 room with 5 RobotWithACats"
     x = ps3.run_simulation(5, 1.0, 3, 10, 10, 10, 0.9, 100,
                            ps3.RobotWithACat)
     self.assertTrue(
         206 <= x <= 215,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #7
0
 def testSimulation5(self):
     "Test cleaning 75% of a 10x10 room with 4 RobotWithACats"
     x = ps3.run_simulation(4, 1.0, 3, 10, 10, 5, 0.75, 100,
                            ps3.RobotWithACat)
     self.assertTrue(
         101 <= x <= 111,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #8
0
 def testSimulation2(self):
     "Test cleaning 75% of a 10x10 room with RobotWithACat"
     x = ps3.run_simulation(1, 1.0, 1, 10, 10, 1, 0.75, 100,
                            ps3.RobotWithACat)
     self.assertTrue(
         220 <= x <= 247,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #9
0
 def testSimulation5(self):
     "Test cleaning 75% of a 10x10 room with BreathtakingRobot"
     x = ps3.run_simulation(4, 1.0, 3, 10, 10, 5, 0.75, 100,
                            ps3.BreathtakingRobot)
     self.assertTrue(
         50 <= x <= 57,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #10
0
 def testSimulation1(self):
     "Test cleaning 100% of a 5x5 room with BreathtakingRobot"
     x = ps3.run_simulation(1, 1.0, 1, 5, 5, 1, 1.0, 100,
                            ps3.BreathtakingRobot)
     self.assertTrue(
         100 <= x <= 175,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")
예제 #11
0
 def testSimulation2(self):
     "Test cleaning 75% of a 10x10 room with OnSaleRobot"
     x = ps3.run_simulation(1, 1.0, 1, 10, 10, 1, 0.75, 100,
                            ps3.OnSaleRobot)
     self.assertTrue(
         217 <= x <= 245,
         "Simulation output was outside of 99.7% confidence interval! Took "
         + str(x) + " steps\n")  #todo - look into this
예제 #12
0
 def testSimulation1(self):
     "Test cleaning 100% of a 5x5 room with RobotWithACat"
     x = ps3.run_simulation(1, 1.0, 1, 5, 5, 1, 1.0, 100, ps3.RobotWithACat)
     self.assertTrue(
         165 <= x <= 210,
         "Simulation output was outside of 99.7% confidence interval!\n")
예제 #13
0
 def run(self):
     try:
         self.result = ps3.run_simulation(*self.args)
     except Exception:
         self.exception_info = sys.exc_info()
예제 #14
0
 def testSimulation1(self):
     "Test cleaning 100% of a 5x5 room with OnSaleRobot"
     x = ps3.run_simulation(1, 1.0, 1, 5, 5, 1, 1.0, 100, ps3.OnSaleRobot)
     self.assertTrue(
         237 <= x <= 295,
         "Simulation output was outside of 99.7% confidence interval!\n")
예제 #15
0
 def testSimulation2(self):
     "Test cleaning 75% of a 10x10 room with BoostedRobot"
     x = ps3.run_simulation(1, 1.0, 1, 10, 10, 1, 0.75, 100, ps3.BoostedRobot)
     self.assertTrue(105 <= x <=125, "Simulation output was outside of 99.7% confidence interval! Took " + str(x) + " steps\n")