[Pogamut-list] Pogamut bots vs. Unreal bots

fabien.tence pogamut-forum at artemis.ms.mff.cuni.cz
Tue May 27 11:06:27 CEST 2008


Re: Pogamut bots vs. Unreal bots
Create a Java experiment project and override stageTwoStart() with this :


    @Override
    protected void stageTwoStart() throws Exception {
        getLogger().info("Experiment started.");
        getServer().connectOriginalBot("UnrealBot1", null, 7, 0);
        getServer().connectOriginalBot("UnrealBot2", null, 7, 0);

        Agent agent1 = new hunter.Main();
        Agent agent2 = new hunter.Main();
        getServer().connectBot(agent1, "Mybot1");
        getServer().connectBot(agent2, "Mybot2");

        //Put some code here to do your experiment here or simply
        //while(true);
        //or a Thread.sleep(millis) (I'm too lazy too find the right code :p)

        // Quit the experiment
        setResultAndTerminate(new ExperimentResult());
    }


This code add 2 UT bots and 2 hunters. You might want to add your own bots instead of hunters so you just have to change the lines :

        Agent agent1 = new hunter.Main();
        Agent agent2 = new hunter.Main();

with 

        Agent agent1 = new nameOfYourPackage.Main();
        Agent agent2 = new nameOfYourPackage.Main();

Where nameOfYourPackage is the name of the package where your Bot is in.

Right click on your Java experience project Properties->Libraries->Add Project
Add your bot project, click OK.

Run a server, configure Pogamut 2 to connect to your server, run the experiment, it should work...

Hope I didn't forget something :D.

----

Reply Link: <https://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=213&comments_parentId=212&post_reply=1#form>





More information about the Pogamut-list mailing list