A simple automation tool to test your robot in different maps and hopefully beat BruteBot.
graded_maps.zip
- Download graded_maps.zip
- extract the zip file to get a graded_maps folder
- move the graded_maps folder to the same location of your robot code (i.e. root directory).
beatBruteBot.py
- Download
beatBruteBot.py
- move the
beatBruteBot.py
file to the same location of your robot code (i.e root directory).
- Download
(๐ก The file structure may differ)
.
โโโ Bot.py
โโโ Bot010101.py
โโโ BruteBot.py
โโโ Game.py
โโโ Map.py
โโโ RandomBot.py
โโโ app.py
โโโ beatBruteBot.py
โโโ graded_maps
โ โโโ 10
โ โ โโโ map_10_20_10_1_1_3_10_3_.csv
โ โ โโโ map_10_20_1_1_3_3_15_3_.csv
โ โ โโโ map_10_30_10_2_1_7_15_5_.csv
โ โ โโโ map_10_30_2_3_20_3_20_3_.csv
โ โโโ 6
โ โ โโโ map_6_30_10_3_0_0_0_0_.csv
โ โ โโโ map_6_30_1_3_0_0_0_0_.csv
โ โ โโโ map_6_30_2_3_0_0_0_0_.csv
โ โ โโโ map_6_30_5_3_0_0_0_0_.csv
โ โโโ 7
โ โ โโโ map_7_15_10_1_0_0_0_0_.csv
โ โ โโโ map_7_25_1_4_0_0_0_0_.csv
โ โ โโโ map_7_30_5_3_0_0_0_0_.csv
โ โ โโโ map_7_50_50_1_0_0_0_0_.csv
โ โโโ 8
โ โ โโโ map_8_20_1_3_10_2_0_0_.csv
โ โ โโโ map_8_30_1_1_20_1_0_0_.csv
โ โ โโโ map_8_30_3_2_5_2_0_0_.csv
โ โ โโโ map_8_30_5_1_2_5_0_0_.csv
โ โโโ 9
โ โโโ map_9_20_1_1_1_5_1_9_.csv
โ โโโ map_9_30_20_1_1_3_10_3_.csv
โ โโโ map_9_30_2_3_5_3_5_4_.csv
โ โโโ map_9_40_1_1_1_3_30_3_.csv
โโโ logs
In Game.py
, change the following code snippets:
def play(self):
...
if self.energy<=0:
print("game over, " +botName+ " ran out of energy")
elif self.map.remainingStains<=0:
print(botName + " finished the map with a score of ", self.energy)
to:
def play(self):
...
if self.energy<=0:
# print("game over, " +botName+ " ran out of energy")
return 'Game Over'
elif self.map.remainingStains<=0:
# print(botName + " finished the map with a score of ", self.energy)
return self.energy
In beatBruteBot.py
, change the value of the variable CHALLENGER
on the 10th line to your robot name.
# Change this to your robot name
CHALLENGER = 'Bot010101'
At the bottom of the beatBruteBot.py
, you can customized the levels you want to test your robot.
#......
if __name__ == "__main__":
# 1. By default, it will test all the maps in level 6 and level 7
beatBruteBot()
# 2. To test a specific level:
# beatBruteBot([8])
# 2. To test all levels:
# beatBruteBot([6,10])
In jupyter-lab terminal, run
python beatBruteBot.py
# or
python3 beatBruteBot.py
Good luck!