reset password
Author Message
rabbott
Posts: 1649
Posted 22:31 May 20, 2012 |

Prepare to discuss your code. Let's talk about the good things you have done as well as the issues you are currently working on. Let's use the time to put everyone on track to finish your bot by the end of the term.

-- Russ Abbott

rabbott
Posts: 1649
Posted 19:43 May 21, 2012 |

A useful bot to practice against is GreedyStarter.jar. It has no BFS and it has no combat code. Its strategy is for its ants  to go for food or enemy hills it can see directly (in a straight line). Ants that have no line-of-light food or enemy hill targets move randomly.  

To a first approximation, beating GreedyStarter.jar is worth a C in the class. Not beating it is worth less, beating it and beating stronger bots is worth more.

In the past I used to have individual conference with students in lieu of a final. Since we have a small class, I'd like to do that again. We will run your bot and talk for about 20 minutes. I'll expect you to be able to explain your code. I'll also expect you to be able to explain any code that you borrowed from me or someone else.

As I said in the earlier message, let's use this Saturday as a workshop to start preparing for these conferences.

-- Russ Abbott

rabbott
Posts: 1649
Posted 12:45 May 22, 2012 |

Here's a nice test. Run your bot against 4 copies of GreedyStarter.jar -- something like this.

python tools/playgame.py ^
  "java -jar bots/GreedyStarter.jar" ^
  "java -jar bots/GreedyStarter.jar" ^
  "java -jar bots/GreedyStarter.jar" ^
  "java -jar bots/GreedyStarter.jar" ^
  "<your bot>" ^
  --map_file tools/maps/maze/maze_05p_01.map ^
  --log_dir game_logs ^
  --verbose -e ^
  --engine_seed 34 ^
  --viewradius2 77 ^
  --turns 500
 
The maze_05p01 map is open enough so that several instances of GreedyStarter will get out and collect quite a bit of food.
Last edited by rabbott at 12:48 May 22, 2012.
dedward
Posts: 22
Posted 12:06 May 25, 2012 |

Professor Abbott, I tried running my bot against GreedyStarter.jar, and got "Exception in thread "main" java lang Unsupported Class Version".

Specifically: Could not find the main class: MyBot. Program will exit.
Exception in thread "main" java.lang.UnsupportedClassVersionError: MyBot : Unsupported major.minor version 51.0

Java works fine with my bot, but when I include GreedyStarter.jar, I get "Could not find the main class: MyBot. Program will exit."

Googling suggests I may be using conflicting versions of Java, or wrong versions of Java in my environmental variables Path. I'm unable to run my Bot against GreedyStarter.jar. Any idea what I need to fix?

Thanks.

Last edited by dedward at 14:08 May 25, 2012.
rabbott
Posts: 1649
Posted 17:41 May 25, 2012 |

There have been problems with running a compiled program on a runtime for a different version of Java.  I compiled everything on Java 1.7.  If you are not using 1.7 you might download and use that.

Probably the simplest thing to do is recompile GreedyStarter on your computer and use the jar file you generate.

-- Russ Abbott