SE 101 Freshman Seminar

Week 7 - Robocode Part I

Class Plan:

* Students should not log in until teams are assigned

  1. Introduction to Robocode resources and Demo (10 min)
  2. Team Formation (2 or 3 members)
  3. Activity #1: Team planning and strategy (20 min)
  4. Activity #2: Robocode Development Time (remaining time and next class)

 

Running Robocode in the Lab machines

Note the steps below apply only to the SE Lab machines. If you decide to install on your own paths and steps may differ.

  1. Using Windows Explorer go to C:\robocode  directory.
  2. Locate the robocode.bat file and double-click to run it.
  3. Note that a command window will open showing the execution of the batch file and the Loading of robocode packages.

As you work on your robot, you must NOT close this command window or the program will exit.

  1. If all goes well, the  loading of files will be quick and you will eventually have a popup with the Robocode program screen and logo.

* If you choose to install robocode at home you may find these instructions helpful. Note: it is necessary for your machine to have a Java Runtime Environment installed as robocode is written in Java and distributed as .jar files. For instructions on how to do that go to: http://www.java.com/en/download/help/download_options.xml

 

Robot Development & Competition

Each team will construct a robot for entry into a class competition next week, Week 8. Winners of the class competitions will advance to the SE101 Robocode Battle Royal to be held later in the quarter.

 NOTE: If your navigation strategy is just following a walls then that robot will not be allowed into the competition.

Activity #1:

Your team may use any process to design and implement your robot.

·         Spend some time familiarizing yourselves with the resources available to you. This first activity is meant to have you Think before you code!

·          Review the Robocode documentation under Help (API, on-line help and FAQ).

o    Robocode Shoot Em Up Guide

o    Robocode API

o    Robocode Website

* Feel free to search the web for additional information

·         As a team, agree on what process you are going to follow to get the job done and record these ideas on a MS Word document.

·         Discuss the features you would like your robot to have, the combat strategies you would like to implement and add these to the document.

o    The Trainer robot is an example of a simple implementation. You may want to go through the comments in the code to get familiar with the structure of a robot. Experiment a bit by implementing small changes and testing the robot in battles with other robots.

o    To run battles, go to the Robocode window and select Battle->New.  Click the "Add all ->" button near the right column and then click on "Start Battle" button on the bottom.

Note: you can start any new battles and add the robots you want. You can also slow down the battle to better understand what a particular robot is doing.

·         Submit your plan/strategy as MS Word or PDF document to the dropbox: “Week 7 – Robocode robot, Version 1”  and to Group Locker

 

Activity #2:

Now it is time to build and improve upon your design ideas.

  • Note that the code of the sample robots is available, and there is an active Internet community for robocode. You are allowed to borrow ideas from existing robots, but you may not simply rename an existing robot and submit it to the competition. Most importantly, make sure to add comments to your code and where appropriate give credit where credit is due.
  • Your instructor will create a group Locker folder in myCourses for you to store Group Files. You will use this folder as the central shared repository for your team.
  • Note: time will be allotted for robot development during class, but you are welcome to work on your robots outside of class as well.

 

·         To start the implementation of your robot with your teammates:

1.       From the Robocode main window select Robot-> Editor from the menu

2.       Then on the Robot Editor window select File-> New -> Robot

3.       First popup is YOUR Robot Name

4.       Second popup is the package name. Make SURE to follow this naming convention "SE101_"<YourSectionName> (i.e. SE101_03)

5.       At the end of class, save your work to your team's Locker in myCourses. Your teammates can retrieve your code from there when needed.