reset password
Author Message
rabbott
Posts: 1649
Posted 19:12 Jun 09, 2012 |

Bot.10 has been modified to accept command line parameters. The modified version is called Bot.10P.  Four copies of the jar file are in ,,,\Dropbox\CS_460_Ant_Programs\bots.  Even though they are the exact same jar file they are named differently so that you can see how they perform if you give them different parameters and play them against each other.

There is also a .cmd file in ,,,\Dropbox\CS_460_Ant_Programs\ called PlayBot.10PVariants.cmd. It looks like this.

python tools/playgame.py ^
   "java -jar bots/Bot.10P.jar" ^
   "java -jar bots/Bot.10P-LimitPathLength.jar --max_path_length 10" ^
   "java -jar bots/Bot.10P-LimitMinimizerSearch.jar --minimizer_depth_limit 0" ^
   "java -jar bots/Bot.10P-LimitDetour.jar --max_detour 0" ^
  --map_file tools/maps/maze/maze_04p_01.map ^
  --log_dir game_logs ^
  --verbose -e ^
  --engine_seed 34 ^
  --viewradius2 77 ^
  --turns 500
  
  pause
 
As you can see it calls 4 versions of Bot.10P with various parameter settings. 
 
The possible parameters are as follows.
--max_detour
--max_path_length 
--minimizer_depth_limit  
  • max_detour sets the maximum detour from a straight line an ant is allowed to take. If unset, the default is 20.
  • max_path_length sets the maximum path length an ant is allowed to explore in a BFS. If unset the default is 30.
  • minimizer_depth_limit sets the depth of minimax search. A depth of 0 is no search at all. If unset, there is no default limit.

You can think of max_detour as limiting the extent to which ants can see around corners; max_path_length as limiting  how far ants can see (a low value means that the ants are nearsighted); minimizer_depth_limit as limiting the analysis ants can do with respect to battles.

Running PlayBot.10PVariants.cmd almost always results in Bot.10P winning. (It's not limited in any of the indicated ways and has its values set at the default.) It can see as far as necessary and around corners as well as necessary. It can analyze battles reasonably well. How the others do depends to a great extend on how they are positioned on the map with respect to each other. The one closest to Bot.10P is usually wiped out first. In general, the most serious limit (at this level of play) seems to be nearsightedness.  It's more important for ants to be able to find food (which sometimes requires fairly long path-lengths) than to be able to fight well.

On an unrelated note, to set the turn time limit in milliseconds use turntime as a parameter to the game engine. The list of all parameters is here.

Last edited by rabbott at 19:15 Jun 09, 2012.