public static void main(String[] args) {
    // Create an agentLoader that will start the agent when its run method is called
    AgentLoader theAgentLoader = new AgentLoader(new SkeletonAgent());
    // Create an environmentloader that will start the environment when its run method is called
    EnvironmentLoader theEnvironmentLoader = new EnvironmentLoader(new MonsterGridEnvironment());

    // Create threads so that the agent and environment can run asynchronously
    Thread agentThread = new Thread(theAgentLoader);
    Thread environmentThread = new Thread(theEnvironmentLoader);

    // Start the threads
    agentThread.start();
    environmentThread.start();

    // Run the main method of the Skeleton Experiment, using the arguments were were passed
    // This will run the experiment in the main thread.
    SkeletonExperiment.main(args);
    System.out.println("RunAllSkeleton Complete");

    // Quit Java, including stopping the other threads
    System.exit(1);
  }
コード例 #2
0
 public static void main(String[] args) {
   SkeletonExperiment theExperiment = new SkeletonExperiment();
   theExperiment.runExperiment();
 }