RCScenes

The RoboCup Scene framework (RCScenes) is a set of tools for imitating RoboCup Simulation agents using case-based reasoning. Since RCScenes' main focus is on "visual" information, cases are referred to as "scenes".

RCScenes is still in use by some people in our lab, but we are moving to JIFSA a more general imitation framework. The last RCScenes version can be downloaded here.

Package Description

The RoboCup Scene framework consists of a set of Java classes broken down into three packages:
rcscene
Contains the core scene agent framework classes including two executable classes (SceneAgent and the LogToScenes conversion tool), a DistanceCalculation interface for extensible scene matching algorithms, two simple implementations of the DistanceCalculation interface, and other test and support classes.
sceneInfo
Contains basic definitions of RoboCup soccer objects such as balls, flags, and players, and container classes for scene libraries, scenes, and object collections.
sceneMatch
Contains classes implementing various object matching algorithms for use in the scene matching agent. Algorithms implement the DistanceCalculation interface. Sub-packages include a set of matching algorithms based on simple k-nearest-neighbor matching, and an implementation of Edmonds' Minimum Weight Perfect Matching Algorithm based on an existing Java applet.

rcscene package howto

Converting log files to Scenes

Pre-requisites

  1. You must download the project into a Java working environment (jdk, Eclipse, etc) and compile the classes.
  2. Obtain log files from an existing RoboCup agent (this will become the basis for the scene agent's imitative behaviour). Either download our sample log files, or capture your own using a tool such as our LogServer to capture by proxy.
  3. Place the log file in your project directory

Overview

This is done with the rcscene.tools.LogToScenes class.

As an input, the program takes in a log file.

Two files will be generated. They are the machine-readable and human-readable scene representations of the player log file, and will be used by the imitation agent as its "memory".

Command line instructions

Convert the log file into a scene library file by running the following:

java rcscene.tools.LogToScenes <logFileName> <outputFileName> The files <outputFileName>.scene and <outputFileName>.text will be generated.

(Run LogToScenes with no parameters for a detailed list of options.)

Using the imitation agent

Pre-requisites

  1. You must have a scene file in your project directory.
  2. You must have access to a Soccer Server
  3. If desired, you can use a Soccer Monitor

Overview

First start up the RoboCup soccer server and monitor.

The imitation agent uses a scene file as its "memory", where the previous cases are stored.

When running the imitation agent, it connects to the server. You should see a little colored dot (a player) appear on the monitor.

Command line instructions

To run a RoboCup player agent based on the captured and converted scene library execute the following: java rcscene.SceneAgent -host hostname -port port -team teamname -scene scenefile.scene -sceneSel n -distCal n -numBest n [-objectWeights weights -actionWeights weights]

All options have default values, and only the scenefile.scene file is required. Run SceneAgent -help for a list of defaults and more option details. The key is to specify which scene-matching (distance calculation) algorithm to use, which action selection algorithm to use, and in the case of a k-nearest-neighbor selection, the value of k.

For example, to select the bipartite matching algorithm, and accept all other default values, execute: java rcscene.SceneAgent -scene myfile.scene -distCal 4

Validation mode

The SceneAgent can also run in statistical test validation mode using the -validate switch. In this mode, the agent does not connect to a RoboCup server. Instead, it takes another scene file as input to the scene matching algorithm. You may use the same scene file for both scene input and matching (unit testing) or use a different one (cross-validation testing).

For example, to run the agent in validation mode, execute: java rcscene.SceneAgent -scene myInput.scene -validate myTestSet.scene

After loading the scene files, the agent will perform the matching, tracking its success rates and provide a summary when completed.