Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
CCMPAgent --------- Introduction ------------ The CCMPAgent is a software agent based on the ART testbed. It consists of three components: agent framework, weka based decision tree library, and a bayesian trust model library. The software was developed by Catalin Patulea, Chris Fournier, Mike Lepard, Pierre Dinnissen for the SYSC-5103 class at Carleton University in the fall of 2009. Requirements/Instructions ------------------------- The CCMPAgent was developed using the Eclipse IDE and consists of three individual Java projects: agent for the CCMP Agent framework, dtlib for the Weka based decision tree library, and bayestrustlib for the Baysian trust model library. Build ----- The CCMPAgent requires the following software and versions: - ART 2.1.1 - MySQL 5.1 (prepopulated and configured to run ART) - Sun JDK 5 (JDK 6 was not tested) -JDK 6 will not compile ART 2.1.1 due to a change in sun.print.PSPrinterJob.EPSPrinter - JUnit 4 (for testing) - Weka 3.6.1 - Eclipse Java IDE (Galileo 3.5 RC1, needed for testing, and ease of compiling) Each of the Eclipse projects developed for this project contain the necessary JAR files located in a lib directory. To compile these projects Eclipse should be installed and configured with the correct version of the JDK. The projects can then be imported into the Eclipse IDE and compiled into the Java class files. The class files are created in a bin directory within each project. During the project two different CCMPAgent classes were created, the SimpleCCMPAgent and the BayesWekaCCMPAgent. These agents are loaded into the ART testbed through a JAR file. The JAR file contains all the classes required to run that particular agent. In the case of the BayesWekaCCMPAgent it also includes the Weka class files extracted from the Weka JAR. In Eclipse two Ant build file were created, one for each agent. The Ant build file packages all the required class files into a JAR file, sets the main instance class for the JAR, and copies the JAR into the base directory of the four projects. The Ant build scripts are located in the agent directory and are labelled simpleJar.xml and bayesWekaJar.xml. Run --- The CCMPAgent is run using the the ART testbed. A stripped version of the ART testbed was developed for this project that could be used to run and test the CCMPAgent. This version is located in the directory called testbed and consists of the ART JARs, runscript files, and config files. The ART testbed requires MySQL 5.1 to be installed on the machine with a root user and password defined. The ART database should be configured using the startWizard script located in the testbed directory. This script should configure the components so that the ART testbed can be run using the startSim.bat. The ART testbed uses XML configuration files, located in the testbed/config directory, to setup each game and to define the agents that will participate. The config file has entries for the agent configuration files, which must be located in testbed\src\testbed\participants, or ART will not function correctly. In the CCMP ART testbed a game-config-ccmp.xml file is used to load a game with CCMPAgent participants. Run script files, startSim-CCMP and start_GMI-CCMP, are provided to run ART using the the CCMP config file. Configuration ------------- The ART agent configuration file can be setup to pass configuration parameters to the agent. The base CCMPAgent uses this configuration file to enable or disable logging to a file. The BayesWekaCCMPAgent uses this configuration file to define the catgeorical and non-categorical data sets that are used by Weka to generate the decision trees that control the actions of the agent. Two of these configuration files are provided, one of them is the final configuration files used in the class project and the other is a bad CCMP agent that never provides any of the data (messages) it was payed for. Test ---- The CCMPAgnet project makes use of two testing methodologies. The first is JUnit testing that was primarily used for testing the Baysian trust model implementation. The second is a class used for visualizing the decision trees generated by Weka from the data sets provided. This is used to verify that the expected actions will be taken by the agent. JUnit Testing ------------- To test the Agent project: In Eclipse, with JUnit4 setup, run tests.AllTests as a JUnit test suite. To test the BayesTrustLib project: In Eclipse, with JUnit4 setup, run tests.trust.AllTests as a JUnit test suite. Visual Testing -------------- To visually test the decision trees: In Eclipse, run tests.agent.decision WekaDTTest.java. Java windows will popup for each treee. Training data can be modified as desired, and then the tests rerun to ensure that the decision trees will have the desired characteristics. If the XML parsed trees need to be visually inspected, the uncomment the code at the bottom of the file and resolve any compilation errors, ensure that the xml is up to date and then rerun the tests. Once satisfied recomment the code and ensure to revert changes done to successfully compile. In the future, a more proper way to test the decision trees should be developed.